Commit 600b1dcf4d5682182520f62d17eb90560cd3b69b

Authored by David Graeff
Committed by David Gräff
1 parent c9da580c

Register std::vector<unsigned> to the Qt metadata system to make it work with si…

…gnal/slots. Fixes #101
openhantek/src/docks/HorizontalDock.h
... ... @@ -5,6 +5,7 @@
5 5 #include <QDockWidget>
6 6 #include <QGridLayout>
7 7  
  8 +#include <vector>
8 9 #include "definitions.h"
9 10 #include "settings.h"
10 11  
... ... @@ -14,8 +15,8 @@ class QComboBox;
14 15  
15 16 class SiSpinBox;
16 17  
17   -////////////////////////////////////////////////////////////////////////////////
18   -/// \class HorizontalDock dockwindows.h
  18 +Q_DECLARE_METATYPE(std::vector<unsigned>)
  19 +
19 20 /// \brief Dock window for the horizontal axis.
20 21 /// It contains the settings for the timebase and the display format.
21 22 class HorizontalDock : public QDockWidget {
... ...
openhantek/src/docks/SpectrumDock.cpp
... ... @@ -64,9 +64,6 @@ SpectrumDock::SpectrumDock(DsoSettings *settings, QWidget *parent, Qt::WindowFla
64 64 }
65 65 }
66 66  
67   -/// \brief Cleans up everything.
68   -SpectrumDock::~SpectrumDock() {}
69   -
70 67 /// \brief Don't close the dock, just hide it
71 68 /// \param event The close event that should be handled.
72 69 void SpectrumDock::closeEvent(QCloseEvent *event) {
... ...
openhantek/src/docks/SpectrumDock.h
... ... @@ -14,8 +14,6 @@ class QComboBox;
14 14  
15 15 class SiSpinBox;
16 16  
17   -////////////////////////////////////////////////////////////////////////////////
18   -/// \class SpectrumDock dockwindows.h
19 17 /// \brief Dock window for the spectrum view.
20 18 /// It contains the magnitude for all channels and allows to enable/disable the
21 19 /// channels.
... ... @@ -24,7 +22,6 @@ class SpectrumDock : public QDockWidget {
24 22  
25 23 public:
26 24 SpectrumDock(DsoSettings *settings, QWidget *parent, Qt::WindowFlags flags = 0);
27   - ~SpectrumDock();
28 25  
29 26 int setMagnitude(int channel, double magnitude);
30 27 int setUsed(int channel, bool used);
... ...
openhantek/src/docks/TriggerDock.cpp
... ... @@ -72,9 +72,6 @@ TriggerDock::TriggerDock(DsoSettings *settings, const QStringList *specialTrigge
72 72 this->setSource(settings->scope.trigger.special, settings->scope.trigger.source);
73 73 }
74 74  
75   -/// \brief Cleans up everything.
76   -TriggerDock::~TriggerDock() {}
77   -
78 75 /// \brief Don't close the dock, just hide it
79 76 /// \param event The close event that should be handled.
80 77 void TriggerDock::closeEvent(QCloseEvent *event) {
... ...
openhantek/src/docks/TriggerDock.h
... ... @@ -14,8 +14,6 @@ class QComboBox;
14 14  
15 15 class SiSpinBox;
16 16  
17   -////////////////////////////////////////////////////////////////////////////////
18   -/// \class TriggerDock dockwindows.h
19 17 /// \brief Dock window for the trigger settings.
20 18 /// It contains the settings for the trigger mode, source and slope.
21 19 class TriggerDock : public QDockWidget {
... ... @@ -23,7 +21,6 @@ class TriggerDock : public QDockWidget {
23 21  
24 22 public:
25 23 TriggerDock(DsoSettings *settings, const QStringList *specialTriggers, QWidget *parent, Qt::WindowFlags flags = 0);
26   - ~TriggerDock();
27 24  
28 25 int setMode(Dso::TriggerMode mode);
29 26 int setSource(bool special, unsigned int id);
... ...
openhantek/src/docks/VoltageDock.cpp
... ... @@ -84,9 +84,6 @@ VoltageDock::VoltageDock(DsoSettings *settings, QWidget *parent, Qt::WindowFlags
84 84 }
85 85 }
86 86  
87   -/// \brief Cleans up everything.
88   -VoltageDock::~VoltageDock() {}
89   -
90 87 /// \brief Don't close the dock, just hide it
91 88 /// \param event The close event that should be handled.
92 89 void VoltageDock::closeEvent(QCloseEvent *event) {
... ...
openhantek/src/docks/VoltageDock.h
... ... @@ -14,8 +14,6 @@ class QComboBox;
14 14  
15 15 class SiSpinBox;
16 16  
17   -////////////////////////////////////////////////////////////////////////////////
18   -/// \class VoltageDock dockwindows.h
19 17 /// \brief Dock window for the voltage channel settings.
20 18 /// It contains the settings for gain and coupling for both channels and
21 19 /// allows to enable/disable the channels.
... ... @@ -24,7 +22,6 @@ class VoltageDock : public QDockWidget {
24 22  
25 23 public:
26 24 VoltageDock(DsoSettings *settings, QWidget *parent, Qt::WindowFlags flags = 0);
27   - ~VoltageDock();
28 25  
29 26 int setCoupling(int channel, Dso::Coupling coupling);
30 27 int setGain(int channel, double gain);
... ...
openhantek/src/docks/dockwindows.cpp
... ... @@ -28,4 +28,5 @@ void registerDockMetaTypes() {
28 28 qRegisterMetaType<Dso::ChannelMode>();
29 29 qRegisterMetaType<Dso::WindowFunction>();
30 30 qRegisterMetaType<Dso::InterpolationMode>();
  31 + qRegisterMetaType<std::vector<unsigned> >();
31 32 }
... ...