X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fglobalsettings.hpp;h=d23bf637153a093b277671aad684d506ec31a561;hp=4f07955adb35200d9130f654f71894744cfacd54;hb=46ebcd3f6f85092a9eb6401f6f56cee8fa08131a;hpb=fb64180193664005567570724d52b685913e15ed diff --git a/pv/globalsettings.hpp b/pv/globalsettings.hpp index 4f07955a..d23bf637 100644 --- a/pv/globalsettings.hpp +++ b/pv/globalsettings.hpp @@ -25,15 +25,20 @@ #include #include +#include #include #include #include using std::map; +using std::pair; using std::vector; namespace pv { +extern const vector< pair > Themes; + + class GlobalSettingsInterface { public: @@ -46,12 +51,15 @@ class GlobalSettings : public QSettings Q_OBJECT public: + static const QString Key_General_Theme; static const QString Key_View_ZoomToFitDuringAcq; static const QString Key_View_ZoomToFitAfterAcq; static const QString Key_View_TriggerIsZeroTime; static const QString Key_View_ColoredBG; static const QString Key_View_StickyScrolling; static const QString Key_View_ShowSamplingPoints; + static const QString Key_View_FillSignalHighAreas; + static const QString Key_View_FillSignalHighAreaColor; static const QString Key_View_ShowAnalogMinorGrid; static const QString Key_View_ConversionThresholdDispMode; static const QString Key_View_DefaultDivHeight; @@ -74,6 +82,9 @@ public: void set_defaults_where_needed(); + void save_default_palette(); + void apply_theme(); + static void add_change_handler(GlobalSettingsInterface *cb); static void remove_change_handler(GlobalSettingsInterface *cb); @@ -110,6 +121,8 @@ private: static bool tracking_; static map tracked_changes_; + + static QPalette default_palette_; }; } // namespace pv