From 664ac48622701dedaa816f5c27fff5f99389690e Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sun, 25 Sep 2016 04:19:05 +0200 Subject: -first draft of mobile application. --- mobile/commandmodel.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'mobile/commandmodel.h') 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 +#include + 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 roleNames() const; + + +public slots: + void insertCmd(QString name, QString cmd); +private: + QList > m_data; }; -#endif // COMMANDMODEL_H \ No newline at end of file +#endif // COMMANDMODEL_H -- cgit v1.2.3-70-g09d2