Improve group changing, update instance on version change

Gives a list of existing groups to choose from.
Instances are updated as long as there is at least one valid account.
This commit is contained in:
Petr Mrázek
2013-12-15 18:10:51 +01:00
parent 5a3043398e
commit dd9e04000c
7 changed files with 123 additions and 65 deletions

View File

@ -17,6 +17,7 @@
#include <QObject>
#include <QAbstractListModel>
#include <QSet>
#include "categorizedsortfilterproxymodel.h"
#include <QIcon>
@ -97,6 +98,9 @@ public:
InstancePtr getInstanceById(QString id) const;
QModelIndex getInstanceIndexById(const QString &id) const;
// FIXME: instead of iterating through all instances and forming a set, keep the set around
QStringList getGroups();
signals:
void dataIsInvalid();
@ -116,6 +120,7 @@ private:
protected:
QString m_instDir;
QList<InstancePtr> m_instances;
QSet<QString> m_groups;
};
class InstanceProxyModel : public KCategorizedSortFilterProxyModel