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  AUTO,
37  NORMAL,
38  SINGLE
39 }; // <class T, T first, T last>
41 
44 enum class Slope : uint8_t {
45  Positive = 0,
46  Negative = 1,
47  Both = 2
48 };
50 
57 };
58 
59 // QString channelModeString(ChannelMode mode);
60 QString graphFormatString(GraphFormat format);
61 QString couplingString(Coupling coupling);
62 QString triggerModeString(TriggerMode mode);
63 QString slopeString(Slope slope);
64 // QString interpolationModeString(InterpolationMode interpolation);
65 }
66 
67 Q_DECLARE_METATYPE(Dso::TriggerMode)
68 Q_DECLARE_METATYPE(Dso::Slope)
69 Q_DECLARE_METATYPE(Dso::Coupling)
70 Q_DECLARE_METATYPE(Dso::GraphFormat)
71 Q_DECLARE_METATYPE(Dso::ChannelMode)
72 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 lines.
Definition: enums.h:55
Slope
The slope that causes a trigger.
Definition: enums.h:44
InterpolationMode
The different interpolation modes for the graphs.
Definition: enums.h:53
QString couplingString(Coupling coupling)
Return string representation of the given channel coupling.
Definition: enums.cpp:42
From higher to lower voltage.
Coupling
The coupling modes for the channels.
Definition: enums.h:27
Just dots for each sample.
Definition: enums.h:54
Total number of interpolation modes.
Definition: enums.h:56
QString slopeString(Slope slope)
Return string representation of the given trigger slope.
Definition: enums.cpp:73
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
QString triggerModeString(TriggerMode mode)
Return string representation of the given trigger mode.
Definition: enums.cpp:58
From lower to higher voltage.
Normal hardware trigger (or software trigger) mode.
Definition: enumclass.h:6
Stop after the first trigger event.
Automatic without trigger event.
Channel is grounded.
Enum< Dso::TriggerMode, Dso::TriggerMode::AUTO, Dso::TriggerMode::SINGLE > TriggerModeEnum
Definition: enums.cpp:7
At 1st level crossing up or down.
Enum< Dso::GraphFormat, Dso::GraphFormat::TY, Dso::GraphFormat::XY > GraphFormatEnum
Definition: enums.cpp:9
Definition: TriggerDock.h:15
QString graphFormatString(GraphFormat format)
Return string representation of the given graph format.
Definition: enums.cpp:29