diff options
| author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-15 20:05:18 +0800 |
|---|---|---|
| committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-15 20:05:18 +0800 |
| commit | 41bfcb06c9c0ff97ab69f323e96117b46529828b (patch) | |
| tree | e5138b70ea8b481f1409b2831d6177f1ebc0ed55 /tasklist.hxx | |
| parent | 45515cb4f2831ed1fb7081f8f55d7aacb2b3ab62 (diff) | |
qrtclient as submodule instead
while librtclient has become qrtclient's submodule
Diffstat (limited to 'tasklist.hxx')
| -rw-r--r-- | tasklist.hxx | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/tasklist.hxx b/tasklist.hxx deleted file mode 100644 index 20b2220..0000000 --- a/tasklist.hxx +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef TASKLIST_HXX -#define TASKLIST_HXX - -#include <QAbstractListModel> - -class Task -{ - public: - Task(QString subject) : m_subject{subject} - {} - QString const& subject() const { return m_subject; } - - private: - QString m_subject; -}; - -class TaskList : public QAbstractListModel -{ - Q_OBJECT - Q_PROPERTY(int rowCount READ rowCount NOTIFY rowCountChanged) - - public: - enum TaskRoles { - SubjectRole = Qt::UserRole + 1, - }; - - explicit TaskList(QObject* parent = nullptr) - : QAbstractListModel{parent} {} - ~TaskList() {} - - int rowCount(QModelIndex const& parent = QModelIndex()) const Q_DECL_OVERRIDE; - QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; - - protected: - QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE; - - signals: - void rowCountChanged(); - - private: - QList<Task> tasks; - void addTask(Task const& task); - - private slots: - void addTasks(struct rt_ticketlist* taskList); -}; - -#endif // TASKLIST_HXX |