OpenHantek
Data Structures | Signals | Public Member Functions | Protected Member Functions | Protected Attributes
SpectrumDock Class Reference

Dock window for the spectrum view. It contains the magnitude for all channels and allows to enable/disable the channels. More...

#include <SpectrumDock.h>

Inheritance diagram for SpectrumDock:

Data Structures

struct  ChannelBlock
 

Signals

void magnitudeChanged (ChannelID channel, double magnitude)
 A magnitude has been selected.
 
void usedChanged (ChannelID channel, bool used)
 A spectrum has been enabled/disabled.
 

Public Member Functions

 SpectrumDock (DsoSettingsScope *scope, QWidget *parent, Qt::WindowFlags flags=0)
 Initializes the spectrum view docking window. More...
 
int setMagnitude (ChannelID channel, double magnitude)
 Sets the magnitude for a channel. More...
 
unsigned 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.
 
std::vector< double > magnitudeSteps
 The selectable magnitude steps in dB/div.
 
QStringList magnitudeStrings
 String representations for the magnitude steps.
 

Detailed Description

Dock window for the spectrum view. It contains the magnitude for all channels and allows to enable/disable the channels.

Constructor & Destructor Documentation

◆ SpectrumDock()

SpectrumDock::SpectrumDock ( DsoSettingsScope scope,
QWidget *  parent,
Qt::WindowFlags  flags = 0 
)

Initializes the spectrum view docking window.

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

Member Function Documentation

◆ closeEvent()

void SpectrumDock::closeEvent ( QCloseEvent *  event)
protected

Don't close the dock, just hide it.

Parameters
eventThe close event that should be handled.

◆ setMagnitude()

int SpectrumDock::setMagnitude ( ChannelID  channel,
double  magnitude 
)

Sets the magnitude for a channel.

Parameters
channelThe channel, whose magnitude should be set.
magnitudeThe magnitude in dB.
Returns
Index of magnitude-value, -1 on error.

◆ setUsed()

unsigned SpectrumDock::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.
Returns
Index of channel, INT_MAX on error.

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