aboutsummaryrefslogtreecommitdiffstats
path: root/gui/ice40/worker.h
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2018-06-21 15:41:40 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2018-06-21 15:42:19 +0200
commit097df1869d654b1214b925fe991aa09d2ef5b3cd (patch)
treee14442d2e98d53a4c4c8985d64cd963e48fba085 /gui/ice40/worker.h
parent2d405f966b4e69b95cd4ea9acbb5438e1fa91e69 (diff)
downloadnextpnr-097df1869d654b1214b925fe991aa09d2ef5b3cd.tar.gz
nextpnr-097df1869d654b1214b925fe991aa09d2ef5b3cd.tar.bz2
nextpnr-097df1869d654b1214b925fe991aa09d2ef5b3cd.zip
Added task manager and worker thread for ice40
Diffstat (limited to 'gui/ice40/worker.h')
-rw-r--r--gui/ice40/worker.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/gui/ice40/worker.h b/gui/ice40/worker.h
new file mode 100644
index 00000000..5dc25d89
--- /dev/null
+++ b/gui/ice40/worker.h
@@ -0,0 +1,37 @@
+#ifndef WORKER_H
+#define WORKER_H
+
+#include "nextpnr.h"
+#include <QThread>
+
+// FIXME
+USING_NEXTPNR_NAMESPACE
+
+class Worker : public QObject
+{
+ Q_OBJECT
+public:
+ Worker(Context *ctx);
+public Q_SLOTS:
+ void parsejson(const std::string &filename);
+Q_SIGNALS:
+ void log(const std::string &text);
+private:
+ Context *ctx;
+};
+
+class TaskManager : public QObject
+{
+ Q_OBJECT
+ QThread workerThread;
+public:
+ TaskManager(Context *ctx);
+ ~TaskManager();
+public Q_SLOTS:
+ void info(const std::string &text);
+Q_SIGNALS:
+ void parsejson(const std::string &);
+ void log(const std::string &text);
+};
+
+#endif // WORKER_H