]> sigrok.org Git - pulseview.git/blobdiff - pv/data/signalbase.hpp
MainWindow: Use regular pointer for QDockWidgets
[pulseview.git] / pv / data / signalbase.hpp
index ca3cd5c47c8b0489490c65a66905cc0c000c3a47..54d9ee0adc2d337a87e9b3195a5223099e46e4c6 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <QColor>
 #include <QObject>
+#include <QSettings>
 #include <QString>
 
 #include <libsigrokcxx/libsigrokcxx.hpp>
@@ -38,6 +39,7 @@ namespace pv {
 namespace data {
 
 class Analog;
+class DecoderStack;
 class Logic;
 class SignalData;
 
@@ -84,6 +86,11 @@ public:
         */
        QString name() const;
 
+       /**
+        * Gets the internal name of this signal, i.e. how the device calls it.
+        */
+       QString internal_name() const;
+
        /**
         * Sets the name of the signal.
         */
@@ -119,6 +126,18 @@ public:
         */
        std::shared_ptr<pv::data::Logic> logic_data() const;
 
+#ifdef ENABLE_DECODE
+       bool is_decode_signal() const;
+
+       std::shared_ptr<pv::data::DecoderStack> decoder_stack() const;
+
+       void set_decoder_stack(std::shared_ptr<pv::data::DecoderStack>
+               decoder_stack);
+#endif
+
+       void save_settings(QSettings &settings) const;
+
+       void restore_settings(QSettings &settings);
 
 Q_SIGNALS:
        void enabled_changed(const bool &value);
@@ -131,7 +150,11 @@ private:
        std::shared_ptr<sigrok::Channel> channel_;
        std::shared_ptr<pv::data::SignalData> data_;
 
-       QString name_;
+#ifdef ENABLE_DECODE
+       std::shared_ptr<pv::data::DecoderStack> decoder_stack_;
+#endif
+
+       QString internal_name_, name_;
        QColor colour_, bgcolour_;
 };