17 |
17 |
18 #include <QMainWindow> |
18 #include <QMainWindow> |
19 #include <QStandardItemModel> |
19 #include <QStandardItemModel> |
20 #include <QMenu> |
20 #include <QMenu> |
21 #include <QToolButton> |
21 #include <QToolButton> |
|
22 #include <QApplication> |
|
23 #include <QDateTime> |
|
24 #include <QDebug> |
|
25 #include <QDir> |
|
26 // #include <QDomDocument> |
|
27 #include <QFile> |
|
28 #include <QList> |
|
29 #include <QMetaProperty> |
|
30 #include <QObject> |
|
31 #include <QSettings> |
|
32 #include <QString> |
|
33 #include <QTextStream> |
|
34 #include <QTranslator> |
|
35 #include <QtSql> |
|
36 #include <QUuid> |
|
37 #include <QStyle> |
|
38 #include <QPlainTextEdit> |
|
39 #include <QMessageBox> |
|
40 #include <QLabel> |
|
41 #include <QImage> |
|
42 #include <QImageReader> |
|
43 #include <QImageWriter> |
|
44 #include <QColorSpace> |
|
45 #include <QGraphicsView> |
|
46 #include <QFileDialog> |
|
47 #include <QXmlStreamReader> |
|
48 #include <QXmlStreamWriter> |
|
49 #include <QJsonArray> |
|
50 #include <QJsonDocument> |
|
51 #include <QJsonObject> |
|
52 #include <QMap> |
|
53 #include <QPrinter> |
|
54 #include <QWidget> |
|
55 |
|
56 |
|
57 typedef struct IniMySQL |
|
58 { |
|
59 QString host; ///< MySQL host |
|
60 QString port; ///< MySQL port |
|
61 QString name; ///< MySQL database |
|
62 QString user; ///< MySQL username |
|
63 QString pass; ///< MySQL password |
|
64 QString charset; ///< MySQL character encoding |
|
65 } IniMySQL; |
|
66 |
|
67 static IniMySQL dbProd; |
|
68 static IniMySQL dbDev; |
|
69 |
|
70 typedef struct IniMQTT |
|
71 { |
|
72 QString host; ///< MQTT host |
|
73 QString port; ///< MQTT port |
|
74 QString user; ///< MQTT username |
|
75 QString pass; ///< MQTT password |
|
76 } IniMQTT; |
|
77 |
|
78 static IniMQTT mqttProd; |
|
79 static IniMQTT mqttDev; |
|
80 |
22 |
81 |
23 namespace Ui { |
82 namespace Ui { |
24 class MainWindow; |
83 class MainWindow; |
25 } |
84 } |
26 |
85 |
27 class MainWindow : public QMainWindow |
86 class MainWindow : public QMainWindow |
28 { |
87 { |
29 Q_OBJECT |
88 Q_OBJECT |
30 |
89 |
31 public: |
90 public: |
32 explicit MainWindow(QWidget *parent = 0); |
91 explicit MainWindow(bool useDevelopOption, bool startConfigOption, QWidget *parent = 0); |
33 ~MainWindow(); |
92 ~MainWindow(); |
34 |
93 |
35 // Keep pointers to new windows. |
94 // Keep pointers to new windows. |
36 RecipesTree *RecipesTreeWindow; |
95 RecipesTree *RecipesTreeWindow; |
37 InventorySuppliers *InventorySuppliersWindow; |
96 InventorySuppliers *InventorySuppliersWindow; |