OpenHantek
Loading...
Searching...
No Matches
mathmodes.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2
3#pragma once
4
5#include "utils/enumclass.h"
6#include "utils/printutils.h"
7
8#include <QMetaType>
9
10namespace Dso {
11
14enum class MathMode : unsigned {
15 // binary arithmetical functions
20 // binary logical functions
26 // unary arithmetical functions
31 SQ_CH1,
32 SQ_CH2,
33 AC_CH1,
34 AC_CH2,
35 DC_CH1,
36 DC_CH2,
37 ABS_CH1,
38 ABS_CH2,
43 // unary logical functions
46};
47// this "extern" declaration must match the Enum definition in "mathchannel.cpp"
49
52
54
55QString mathModeString( MathMode mode );
56
57unsigned mathChannelsUsed( MathMode mode );
58
59template < class T > inline MathMode getMathMode( T &t ) { return MathMode( t.couplingOrMathIndex ); }
60
61
62} // namespace Dso
63
64Q_DECLARE_METATYPE( Dso::MathMode )
Definition enumclass.h:5
Definition TriggerDock.h:15
const auto LastBinaryMathMode
Definition mathmodes.h:50
MathMode getMathMode(T &t)
Definition mathmodes.h:59
QString mathModeString(MathMode mode)
Return string representation of the given math mode.
Definition mathmodes.cpp:31
Enum< Dso::MathMode, Dso::MathMode::ADD_CH1_CH2, Dso::MathMode::TRIG_CH2 > MathModeEnum
Definition mathmodes.cpp:7
unsigned mathChannelsUsed(MathMode mode)
Definition mathmodes.cpp:21
MathMode
The different math modes for the math-channel.
Definition mathmodes.h:14
Unit mathModeUnit(MathMode mode)
Definition mathmodes.cpp:9
const auto LastMathMode
Definition mathmodes.h:51
Unit
The various units supported by valueToString.
Definition printutils.h:12