aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mobile/commandmodel.h
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2016-09-25 04:19:05 +0200
committerRenaud G <renaud@rolisteam.org>2016-09-25 04:19:05 +0200
commit664ac48622701dedaa816f5c27fff5f99389690e (patch)
tree9112c9051e3904a892207b73f2e64eda9b5306b5 /mobile/commandmodel.h
parente103f23c9d2e9096bde3b0d9fa798eed5dc8b64a (diff)
downloadOneRoll-664ac48622701dedaa816f5c27fff5f99389690e.tar.gz
OneRoll-664ac48622701dedaa816f5c27fff5f99389690e.zip
-first draft of mobile application.
Diffstat (limited to 'mobile/commandmodel.h')
-rw-r--r--mobile/commandmodel.h17
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