diff options
author | Petr Mrázek <peterix@gmail.com> | 2018-07-31 01:54:08 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2018-07-31 01:54:08 +0200 |
commit | 0c73ddee73e7383d5b81185381fa1c762fcb1147 (patch) | |
tree | 7193eb7bdd3e836ab8f150d3575d866bb2df3d9d /api/logic/InstanceList.h | |
parent | 9965decd81b8e8ca98d610f605263ccf4ce541e1 (diff) | |
download | MultiMC-0c73ddee73e7383d5b81185381fa1c762fcb1147.tar MultiMC-0c73ddee73e7383d5b81185381fa1c762fcb1147.tar.gz MultiMC-0c73ddee73e7383d5b81185381fa1c762fcb1147.tar.lz MultiMC-0c73ddee73e7383d5b81185381fa1c762fcb1147.tar.xz MultiMC-0c73ddee73e7383d5b81185381fa1c762fcb1147.zip |
NOISSUE set groups for instances by not setting groups for instances
So simple. Better in every way.
Diffstat (limited to 'api/logic/InstanceList.h')
-rw-r--r-- | api/logic/InstanceList.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/api/logic/InstanceList.h b/api/logic/InstanceList.h index a487a7ca..5b966b33 100644 --- a/api/logic/InstanceList.h +++ b/api/logic/InstanceList.h @@ -41,6 +41,13 @@ enum class InstCreateError CantCreateDir }; +enum class GroupsState +{ + NotLoaded, + Steady, + Dirty +}; + class MULTIMC_LOGIC_EXPORT InstanceList : public QAbstractListModel { @@ -90,6 +97,8 @@ public: InstancePtr getInstanceById(QString id) const; QModelIndex getInstanceIndexById(const QString &id) const; QStringList getGroups(); + GroupId getInstanceGroup(const InstanceId & id) const; + void setInstanceGroup(const InstanceId & id, const GroupId& name); void deleteGroup(const GroupId & name); void deleteInstance(const InstanceId & id); @@ -125,10 +134,8 @@ public slots: private slots: void propertiesChanged(BaseInstance *inst); - void groupsPublished(QSet<QString>); void providerUpdated(); void instanceDirContentsChanged(const QString &path); - void groupChanged(); private: int getInstIndex(BaseInstance *inst) const; @@ -149,7 +156,7 @@ private: SettingsObjectPtr m_globalSettings; QString m_instDir; QFileSystemWatcher * m_watcher; - QMap<InstanceId, GroupId> groupMap; + QMap<InstanceId, GroupId> m_groupMap; QSet<InstanceId> instanceSet; bool m_groupsLoaded = false; bool m_instancesProbed = false; |