OpenHantek
Data Structures | Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes
DsoWidget Class Reference

The widget for the oszilloscope-screen This widget contains the scopes and all level sliders. More...

#include <dsowidget.h>

Inheritance diagram for DsoWidget:

Data Structures

struct  Sliders
 

Public Slots

void updateFrequencybase (double frequencybase)
 Handles frequencybaseChanged signal from the horizontal dock. More...
 
void updateSamplerate (double samplerate)
 Updates the samplerate field after changing the samplerate. More...
 
void updateTimebase (double timebase)
 Handles timebaseChanged signal from the horizontal dock. More...
 
void updateTriggerMode ()
 Handles modeChanged signal from the trigger dock.
 
void updateTriggerSlope ()
 Handles slopeChanged signal from the trigger dock.
 
void updateTriggerSource ()
 Handles sourceChanged signal from the trigger dock.
 
void updateSpectrumMagnitude (ChannelID channel)
 Handles magnitudeChanged signal from the spectrum dock. More...
 
void updateSpectrumUsed (ChannelID channel, bool used)
 Handles usedChanged signal from the spectrum dock. More...
 
void updateVoltageCoupling (ChannelID channel)
 Handles couplingChanged signal from the voltage dock. More...
 
void updateMathMode ()
 Handles modeChanged signal from the voltage dock.
 
void updateVoltageGain (ChannelID channel)
 Handles gainChanged signal from the voltage dock. More...
 
void updateVoltageUsed (ChannelID channel, bool used)
 Handles usedChanged signal from the voltage dock. More...
 
void updateRecordLength (unsigned long size)
 Change the record length.
 
void updateZoom (bool enabled)
 Show/hide the zoom view.
 
void updateCursorGrid (bool enabled)
 

Signals

void offsetChanged (ChannelID channel, double value)
 A graph offset has been changed.
 
void triggerPositionChanged (double value)
 The pretrigger has been changed.
 
void triggerLevelChanged (ChannelID channel, double value)
 A trigger level has been changed.
 

Public Member Functions

 DsoWidget (DsoSettingsScope *scope, DsoSettingsView *view, const Dso::ControlSpecification *spec, QWidget *parent=0, Qt::WindowFlags flags=0)
 Initializes the components of the oszilloscope-screen. More...
 
void showNew (std::shared_ptr< PPresult > data)
 Prints analyzed data.
 

Protected Member Functions

virtual void showEvent (QShowEvent *event)
 
void setupSliders (Sliders &sliders)
 
void adaptTriggerLevelSlider (DsoWidget::Sliders &sliders, ChannelID channel)
 Set the trigger level sliders minimum and maximum to the new values.
 
void adaptTriggerPositionSlider ()
 Handles signals affecting trigger position in the zoom view.
 
void setMeasurementVisible (ChannelID channel)
 Show/Hide a line of the measurement table.
 
void updateMarkerDetails ()
 Update the label about the marker measurements.
 
void updateSpectrumDetails (ChannelID channel)
 Update the label about the trigger settings.
 
void updateTriggerDetails ()
 Update the label about the trigger settings. More...
 
void updateVoltageDetails (ChannelID channel)
 Update the label about the trigger settings.
 
double mainToZoom (double position) const
 Translate horizontal position (0..1) from main view to zoom view.
 
double zoomToMain (double position) const
 Translate horizontal position (0..1) from zoom view to main view.
 

Protected Attributes

Sliders mainSliders
 
Sliders zoomSliders
 
QGridLayout * mainLayout
 The main layout for this widget.
 
QHBoxLayout * settingsLayout
 The table for the settings info.
 
QLabel * settingsTriggerLabel
 The trigger details.
 
QLabel * settingsRecordLengthLabel
 The record length.
 
QLabel * settingsSamplerateLabel
 The samplerate.
 
QLabel * settingsTimebaseLabel
 The timebase of the main scope.
 
QLabel * settingsFrequencybaseLabel
 The frequencybase of the main scope.
 
QLabel * swTriggerStatus
 The status of SW trigger.
 
QHBoxLayout * markerLayout
 The table for the marker details.
 
QLabel * markerInfoLabel
 The info about the zoom factor.
 
QLabel * markerTimeLabel
 The time period between the markers.
 
QLabel * markerFrequencyLabel
 The frequency for the time period.
 
QLabel * markerTimebaseLabel
 The timebase for the zoomed scope.
 
QLabel * markerFrequencybaseLabel
 The frequencybase for the zoomed scope.
 
QGridLayout * measurementLayout
 The table for the signal details.
 
std::vector< QLabel * > measurementNameLabel
 The name of the channel.
 
std::vector< QLabel * > measurementGainLabel
 The gain for the voltage (V/div)
 
std::vector< QLabel * > measurementMagnitudeLabel
 The magnitude for the spectrum (dB/div)
 
std::vector< QLabel * > measurementMiscLabel
 Coupling or math mode.
 
std::vector< QLabel * > measurementAmplitudeLabel
 Amplitude of the signal (V)
 
std::vector< QLabel * > measurementFrequencyLabel
 Frequency of the signal (Hz)
 
DataGridcursorDataGrid
 
DsoSettingsScopescope
 
DsoSettingsViewview
 
const Dso::ControlSpecificationspec
 
GlScopemainScope
 The main scope screen.
 
GlScopezoomScope
 The optional magnified scope screen.
 

Detailed Description

The widget for the oszilloscope-screen This widget contains the scopes and all level sliders.

Constructor & Destructor Documentation

◆ DsoWidget()

DsoWidget::DsoWidget ( DsoSettingsScope scope,
DsoSettingsView view,
const Dso::ControlSpecification spec,
QWidget *  parent = 0,
Qt::WindowFlags  flags = 0 
)

Initializes the components of the oszilloscope-screen.

Parameters
settingsThe settings object containing the oscilloscope settings.
dataAnalyzerThe data analyzer that should be used as data source.
parentThe parent widget.
flagsFlags for the window manager.

Member Function Documentation

◆ updateFrequencybase

void DsoWidget::updateFrequencybase ( double  frequencybase)
slot

Handles frequencybaseChanged signal from the horizontal dock.

Parameters
frequencybaseThe frequencybase used for displaying the trace.

◆ updateSamplerate

void DsoWidget::updateSamplerate ( double  samplerate)
slot

Updates the samplerate field after changing the samplerate.

Parameters
samplerateThe samplerate set in the oscilloscope.

◆ updateSpectrumMagnitude

void DsoWidget::updateSpectrumMagnitude ( ChannelID  channel)
slot

Handles magnitudeChanged signal from the spectrum dock.

Parameters
channelThe channel whose magnitude was changed.

◆ updateSpectrumUsed

void DsoWidget::updateSpectrumUsed ( ChannelID  channel,
bool  used 
)
slot

Handles usedChanged signal from the spectrum dock.

Parameters
channelThe channel whose used-state was changed.
usedThe new used-state for the channel.

◆ updateTimebase

void DsoWidget::updateTimebase ( double  timebase)
slot

Handles timebaseChanged signal from the horizontal dock.

Parameters
timebaseThe timebase used for displaying the trace.

◆ updateTriggerDetails()

void DsoWidget::updateTriggerDetails ( )
protected

Update the label about the trigger settings.

Todo:
This won't work for special trigger sources

◆ updateVoltageCoupling

void DsoWidget::updateVoltageCoupling ( ChannelID  channel)
slot

Handles couplingChanged signal from the voltage dock.

Parameters
channelThe channel whose coupling was changed.

◆ updateVoltageGain

void DsoWidget::updateVoltageGain ( ChannelID  channel)
slot

Handles gainChanged signal from the voltage dock.

Parameters
channelThe channel whose gain was changed.

◆ updateVoltageUsed

void DsoWidget::updateVoltageUsed ( ChannelID  channel,
bool  used 
)
slot

Handles usedChanged signal from the voltage dock.

Parameters
channelThe channel whose used-state was changed.
usedThe new used-state for the channel.

The documentation for this class was generated from the following files: