]> sigrok.org Git - pulseview.git/blobdiff - pv/data/signalbase.hpp
MainWindow: Fix "main_window may be uninitialized" error
[pulseview.git] / pv / data / signalbase.hpp
index a682a56e1f52cadbb60a8a3a1dba9a80e2eacbc2..54d9ee0adc2d337a87e9b3195a5223099e46e4c6 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <QColor>
 #include <QObject>
+#include <QSettings>
 #include <QString>
 
 #include <libsigrokcxx/libsigrokcxx.hpp>
@@ -85,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.
         */
@@ -129,6 +135,10 @@ public:
                decoder_stack);
 #endif
 
+       void save_settings(QSettings &settings) const;
+
+       void restore_settings(QSettings &settings);
+
 Q_SIGNALS:
        void enabled_changed(const bool &value);
 
@@ -144,7 +154,7 @@ private:
        std::shared_ptr<pv::data::DecoderStack> decoder_stack_;
 #endif
 
-       QString name_;
+       QString internal_name_, name_;
        QColor colour_, bgcolour_;
 };