X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fglobalsettings.hpp;h=eb964fa2c677b802fe077e2da34de722328d6328;hp=9581e294ba658518e393f7e5966324e9a92f3433;hb=88870fffb650365d2ece97e41981ad78fec06600;hpb=2cca9ebfdc367aa8e4651cf063f0cdea8fccb798 diff --git a/pv/globalsettings.hpp b/pv/globalsettings.hpp index 9581e294..eb964fa2 100644 --- a/pv/globalsettings.hpp +++ b/pv/globalsettings.hpp @@ -27,6 +27,10 @@ #include #include +using std::function; +using std::map; +using std::multimap; + namespace pv { class GlobalSettings : public QSettings @@ -34,14 +38,21 @@ class GlobalSettings : public QSettings Q_OBJECT public: - static const QString Key_View_AlwaysZoomToFit; + static const QString Key_View_ZoomToFitDuringAcq; + static const QString Key_View_ZoomToFitAfterAcq; static const QString Key_View_ColouredBG; + static const QString Key_View_StickyScrolling; + static const QString Key_View_ShowSamplingPoints; + static const QString Key_View_ShowAnalogMinorGrid; + static const QString Key_Dec_InitialStateConfigurable; public: GlobalSettings(); + void set_defaults_where_needed(); + static void register_change_handler(const QString key, - std::function cb); + function cb); void setValue(const QString& key, const QVariant& value); @@ -64,10 +75,10 @@ public: void undo_tracked_changes(); private: - static std::multimap< QString, std::function > callbacks_; + static multimap< QString, function > callbacks_; static bool tracking_; - static std::map tracked_changes_; + static map tracked_changes_; }; } // namespace pv