--- a/src/MainWindow.h Sun Mar 27 20:38:25 2022 +0200 +++ b/src/MainWindow.h Sun Mar 27 22:03:18 2022 +0200 @@ -19,6 +19,65 @@ #include <QStandardItemModel> #include <QMenu> #include <QToolButton> +#include <QApplication> +#include <QDateTime> +#include <QDebug> +#include <QDir> +// #include <QDomDocument> +#include <QFile> +#include <QList> +#include <QMetaProperty> +#include <QObject> +#include <QSettings> +#include <QString> +#include <QTextStream> +#include <QTranslator> +#include <QtSql> +#include <QUuid> +#include <QStyle> +#include <QPlainTextEdit> +#include <QMessageBox> +#include <QLabel> +#include <QImage> +#include <QImageReader> +#include <QImageWriter> +#include <QColorSpace> +#include <QGraphicsView> +#include <QFileDialog> +#include <QXmlStreamReader> +#include <QXmlStreamWriter> +#include <QJsonArray> +#include <QJsonDocument> +#include <QJsonObject> +#include <QMap> +#include <QPrinter> +#include <QWidget> + + +typedef struct IniMySQL +{ + QString host; ///< MySQL host + QString port; ///< MySQL port + QString name; ///< MySQL database + QString user; ///< MySQL username + QString pass; ///< MySQL password + QString charset; ///< MySQL character encoding +} IniMySQL; + +static IniMySQL dbProd; +static IniMySQL dbDev; + +typedef struct IniMQTT +{ + QString host; ///< MQTT host + QString port; ///< MQTT port + QString user; ///< MQTT username + QString pass; ///< MQTT password +} IniMQTT; + +static IniMQTT mqttProd; +static IniMQTT mqttDev; + namespace Ui { class MainWindow; @@ -29,7 +88,7 @@ Q_OBJECT public: - explicit MainWindow(QWidget *parent = 0); + explicit MainWindow(bool useDevelopOption, bool startConfigOption, QWidget *parent = 0); ~MainWindow(); // Keep pointers to new windows. @@ -85,6 +144,16 @@ private: Ui::MainWindow *ui; + + /** + * @brief Read user settings for the MySQL connection. + */ + void readsettings(); + + /** + * @brief Write or update the user settings for the MySQL connection. + */ + void writesettings(); }; #endif