#ifndef DATABASETHREAD_H #define DATABASETHREAD_H #include #include #include #include #include #include class DatabaseThread : public QThread { Q_OBJECT public: explicit DatabaseThread(QObject *parent = nullptr); void run(); void stop(); void appendSql(QString sql); void appendAlarm(QString sql); signals: void mqtt_conf(QString ip,QString port,QString username,QString password); void dbdata_log(QString log); public slots: private: int hour; bool keep; QSqlDatabase db; QStringList sqlList,alarmList; }; #endif // DATABASETHREAD_H