-
Notifications
You must be signed in to change notification settings - Fork 0
/
guiupdater.h
43 lines (35 loc) · 907 Bytes
/
guiupdater.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef GUIUPDATER_H
#define GUIUPDATER_H
#include <QObject>
#include <string>
#include <QQmlApplicationEngine>
#include <QStandardItemModel>
#include <QTableView>
#include <mealplan.h>
#include <computationthread.h>
#include <QUrl>
class GUIUpdater : public QObject
{
Q_OBJECT
public:
explicit GUIUpdater(QObject *parent = 0);
QQmlApplicationEngine *engine;
QObject *main; // reference to main.qml
QObject *mealLabel;
QObject *mealViewButton;
QObject *mealTable;
MealPlan *mealPlan;
QObject *pathToClingoLabel;
QObject *pathToLpLabel;
ComputationThread *compThread;
void reformatOutput();
private:
QStandardItemModel *model;
public slots:
void updateGUI(QString, int);
void makeMealTable(QString answerSets, int, int);
void updatePaths();
void writeMealPlanToFile();
void readMealPlanFromFile(QUrl);
};
#endif // GUIUPDATER_H