X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fglobalsettings.hpp;h=ba0e28032b18ea995feab78928ede7f334995ad6;hb=87a97d8aa169936ec2dcd229df88b8c5b4a1411c;hp=b7457963da88e462cdaa1a2e8202f5ae2a919fb0;hpb=bf9f12687c8d43422455cbdc27ec1cc5d4305149;p=pulseview.git diff --git a/pv/globalsettings.hpp b/pv/globalsettings.hpp index b745796..ba0e280 100644 --- a/pv/globalsettings.hpp +++ b/pv/globalsettings.hpp @@ -36,6 +36,7 @@ class GlobalSettings : public QSettings public: static const QString Key_View_AlwaysZoomToFit; static const QString Key_View_ColouredBG; + static const QString Key_View_StickyScrolling; public: GlobalSettings(); @@ -45,8 +46,29 @@ public: void setValue(const QString& key, const QVariant& value); + /** + * Begins the tracking of changes. All changes will + * be recorded until stop_tracking() is called. + * The change tracking is global and doesn't support nesting. + */ + void start_tracking(); + + /** + * Ends the tracking of changes without any changes to the settings. + */ + void stop_tracking(); + + /** + * Ends the tracking of changes, undoing the changes since the + * change tracking began. + */ + void undo_tracked_changes(); + private: static std::multimap< QString, std::function > callbacks_; + + static bool tracking_; + static std::map tracked_changes_; }; } // namespace pv