OpenHantek
enums.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: GPL-2.0+
2 
3 #pragma once
4 
5 #include "utils/enumclass.h"
6 #include <QMetaType>
7 #include <QString>
8 namespace Dso {
11 enum class ChannelMode {
12  Voltage,
13  Spectrum
14 };
15 
19  TY,
20  XY
21 };
22 
24 
27 enum class Coupling {
28  DC,
29  AC,
30  GND
31 };
32 
35 enum class TriggerMode {
36  ROLL,
37  AUTO,
38  NORMAL,
39  SINGLE
40 }; // <class T, T first, T last>
42 
45 enum class Slope : uint8_t {
46  Positive = 0,
47  Negative = 1,
48  Both = 2
49 };
51 
60 };
61 
64 enum Themes {
65  THEME_AUTO = 0,
68 };
69 
70 // QString channelModeString(ChannelMode mode);
71 QString graphFormatString( GraphFormat format );
72 QString couplingString( Coupling coupling );
73 QString triggerModeString( TriggerMode mode );
74 QString slopeString( Slope slope );
75 // QString interpolationModeString(InterpolationMode interpolation);
76 } // namespace Dso
77 
78 Q_DECLARE_METATYPE( Dso::TriggerMode )
79 Q_DECLARE_METATYPE( Dso::Slope )
80 Q_DECLARE_METATYPE( Dso::Coupling )
81 Q_DECLARE_METATYPE( Dso::GraphFormat )
82 Q_DECLARE_METATYPE( Dso::ChannelMode )
83 Q_DECLARE_METATYPE( Dso::InterpolationMode )
Enum< Dso::Slope, Dso::Slope::Positive, Dso::Slope::Both > SlopeEnum
Definition: enums.cpp:8
CH1 on X-axis, CH2 on Y-axis.
Definition: enums.h:20
Offset filtered out by capacitor.
Sample dots connected by straight lines.
Definition: enums.h:56
Enum< Dso::TriggerMode, Dso::TriggerMode::ROLL, Dso::TriggerMode::SINGLE > TriggerModeEnum
Definition: enums.cpp:7
Slope
The slope that causes a trigger.
Definition: enums.h:45
InterpolationMode
The different interpolation modes for the graphs.
Definition: enums.h:54
QString couplingString(Coupling coupling)
Return string representation of the given channel coupling.
Definition: enums.cpp:27
From higher to lower voltage.
Coupling
The coupling modes for the channels.
Definition: enums.h:27
Just dots for each sample.
Definition: enums.h:55
Total number of interpolation modes.
Definition: enums.h:59
QString slopeString(Slope slope)
Return string representation of the given trigger slope.
Definition: enums.cpp:60
Standard voltage view.
TriggerMode
The different triggering modes.
Definition: enums.h:35
No filtering.
ChannelMode
The channel display modes.
Definition: enums.h:11
GraphFormat
The possible viewing formats for the graphs on the scope.
Definition: enums.h:18
The standard mode.
Definition: enums.h:19
Themes
The different themes for display.
Definition: enums.h:64
Force a dark theme.
Definition: enums.h:67
QString triggerModeString(TriggerMode mode)
Return string representation of the given trigger mode.
Definition: enums.cpp:43
Sample dots connected by one step.
Definition: enums.h:57
Use the system theme.
Definition: enums.h:65
From lower to higher voltage.
Normal hardware trigger (or software trigger) mode.
Definition: enumclass.h:5
Stop after the first trigger event.
Force a light theme.
Definition: enums.h:66
Automatic without trigger event.
Channel is grounded.
At 1st level crossing up or down.
Sample dots upsampled by bandlimited sinc.
Definition: enums.h:58
Enum< Dso::GraphFormat, Dso::GraphFormat::TY, Dso::GraphFormat::XY > GraphFormatEnum
Definition: enums.cpp:9
Free running without any trigger.
Definition: TriggerDock.h:15
QString graphFormatString(GraphFormat format)
Return string representation of the given graph format.
Definition: enums.cpp:14