OpenHantek
Data Structures | Signals | Public Member Functions | Protected Member Functions | Protected Attributes
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
 

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 usedChanged (ChannelID channel, bool used)
 A channel has been enabled/disabled.
 

Public Member Functions

 VoltageDock (DsoSettingsScope *scope, const Dso::ControlSpecification *spec, QWidget *parent, Qt::WindowFlags flags=0)
 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 setMode (unsigned mathModeIndex)
 Sets the mode for the math channel. More...
 
void setUsed (ChannelID channel, bool used)
 Enables/disables a channel. 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.
 
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.
 

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

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.

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

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

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