Warning, file /maui/strike/src/models/cmaketargetsmodel.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #ifndef CMAKETARGETSMODEL_H 0002 #define CMAKETARGETSMODEL_H 0003 0004 #include <QAbstractListModel> 0005 #include <QObject> 0006 0007 #include "controllers/cmakedata.h" 0008 0009 class CMakeTargetsModel : public QAbstractListModel 0010 { 0011 Q_OBJECT 0012 0013 public: 0014 enum Roles 0015 { 0016 Artifacts, 0017 Name, 0018 Url, 0019 Type, 0020 Sources, 0021 Folder, 0022 Target, 0023 Data 0024 }; 0025 0026 explicit CMakeTargetsModel(QObject *parent =nullptr); 0027 0028 void setTargetData(const CMakeProjectTargets &data); 0029 QVector<CMakeTarget> filterBy(const CMakeTarget::Type &type); 0030 0031 private: 0032 CMakeProjectTargets m_data; 0033 void setList(); 0034 QVector<CMakeTarget> m_targets; 0035 0036 // QAbstractItemModel interface 0037 public: 0038 int rowCount(const QModelIndex &parent) const override final; 0039 QVariant data(const QModelIndex &index, int role) const override final; 0040 QHash<int, QByteArray> roleNames() const override final; 0041 0042 signals: 0043 void dataChanged(CMakeProjectTargets data); 0044 }; 0045 0046 #endif // CMAKETARGETSMODEL_H