OpenHantek
Loading...
Searching...
No Matches
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.

Signals

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

Public Member Functions

 VoltageDock (DsoSettingsScope *scope, const Dso::ControlSpecification *spec, QWidget *parent)
 Initializes the vertical axis docking window.
void setCoupling (ChannelID channel, unsigned couplingIndex)
 Sets the coupling for a channel.
void setGain (ChannelID channel, unsigned gainStepIndex)
 Sets the gain for a channel.
void setAttn (ChannelID channel, double attnValue)
 Sets the probe attenuation for a channel.
void setMode (unsigned mathModeIndex)
 Sets the mode for the math channel.
void setUsed (ChannelID channel, bool used)
 Enables/disables a channel.
void setInverted (ChannelID channel, bool inverted)
 Set channel inverted.

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.
std::vector< ChannelBlockchannelBlocks
DsoSettingsScopescope
 The settings provided by the parent class.
const Dso::ControlSpecificationspec
QStringList couplingStrings
 The strings for the couplings.
QStringList modeStrings
 The strings for the math mode.
QStringList gainStrings
 String representations for the gain steps.
QStringList mathGainStrings
 String representations for the math gain steps.
QStringList attnStrings
 String representations for the probe attn steps.

Private Member Functions

void updateGainStrings (double attnValue=1)

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 )

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)
overrideprotected

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.

◆ updateGainStrings()

void VoltageDock::updateGainStrings ( double attnValue = 1)
private

◆ usedChannelChanged

void VoltageDock::usedChannelChanged ( ChannelID channel,
unsigned 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.

◆ mathGainStrings

QStringList VoltageDock::mathGainStrings
protected

String representations for the math 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: