Use configured resolution for login/outgame/ingame
[ryzomcore.git] / ryzom / tools / client / ryzom_installer / src / profilesmodel.h
blobb7fe64185036d78565a1d919b55aedb04b22be0d
1 #ifndef PROFILESMODEL_H
2 #define PROFILESMODEL_H
4 #include "configfile.h"
6 /**
7 * Profiles model
9 * \author Cedric 'Kervala' OCHS
10 * \date 2016
12 class CProfilesModel : public QAbstractListModel
14 Q_OBJECT
16 public:
17 CProfilesModel(QObject *parent);
18 CProfilesModel(const CProfiles &profiles, QObject *parent);
19 virtual ~CProfilesModel();
21 virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
22 virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
24 bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex());
25 bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex());
27 CProfiles& getProfiles() { return m_profiles; }
29 bool save() const;
31 int getIndexFromProfileID(const QString &profileId) const;
32 QString getProfileIDFromIndex(int index) const;
34 private:
35 CProfiles m_profiles;
38 #endif