1 #ifndef PROFILESMODEL_H
2 #define PROFILESMODEL_H
4 #include "configfile.h"
9 * \author Cedric 'Kervala' OCHS
12 class CProfilesModel
: public QAbstractListModel
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
; }
31 int getIndexFromProfileID(const QString
&profileId
) const;
32 QString
getProfileIDFromIndex(int index
) const;