summaryrefslogtreecommitdiff
path: root/controller.cxx
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-13 18:29:31 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-13 18:29:31 +0800
commit9ec42c7e9c4a96d54bbf526cbd93f07c78e2415e (patch)
tree422e087574a93d29edf689189c23b0949d4a3449 /controller.cxx
parent7e4501b3af82360eb1415f3d5745f1b0c278f504 (diff)
Manage to show tasks
but the view is widened vertically yet.
Diffstat (limited to 'controller.cxx')
-rw-r--r--controller.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/controller.cxx b/controller.cxx
index b9bdf5e..42b1ece 100644
--- a/controller.cxx
+++ b/controller.cxx
@@ -1,6 +1,8 @@
#include <QQmlApplicationEngine>
+#include <QtQml>
#include "worker.hxx"
#include "user.hxx"
+#include "tasklist.hxx"
#include "controller.hxx"
Controller::Controller(QObject* parent) : QObject{parent}
@@ -22,6 +24,11 @@ Controller::Controller(QObject* parent) : QObject{parent}
auto user = engine->singletonInstance<User*>(User::typeId);
connect(worker, SIGNAL(logged(rt_user*)), user, SLOT(update(rt_user*)));
+ auto taskList = engine->singletonInstance<TaskList*>(TaskList::typeId);
+ engine->rootContext()->setContextProperty("taskList", taskList);
+ connect(worker, SIGNAL(foundTasks(rt_ticketlist*))
+ , taskList, SLOT(addTasks(rt_ticketlist*)));
+
thread.start();
}