summaryrefslogtreecommitdiff
path: root/src/settings.h
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2020-12-28 14:25:47 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-02 15:38:15 +0100
commit9db6a9d7931edbb08e74cd1e110794f47d46df3e (patch)
treee060bb6ed23a12796ed5c883661aad2501cb56e4 /src/settings.h
parent4636d7bd5d092ff47146248232cd73c8d0254d7a (diff)
Save collapse state of separator.
Diffstat (limited to 'src/settings.h')
-rw-r--r--src/settings.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/settings.h b/src/settings.h
index 4d1258bf..3f60fc7b 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -202,6 +202,12 @@ public:
//
WidgetSettings(QSettings& s, bool globalInstance);
+ // tree state - this saves the list of expanded items based on the given role
+ //
+ std::vector<QModelIndex> allIndex(const QAbstractItemModel* model, int column = 0, const QModelIndex& parent = QModelIndex()) const;
+ void saveTreeState(const QTreeView* tv, int role = Qt::DisplayRole);
+ void restoreTreeState(QTreeView* tv, int role = Qt::DisplayRole) const;
+
// selected index for a combobox
//
std::optional<int> index(const QComboBox* cb) const;