OpenHantek
VoltageDock Class Reference

Dock window for the voltage channel settings. It contains the settings for gain and coupling for both channels and allows to enable/disable the channels. More...

#include <VoltageDock.h>

Inheritance diagram for VoltageDock:

Data Structures

struct  ChannelBlock
 

Public Slots

void loadSettings (DsoSettingsScope *scope, const Dso::ControlSpecification *spec)
 Loads settings into GUI. More...
 

Signals

void couplingChanged (ChannelID channel, Dso::Coupling coupling)
 A coupling has been selected. More...
 
void gainChanged (ChannelID channel, double gain)
 A gain has been selected. More...
 
void modeChanged (Dso::MathMode mode)
 The mode for the math channels has been changed. More...
 
void usedChanged (ChannelID channel, bool used)
 A channel has been enabled/disabled. More...
 
void probeAttnChanged (ChannelID channel, double probeAttn)
 A channel probe attenuation has been changed. More...
 
void invertedChanged (ChannelID channel, bool inverted)
 A channel "inverted" has been toggled. More...
 

Public Member Functions

 VoltageDock (DsoSettingsScope *scope, const Dso::ControlSpecification *spec, QWidget *parent, Qt::WindowFlags flags=nullptr)
 Initializes the vertical axis docking window. More...
 
void setCoupling (ChannelID channel, unsigned couplingIndex)
 Sets the coupling for a channel. More...
 
void setGain (ChannelID channel, unsigned gainStepIndex)
 Sets the gain for a channel. More...
 
void setAttn (ChannelID channel, double attnValue)
 Sets the probe attenuation for a channel. More...
 
void setMode (unsigned mathModeIndex)
 Sets the mode for the math channel. More...
 
void setUsed (ChannelID channel, bool used)
 Enables/disables a channel. More...
 
void setInverted (ChannelID channel, bool inverted)
 Set channel inverted. 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...
 
std::vector< ChannelBlockchannelBlocks
 
DsoSettingsScopescope
 The settings provided by the parent class. More...
 
const Dso::ControlSpecificationspec
 
QStringList couplingStrings
 The strings for the couplings. More...
 
QStringList modeStrings
 The strings for the math mode. More...
 
QStringList gainStrings
 String representations for the gain steps. More...
 
QStringList attnStrings
 String representations for the probe attn steps. More...
 

Detailed Description

Dock window for the voltage channel settings. It contains the settings for gain and coupling for both channels and allows to enable/disable the channels.

Constructor & Destructor Documentation

◆ VoltageDock()

VoltageDock::VoltageDock ( DsoSettingsScope scope,
const Dso::ControlSpecification spec,
QWidget *  parent,
Qt::WindowFlags  flags = nullptr 
)

Initializes the vertical axis docking window.

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

Member Function Documentation

◆ closeEvent()

void VoltageDock::closeEvent ( QCloseEvent *  event)
protected

Don't close the dock, just hide it.

Parameters
eventThe close event that should be handled.

◆ couplingChanged

void VoltageDock::couplingChanged ( ChannelID  channel,
Dso::Coupling  coupling 
)
signal

A coupling has been selected.

◆ gainChanged

void VoltageDock::gainChanged ( ChannelID  channel,
double  gain 
)
signal

A gain has been selected.

◆ invertedChanged

void VoltageDock::invertedChanged ( ChannelID  channel,
bool  inverted 
)
signal

A channel "inverted" has been toggled.

◆ loadSettings

void VoltageDock::loadSettings ( DsoSettingsScope scope,
const Dso::ControlSpecification spec 
)
slot

Loads settings into GUI.

Parameters
scopeSettings to load
specCurrent scope specifications

◆ modeChanged

void VoltageDock::modeChanged ( Dso::MathMode  mode)
signal

The mode for the math channels has been changed.

◆ probeAttnChanged

void VoltageDock::probeAttnChanged ( ChannelID  channel,
double  probeAttn 
)
signal

A channel probe attenuation has been changed.

◆ setAttn()

void VoltageDock::setAttn ( ChannelID  channel,
double  attnValue 
)

Sets the probe attenuation for a channel.

Parameters
channelThe channel, whose attn should be set.
attnThe attn value.

◆ setCoupling()

void VoltageDock::setCoupling ( ChannelID  channel,
unsigned  couplingIndex 
)

Sets the coupling for a channel.

Parameters
channelThe channel, whose coupling should be set.
couplingIndexThe coupling-mode index.

◆ setGain()

void VoltageDock::setGain ( ChannelID  channel,
unsigned  gainStepIndex 
)

Sets the gain for a channel.

Parameters
channelThe channel, whose gain should be set.
gainThe gain in volts.

◆ setInverted()

void VoltageDock::setInverted ( ChannelID  channel,
bool  inverted 
)

Set channel inverted.

Parameters
channelThe channel, that should be inverted.
usedTrue if the channel should be inverted, false otherwise.

◆ setMode()

void VoltageDock::setMode ( unsigned  mathModeIndex)

Sets the mode for the math channel.

Parameters
mathModeIndexThe math-mode index.

◆ setUsed()

void VoltageDock::setUsed ( ChannelID  channel,
bool  used 
)

Enables/disables a channel.

Parameters
channelThe channel, that should be enabled/disabled.
usedTrue if the channel should be enabled, false otherwise.

◆ usedChanged

void VoltageDock::usedChanged ( ChannelID  channel,
bool  used 
)
signal

A channel has been enabled/disabled.

Field Documentation

◆ attnStrings

QStringList VoltageDock::attnStrings
protected

String representations for the probe attn steps.

◆ channelBlocks

std::vector<ChannelBlock> VoltageDock::channelBlocks
protected

◆ couplingStrings

QStringList VoltageDock::couplingStrings
protected

The strings for the couplings.

◆ dockLayout

QGridLayout* VoltageDock::dockLayout
protected

The main layout for the dock window.

◆ dockWidget

QWidget* VoltageDock::dockWidget
protected

The main widget for the dock window.

◆ gainStrings

QStringList VoltageDock::gainStrings
protected

String representations for the gain steps.

◆ modeStrings

QStringList VoltageDock::modeStrings
protected

The strings for the math mode.

◆ scope

DsoSettingsScope* VoltageDock::scope
protected

The settings provided by the parent class.

◆ spec

const Dso::ControlSpecification* VoltageDock::spec
protected

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