mainwindow.h 837 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3. #include <QMainWindow>
  4. #include <QSqlDatabase>
  5. #include <QSqlQuery>
  6. #include <QDateTime>
  7. #include "logthread.h"
  8. #include "dbthread.h"
  9. #include "evalthread.h"
  10. QT_BEGIN_NAMESPACE
  11. namespace Ui { class MainWindow; }
  12. QT_END_NAMESPACE
  13. class MainWindow : public QMainWindow
  14. {
  15. Q_OBJECT
  16. public:
  17. MainWindow(QMainWindow *parent = nullptr);
  18. ~MainWindow();
  19. void start();
  20. void evalData();
  21. public slots:
  22. void timeout();
  23. void getParam(QString PathMdb, QString PassWd);
  24. void SqlLog(QString log);
  25. private slots:
  26. void on_pushButton_clicked();
  27. private:
  28. QTimer *timer;
  29. QSqlDatabase mainDB;
  30. Ui::MainWindow *ui;
  31. QString PathMdb;
  32. QString PassWd;
  33. LogThread *logThread;
  34. DBThread *dbThread;
  35. EvalThread *evalThread;
  36. };
  37. #endif // MAINWINDOW_H