OpenHantek
Loading...
Searching...
No Matches
TriggerDock.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2
3#pragma once
4
5#include <QCheckBox>
6#include <QComboBox>
7#include <QDockWidget>
8#include <QGridLayout>
9#include <QLabel>
10
11#include "hantekdso/enums.h"
12
13class SiSpinBox;
14struct DsoSettingsScope;
15namespace Dso {
17}
18
21class TriggerDock : public QDockWidget {
22 Q_OBJECT
23
24 public:
31
34 void setMode( Dso::TriggerMode mode );
35
38 void setSource( int id );
39
42 void setSmooth( int smooth );
43
46 void setSlope( Dso::Slope slope );
47
48 public slots:
52 void timebaseChanged( double timebase );
53
54 protected:
55 void closeEvent( QCloseEvent *event ) override;
56
57 QGridLayout *dockLayout;
58 QWidget *dockWidget;
59 QLabel *modeLabel;
60 QLabel *sourceLabel;
61 QLabel *slopeLabel;
62 QComboBox *modeComboBox;
63 QComboBox *sourceComboBox;
64 QComboBox *smoothComboBox;
65 QComboBox *slopeComboBox;
66
69
72
73 signals:
75 void sourceChanged( int id );
76 void smoothChanged( int smooth );
78};
A spin box with SI prefix support. This spin box supports the SI prefixes (k/M/G/T) after its value a...
Definition sispinbox.h:14
void loadSettings(DsoSettingsScope *scope)
Loads settings into GUI.
Definition TriggerDock.cpp:102
QGridLayout * dockLayout
The main layout for the dock window.
Definition TriggerDock.h:57
QComboBox * smoothComboBox
Select the filter for triggering.
Definition TriggerDock.h:64
QWidget * dockWidget
The main widget for the dock window.
Definition TriggerDock.h:58
QLabel * modeLabel
The label for the trigger mode combobox.
Definition TriggerDock.h:59
void smoothChanged(int smooth)
The trigger smoothing has been changed.
void closeEvent(QCloseEvent *event) override
Don't close the dock, just hide it.
Definition TriggerDock.cpp:129
QComboBox * slopeComboBox
Select the slope that causes triggering.
Definition TriggerDock.h:65
DsoSettingsScope * scope
The settings provided by the parent class.
Definition TriggerDock.h:67
QStringList sourceStandardStrings
Strings for the standard trigger sources.
Definition TriggerDock.h:70
QStringList smoothStandardStrings
Strings for the standard trigger filtering.
Definition TriggerDock.h:71
QLabel * sourceLabel
The label for the trigger source combobox.
Definition TriggerDock.h:60
QComboBox * modeComboBox
Select the triggering mode.
Definition TriggerDock.h:62
void setMode(Dso::TriggerMode mode)
Changes the trigger mode if the new mode is supported.
Definition TriggerDock.cpp:135
void slopeChanged(Dso::Slope)
The trigger slope has been changed.
void sourceChanged(int id)
The trigger source has been changed.
const Dso::ControlSpecification * mSpec
Definition TriggerDock.h:68
QLabel * slopeLabel
The label for the trigger slope combobox.
Definition TriggerDock.h:61
void setSmooth(int smooth)
Changes the trigger smoothing.
Definition TriggerDock.cpp:160
QComboBox * sourceComboBox
Select the source for triggering.
Definition TriggerDock.h:63
TriggerDock(DsoSettingsScope *scope, const Dso::ControlSpecification *mSpec, QWidget *parent)
Initializes the trigger settings docking window.
Definition TriggerDock.cpp:22
void timebaseChanged(double timebase)
Definition TriggerDock.cpp:115
void modeChanged(Dso::TriggerMode)
The trigger mode has been changed.
void setSlope(Dso::Slope slope)
Changes the trigger slope if the new slope is supported.
Definition TriggerDock.cpp:144
void setSource(int id)
Changes the trigger source if the new source is supported.
Definition TriggerDock.cpp:151
Definition TriggerDock.h:15
TriggerMode
The different triggering modes.
Definition enums.h:35
Slope
The slope that causes a trigger.
Definition enums.h:45
Holds the settings for the oscilloscope.
Definition scopesettings.h:100
Stores the specifications of the currently connected device.
Definition controlspecification.h:42