diff options
| author | 2016-09-25 04:19:05 +0200 | |
|---|---|---|
| committer | 2016-09-25 04:19:05 +0200 | |
| commit | 664ac48622701dedaa816f5c27fff5f99389690e (patch) | |
| tree | 9112c9051e3904a892207b73f2e64eda9b5306b5 /mobile/commandmodel.h | |
| parent | e103f23c9d2e9096bde3b0d9fa798eed5dc8b64a (diff) | |
| download | OneRoll-664ac48622701dedaa816f5c27fff5f99389690e.tar.gz OneRoll-664ac48622701dedaa816f5c27fff5f99389690e.zip | |
-first draft of mobile application.
Diffstat (limited to 'mobile/commandmodel.h')
| -rw-r--r-- | mobile/commandmodel.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mobile/commandmodel.h b/mobile/commandmodel.h index e68c91e..2c20072 100644 --- a/mobile/commandmodel.h +++ b/mobile/commandmodel.h @@ -22,10 +22,25 @@ #include <QObject> +#include <QAbstractListModel> + class CommandModel : public QAbstractListModel { + Q_OBJECT public: + enum CustomRole {NameRole = Qt::UserRole+1,CmdRole}; CommandModel(); + + virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole ) const; + virtual int rowCount(const QModelIndex &parent) const; + + QHash<int, QByteArray> roleNames() const; + + +public slots: + void insertCmd(QString name, QString cmd); +private: + QList<QPair<QString,QString> > m_data; }; -#endif // COMMANDMODEL_H
\ No newline at end of file +#endif // COMMANDMODEL_H |