X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fglobalsettings.hpp;h=b2b3626ed05febc0e7c7b51c9491a75aa826a496;hb=28ceff251c776bcf99eafae691e70a521af15957;hp=ba0e28032b18ea995feab78928ede7f334995ad6;hpb=87a97d8aa169936ec2dcd229df88b8c5b4a1411c;p=pulseview.git diff --git a/pv/globalsettings.hpp b/pv/globalsettings.hpp index ba0e280..b2b3626 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 @@ -35,14 +39,20 @@ class GlobalSettings : public QSettings public: static const QString Key_View_AlwaysZoomToFit; + 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); @@ -65,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