summaryrefslogtreecommitdiff
path: root/tasklist.cxx
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-15 20:05:18 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-15 20:05:18 +0800
commit41bfcb06c9c0ff97ab69f323e96117b46529828b (patch)
treee5138b70ea8b481f1409b2831d6177f1ebc0ed55 /tasklist.cxx
parent45515cb4f2831ed1fb7081f8f55d7aacb2b3ab62 (diff)
qrtclient as submodule instead
while librtclient has become qrtclient's submodule
Diffstat (limited to 'tasklist.cxx')
-rw-r--r--tasklist.cxx45
1 files changed, 0 insertions, 45 deletions
diff --git a/tasklist.cxx b/tasklist.cxx
deleted file mode 100644
index d972773..0000000
--- a/tasklist.cxx
+++ /dev/null
@@ -1,45 +0,0 @@
-#include <rtclient/rtclient.h>
-#include "tasklist.hxx"
-
-int TaskList::rowCount(QModelIndex const& parent) const
-{
- Q_UNUSED(parent)
- return tasks.count();
-}
-
-QVariant TaskList::data(QModelIndex const& index, int role) const
-{
- auto row = index.row();
-
- if (row < 0 || row >= tasks.count()) return QVariant();
-
- auto task = tasks[row];
- switch (role) {
- case SubjectRole:
- return task.subject();
- default:
- return QVariant();
- }
-}
-
-QHash<int, QByteArray> TaskList::roleNames() const
-{
- return QHash<int, QByteArray>{
- {SubjectRole, "subject"}
- };
-}
-
-void TaskList::addTask(Task const& task)
-{
- beginInsertRows(QModelIndex(), rowCount(), rowCount());
- tasks << task;
- endInsertRows();
- emit rowCountChanged();
-}
-
-void TaskList::addTasks(rt_ticketlist* taskList)
-{
- for (unsigned int i = 0; i < taskList->length; i++)
- addTask(Task{taskList->tickets[i]});
- rtclient_ticket_freelist(taskList);
-}