diff options
author | Petr Mrázek <peterix@gmail.com> | 2019-08-20 02:58:27 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2019-08-20 02:58:27 +0200 |
commit | 1747f413b9d9a515d8ba6f583bba5985bad5636d (patch) | |
tree | 3b964f253d0f476fe89c1ff35e6f093cedf270b5 /api/logic/InstanceList.h | |
parent | 6d975748c0dd9ac89815fe5043c0d89b8e684bc7 (diff) | |
download | PrismLauncher-1747f413b9d9a515d8ba6f583bba5985bad5636d.tar.gz PrismLauncher-1747f413b9d9a515d8ba6f583bba5985bad5636d.tar.bz2 PrismLauncher-1747f413b9d9a515d8ba6f583bba5985bad5636d.zip |
GH-851 save, load and use group expansion status
Diffstat (limited to 'api/logic/InstanceList.h')
-rw-r--r-- | api/logic/InstanceList.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/api/logic/InstanceList.h b/api/logic/InstanceList.h index e0abd890..005a24cd 100644 --- a/api/logic/InstanceList.h +++ b/api/logic/InstanceList.h @@ -99,6 +99,8 @@ public: InstancePtr getInstanceById(QString id) const; QModelIndex getInstanceIndexById(const QString &id) const; QStringList getGroups(); + bool isGroupCollapsed(const QString &groupName); + GroupId getInstanceGroup(const InstanceId & id) const; void setInstanceGroup(const InstanceId & id, const GroupId& name); @@ -134,6 +136,7 @@ signals: public slots: void on_InstFolderChanged(const Setting &setting, QVariant value); + void on_GroupStateChanged(const QString &group, bool collapsed); private slots: void propertiesChanged(BaseInstance *inst); @@ -154,12 +157,14 @@ private: int m_watchLevel = 0; bool m_dirty = false; QList<InstancePtr> m_instances; - QSet<QString> m_groups; + QSet<QString> m_groupNameCache; SettingsObjectPtr m_globalSettings; QString m_instDir; QFileSystemWatcher * m_watcher; - QMap<InstanceId, GroupId> m_groupMap; + // FIXME: this is so inefficient that looking at it is almost painful. + QSet<QString> m_collapsedGroups; + QMap<InstanceId, GroupId> m_instanceGroupIndex; QSet<InstanceId> instanceSet; bool m_groupsLoaded = false; bool m_instancesProbed = false; |