OpenHantek
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:

Public Slots

void loadSettings (DsoSettingsScope *scope)
 Loads settings into GUI. More...
 

Signals

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

Public Member Functions

 HorizontalDock (DsoSettingsScope *scope, QWidget *parent, Qt::WindowFlags flags=nullptr)
 Initializes the horizontal axis docking window. More...
 
void setFrequencybase (double timebase)
 Changes the frequencybase. More...
 
double 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 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...
 
void calculateSamplerateSteps (double timebase)
 
double setCalfreq (double calfreq)
 Changes the calibration frequency. 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 formatSelected (int index)
 Called when the format combo box changes its value. More...
 
void calfreqSelected (double calfreq)
 Called when the calfreq spinbox 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. More...
 
QWidget * dockWidget
 The main widget for the dock window. More...
 
QLabel * samplerateLabel
 The label for the samplerate spinbox. More...
 
QLabel * timebaseLabel
 The label for the timebase spinbox. More...
 
QLabel * frequencybaseLabel
 The label for the frequencybase spinbox. More...
 
QLabel * formatLabel
 The label for the format combobox. More...
 
QLabel * calfreqLabel
 The label for the calibration frequency spinbox. More...
 
SiSpinBoxsamplerateSiSpinBox
 Selects the samplerate for aquisitions. More...
 
SiSpinBoxtimebaseSiSpinBox
 Selects the timebase for voltage graphs. More...
 
SiSpinBoxfrequencybaseSiSpinBox
 Selects the frequencybase for spectrum graphs. More...
 
QComboBox * formatComboBox
 
SiSpinBoxcalfreqSiSpinBox
 Selects the calibration frequency. More...
 
DsoSettingsScopescope
 The settings provided by the parent class. More...
 
QList< double > timebaseSteps
 Steps for the timebase spinbox. More...
 
QList< double > calfreqSteps
 Steps for the calfreq spinbox. More...
 
QList< double > samplerateSteps
 Possible sampe rates. More...
 
QStringList formatStrings
 Strings for the formats. More...
 

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 = nullptr 
)

Initializes the horizontal axis docking window.

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

Member Function Documentation

◆ calculateSamplerateSteps()

void HorizontalDock::calculateSamplerateSteps ( double  timebase)

◆ calfreqChanged

void HorizontalDock::calfreqChanged ( double  calfreq)
signal

The timebase has been changed.

◆ calfreqSelected

void HorizontalDock::calfreqSelected ( double  calfreq)
protectedslot

Called when the calfreq spinbox changes its value.

Parameters
calfreqThe calibration frequency in hertz.

◆ closeEvent()

void HorizontalDock::closeEvent ( QCloseEvent *  event)
protected

Don't close the dock, just hide it.

Parameters
eventThe close event that should be handled.

◆ formatChanged

void HorizontalDock::formatChanged ( Dso::GraphFormat  format)
signal

The viewing format has been changed.

◆ formatSelected

void HorizontalDock::formatSelected ( int  index)
protectedslot

Called when the format combo box changes its value.

Parameters
indexThe index of the combo box item.

◆ frequencybaseChanged

void HorizontalDock::frequencybaseChanged ( double  frequencybase)
signal

The frequencybase has been changed.

◆ frequencybaseSelected

void HorizontalDock::frequencybaseSelected ( double  frequencybase)
protectedslot

Called when the frequencybase spinbox changes its value.

Parameters
frequencybaseThe frequencybase in hertz.

◆ loadSettings

void HorizontalDock::loadSettings ( DsoSettingsScope scope)
slot

Loads settings into GUI.

Parameters
scopeSettings to load

◆ recordLengthChanged

void HorizontalDock::recordLengthChanged ( unsigned long  recordLength)
signal

The recordd length has been changed.

◆ samplerateChanged

void HorizontalDock::samplerateChanged ( double  samplerate)
signal

The samplerate has been changed.

◆ samplerateSelected

void HorizontalDock::samplerateSelected ( double  samplerate)
protectedslot

Called when the samplerate spinbox changes its value.

Parameters
samplerateThe samplerate in samples/second.

◆ setCalfreq()

double HorizontalDock::setCalfreq ( double  calfreq)

Changes the calibration frequency.

Parameters
calfreqThe calibration frequency in hertz.

◆ 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()

double 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.

◆ timebaseChanged

void HorizontalDock::timebaseChanged ( double  timebase)
signal

The timebase has been changed.

◆ timebaseSelected

void HorizontalDock::timebaseSelected ( double  timebase)
protectedslot

Called when the timebase spinbox changes its value.

Parameters
timebaseThe timebase in seconds.

Field Documentation

◆ calfreqLabel

QLabel* HorizontalDock::calfreqLabel
protected

The label for the calibration frequency spinbox.

◆ calfreqSiSpinBox

SiSpinBox* HorizontalDock::calfreqSiSpinBox
protected

Selects the calibration frequency.

◆ calfreqSteps

QList<double> HorizontalDock::calfreqSteps
protected

Steps for the calfreq spinbox.

◆ dockLayout

QGridLayout* HorizontalDock::dockLayout
protected

The main layout for the dock window.

◆ dockWidget

QWidget* HorizontalDock::dockWidget
protected

The main widget for the dock window.

◆ formatComboBox

QComboBox* HorizontalDock::formatComboBox
protected

Selects the way the sampled data is interpreted and shown

◆ formatLabel

QLabel* HorizontalDock::formatLabel
protected

The label for the format combobox.

◆ formatStrings

QStringList HorizontalDock::formatStrings
protected

Strings for the formats.

◆ frequencybaseLabel

QLabel* HorizontalDock::frequencybaseLabel
protected

The label for the frequencybase spinbox.

◆ frequencybaseSiSpinBox

SiSpinBox* HorizontalDock::frequencybaseSiSpinBox
protected

Selects the frequencybase for spectrum graphs.

◆ samplerateLabel

QLabel* HorizontalDock::samplerateLabel
protected

The label for the samplerate spinbox.

◆ samplerateSiSpinBox

SiSpinBox* HorizontalDock::samplerateSiSpinBox
protected

Selects the samplerate for aquisitions.

◆ samplerateSteps

QList<double> HorizontalDock::samplerateSteps
protected

Possible sampe rates.

◆ scope

DsoSettingsScope* HorizontalDock::scope
protected

The settings provided by the parent class.

◆ timebaseLabel

QLabel* HorizontalDock::timebaseLabel
protected

The label for the timebase spinbox.

◆ timebaseSiSpinBox

SiSpinBox* HorizontalDock::timebaseSiSpinBox
protected

Selects the timebase for voltage graphs.

◆ timebaseSteps

QList<double> HorizontalDock::timebaseSteps
protected

Steps for the timebase spinbox.


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