OpenHantek
Loading...
Searching...
No Matches
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.
void triggerModeChanged (Dso::TriggerMode mode)

Signals

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

Public Member Functions

 HorizontalDock (DsoSettingsScope *scope, const Dso::ControlSpecification *spec, QWidget *parent)
 Initializes the horizontal axis docking window.
double setSamplerate (double samplerate)
 Changes the samplerate.
double setTimebase (double timebase)
 Changes the timebase.
void setRecordLength (int recordLength)
 Changes the record length if the new value is supported.
int setFormat (Dso::GraphFormat format)
 Changes the format if the new value is supported.
void setSamplerateLimits (double minimum, double maximum)
 Updates the minimum and maximum of the samplerate spin box.
void setSamplerateSteps (int mode, QList< double > sampleSteps)
 Updates the mode and steps of the samplerate spin box.
void calculateSamplerateSteps (double timebase)
double setCalfreq (double calfreq)
 Changes the calibration frequency.

Protected Slots

void samplerateSelected (double samplerate)
 Called when the samplerate spinbox changes its value.
void timebaseSelected (double timebase)
 Called when the timebase spinbox changes its value.
void formatSelected (int index)
 Called when the format combo box changes its value.
void calfreqIndexSelected (int index)
 Called when the calfreq combobox changes its value.

Protected Member Functions

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

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 * formatLabel
 The label for the format combobox.
QLabel * calfreqLabel
 The label for the calibration frequency spinbox.
SiSpinBoxsamplerateSiSpinBox
 Selects the samplerate for acquisitions.
SiSpinBoxtimebaseSiSpinBox
 Selects the timebase for voltage graphs.
QComboBox * formatComboBox
QComboBox * calfreqComboBox
 Selects the calibration frequency.
DsoSettingsScopescope
 The settings provided by the parent class.
QList< double > timebaseSteps
 Steps for the timebase spinbox.
QList< double > calfreqSteps
 Steps for the calfreq spinbox.
QList< double > samplerateSteps
 Possible sampe rates.
QStringList formatStrings
 Strings for the formats.

Private Attributes

double samplerateRequest = 0

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,
const Dso::ControlSpecification * spec,
QWidget * parent )

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.

◆ calfreqIndexSelected

void HorizontalDock::calfreqIndexSelected ( int index)
protectedslot

Called when the calfreq combobox changes its value.

Parameters
indexThe item index.

◆ closeEvent()

void HorizontalDock::closeEvent ( QCloseEvent * event)
overrideprotected

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.

◆ loadSettings

void HorizontalDock::loadSettings ( DsoSettingsScope * scope)
slot

Loads settings into GUI.

Parameters
scopeSettings to load

◆ recordLengthChanged

void HorizontalDock::recordLengthChanged ( int 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.

◆ setRecordLength()

void HorizontalDock::setRecordLength ( 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
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.

◆ triggerModeChanged

void HorizontalDock::triggerModeChanged ( Dso::TriggerMode mode)
slot

Field Documentation

◆ calfreqComboBox

QComboBox* HorizontalDock::calfreqComboBox
protected

Selects the calibration frequency.

◆ calfreqLabel

QLabel* HorizontalDock::calfreqLabel
protected

The label for the calibration frequency spinbox.

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

◆ samplerateLabel

QLabel* HorizontalDock::samplerateLabel
protected

The label for the samplerate spinbox.

◆ samplerateRequest

double HorizontalDock::samplerateRequest = 0
private

◆ samplerateSiSpinBox

SiSpinBox* HorizontalDock::samplerateSiSpinBox
protected

Selects the samplerate for acquisitions.

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