X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fglobalsettings.hpp;h=d8374a354ff432c3d2edbfff810e6fb909c3389c;hp=40dc1b3c5e94d0cda96e8078a7f166f45609b254;hb=374c697f74ba8abbfe2a014416eb398bb460d1c3;hpb=1931b5f932cf068d073bc798f11dd21ede5389a2 diff --git a/pv/globalsettings.hpp b/pv/globalsettings.hpp index 40dc1b3..d8374a3 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,18 +51,24 @@ class GlobalSettings : public QSettings Q_OBJECT public: + static const QString Key_General_Theme; + static const QString Key_General_Style; 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; static const QString Key_View_DefaultLogicHeight; static const QString Key_View_ShowHoverMarker; + static const QString Key_View_SnapDistance; static const QString Key_Dec_InitialStateConfigurable; + static const QString Key_Dec_ExportFormat; static const QString Key_Log_BufferSize; static const QString Key_Log_NotifyOfStacktrace; @@ -71,6 +82,9 @@ public: GlobalSettings(); void set_defaults_where_needed(); + void save_internal_defaults(); + + void apply_theme(); static void add_change_handler(GlobalSettingsInterface *cb); static void remove_change_handler(GlobalSettingsInterface *cb); @@ -108,6 +122,9 @@ private: static bool tracking_; static map tracked_changes_; + + static QString default_style_; + static QPalette default_palette_; }; } // namespace pv