Warning, file /maui/strike/src/models/cmakeprojectsmodel.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #ifndef CMAKEPROJECTSMODEL_H 0002 #define CMAKEPROJECTSMODEL_H 0003 0004 #include <QAbstractListModel> 0005 #include <QObject> 0006 #include <QVector> 0007 0008 #include "controllers/cmakedata.h" 0009 0010 class CMakeProject; 0011 class CMakeProjectsModel : public QAbstractListModel 0012 { 0013 Q_OBJECT 0014 0015 public: 0016 enum Roles 0017 { 0018 Title, 0019 Data 0020 }; 0021 0022 explicit CMakeProjectsModel(QObject *parent = nullptr); 0023 void setProjectsData(const QVector<CMakeProjectData> &data); 0024 0025 int rowCount(const QModelIndex &parent) const override final; 0026 QVariant data(const QModelIndex &index, int role) const override final; 0027 QHash<int, QByteArray> roleNames() const override final; 0028 0029 private: 0030 QVector<CMakeProjectData> m_data; 0031 0032 signals: 0033 void currentProjectIndexChanged(int currentProjectIndex); 0034 }; 0035 0036 #endif // CMAKEPROJECTMODEL_H