OpenCurves  0.9
bookmarks.h
1 //
2 // author Kazys Stepanas
3 //
4 // Copyright (c) CSIRO 2015
5 //
6 #ifndef BOOKMARKS_H_
7 #define BOOKMARKS_H_
8 
9 #include "ocurvesconfig.h"
10 
11 #include <QStringList>
12 
13 #include "curves.h"
14 
15 class OCurvesUI;
16 class QSettings;
17 
20 namespace bookmarks
21 {
43  void setBookmark(QSettings &settings, unsigned id, const QString &name, OCurvesUI *ui, bool includeInactiveSources = false);
44 
46  void setBookmark(QSettings &settings, unsigned id, OCurvesUI *ui, bool includeInactiveSources = false);
47 
74  bool restoreBookmak(QSettings &settings, unsigned id, OCurvesUI *ui, VariantMap *curveDataMap = nullptr);
75 
80  bool clearBookmark(QSettings &settings, unsigned id);
81 
85  bool exists(QSettings &settings, unsigned id);
86 
93  bool name(QString &name, QSettings &settings, unsigned id);
94 
97  void migrate(QSettings &to, QSettings &from, int bookmarkCount);
98 };
99 
100 #endif // BOOKMARKS_H_
The main Open Curves UI window.
Definition: ocurvesui.h:63
void migrate(QSettings &to, QSettings &from, int bookmarkCount)
Migrate bookmark settings from from to to.
bool restoreBookmak(QSettings &settings, unsigned id, OCurvesUI *ui, VariantMap *curveDataMap=nullptr)
Attempts to restore a bookmark.
bool clearBookmark(QSettings &settings, unsigned id)
Clears a bookmark.
bool name(QString &name, QSettings &settings, unsigned id)
Fetch the name of a bookmark if it exists.
bool exists(QSettings &settings, unsigned id)
Check if bookmark with the given ID exists and is set.
void setBookmark(QSettings &settings, unsigned id, const QString &name, OCurvesUI *ui, bool includeInactiveSources=false)
Bookmark the current OCurvesUI state.
Utility functions dealing with the bookmarking system.
Definition: bookmarks.h:20