OpenHantek
Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
HorizontalDock Class Reference

Dock window for the horizontal axis. It contains the settings for the timebase and the display format. More...

#include <HorizontalDock.h>

Inheritance diagram for HorizontalDock:

Signals

void frequencybaseChanged (double frequencybase)
 The frequencybase has been changed.
 
void samplerateChanged (double samplerate)
 The samplerate has been changed.
 
void timebaseChanged (double timebase)
 The timebase has been changed.
 
void recordLengthChanged (unsigned long recordLength)
 The recordd length has been changed.
 
void formatChanged (Dso::GraphFormat format)
 The viewing format has been changed.
 

Public Member Functions

 HorizontalDock (DsoSettingsScope *scope, QWidget *parent, Qt::WindowFlags flags=0)
 Initializes the horizontal axis docking window. More...
 
void setFrequencybase (double timebase)
 Changes the frequencybase. More...
 
void setSamplerate (double samplerate)
 Changes the samplerate. More...
 
double setTimebase (double timebase)
 Changes the timebase. More...
 
void setRecordLength (unsigned int recordLength)
 Changes the record length if the new value is supported. More...
 
int setFormat (Dso::GraphFormat format)
 Changes the format if the new value is supported. More...
 
void setAvailableRecordLengths (const std::vector< unsigned > &recordLengths)
 Updates the available record lengths in the combo box. More...
 
void setSamplerateLimits (double minimum, double maximum)
 Updates the minimum and maximum of the samplerate spin box. More...
 
void setSamplerateSteps (int mode, QList< double > sampleSteps)
 Updates the mode and steps of the samplerate spin box. More...
 

Protected Slots

void frequencybaseSelected (double frequencybase)
 Called when the frequencybase spinbox changes its value. More...
 
void samplerateSelected (double samplerate)
 Called when the samplerate spinbox changes its value. More...
 
void timebaseSelected (double timebase)
 Called when the timebase spinbox changes its value. More...
 
void recordLengthSelected (int index)
 Called when the record length combo box changes its value. More...
 
void formatSelected (int index)
 Called when the format combo box changes its value. More...
 

Protected Member Functions

void closeEvent (QCloseEvent *event)
 Don't close the dock, just hide it. More...
 

Protected Attributes

QGridLayout * dockLayout
 The main layout for the dock window.
 
QWidget * dockWidget
 The main widget for the dock window.
 
QLabel * samplerateLabel
 The label for the samplerate spinbox.
 
QLabel * timebaseLabel
 The label for the timebase spinbox.
 
QLabel * frequencybaseLabel
 The label for the frequencybase spinbox.
 
QLabel * recordLengthLabel
 The label for the record length combobox.
 
QLabel * formatLabel
 The label for the format combobox.
 
SiSpinBoxsamplerateSiSpinBox
 Selects the samplerate for aquisitions.
 
SiSpinBoxtimebaseSiSpinBox
 Selects the timebase for voltage graphs.
 
SiSpinBoxfrequencybaseSiSpinBox
 Selects the frequencybase for spectrum graphs.
 
QComboBox * recordLengthComboBox
 Selects the record length for aquisitions.
 
QComboBox * formatComboBox
 
DsoSettingsScopescope
 The settings provided by the parent class.
 
QList< double > timebaseSteps
 Steps for the timebase spinbox.
 
QStringList formatStrings
 Strings for the formats.
 

Detailed Description

Dock window for the horizontal axis. It contains the settings for the timebase and the display format.

Constructor & Destructor Documentation

◆ HorizontalDock()

HorizontalDock::HorizontalDock ( DsoSettingsScope scope,
QWidget *  parent,
Qt::WindowFlags  flags = 0 
)

Initializes the horizontal axis docking window.

Parameters
settingsThe target settings object.
parentThe parent widget.
flagsFlags for the window manager.

Member Function Documentation

◆ closeEvent()

void HorizontalDock::closeEvent ( QCloseEvent *  event)
protected

Don't close the dock, just hide it.

Parameters
eventThe close event that should be handled.

◆ formatSelected

void HorizontalDock::formatSelected ( int  index)
protectedslot

Called when the format combo box changes its value.

Parameters
indexThe index of the combo box item.

◆ frequencybaseSelected

void HorizontalDock::frequencybaseSelected ( double  frequencybase)
protectedslot

Called when the frequencybase spinbox changes its value.

Parameters
frequencybaseThe frequencybase in hertz.

◆ recordLengthSelected

void HorizontalDock::recordLengthSelected ( int  index)
protectedslot

Called when the record length combo box changes its value.

Parameters
indexThe index of the combo box item.

◆ samplerateSelected

void HorizontalDock::samplerateSelected ( double  samplerate)
protectedslot

Called when the samplerate spinbox changes its value.

Parameters
samplerateThe samplerate in samples/second.

◆ setAvailableRecordLengths()

void HorizontalDock::setAvailableRecordLengths ( const std::vector< unsigned > &  recordLengths)

Updates the available record lengths in the combo box.

Parameters
recordLengthsThe available record lengths for the combo box.

◆ setFormat()

int HorizontalDock::setFormat ( Dso::GraphFormat  format)

Changes the format if the new value is supported.

Parameters
formatThe format for the horizontal axis.
Returns
Index of format-value, -1 on error.

◆ setFrequencybase()

void HorizontalDock::setFrequencybase ( double  timebase)

Changes the frequencybase.

Parameters
frequencybaseThe frequencybase in hertz.

◆ setRecordLength()

void HorizontalDock::setRecordLength ( unsigned int  recordLength)

Changes the record length if the new value is supported.

Parameters
recordLengthThe record length in samples.

◆ setSamplerate()

void HorizontalDock::setSamplerate ( double  samplerate)

Changes the samplerate.

Parameters
samplerateThe samplerate in seconds.

◆ setSamplerateLimits()

void HorizontalDock::setSamplerateLimits ( double  minimum,
double  maximum 
)

Updates the minimum and maximum of the samplerate spin box.

Parameters
minimumThe minimum value the spin box should accept.
maximumThe minimum value the spin box should accept.

◆ setSamplerateSteps()

void HorizontalDock::setSamplerateSteps ( int  mode,
QList< double >  sampleSteps 
)

Updates the mode and steps of the samplerate spin box.

Parameters
modeThe mode value the spin box should accept.
stepsThe steps value the spin box should accept.

◆ setTimebase()

double HorizontalDock::setTimebase ( double  timebase)

Changes the timebase.

Parameters
timebaseThe timebase in seconds.

◆ timebaseSelected

void HorizontalDock::timebaseSelected ( double  timebase)
protectedslot

Called when the timebase spinbox changes its value.

Parameters
timebaseThe timebase in seconds.

Field Documentation

◆ formatComboBox

QComboBox* HorizontalDock::formatComboBox
protected

Selects the way the sampled data is interpreted and shown


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