You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
860 B

  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3. #include <QMainWindow>
  4. #include "plc.h"
  5. #include "hmi.h"
  6. #include "modbusmanager.h"
  7. #include "registermanager.h"
  8. QT_BEGIN_NAMESPACE
  9. namespace Ui { class MainWindow; }
  10. class QGraphicsScene;
  11. QT_END_NAMESPACE
  12. class MainWindow : public QMainWindow
  13. {
  14. Q_OBJECT
  15. public:
  16. explicit MainWindow(QWidget *parent = nullptr);
  17. ~MainWindow();
  18. private slots:
  19. void plcChange();
  20. void hmiChange();
  21. void newProject();
  22. void openProject();
  23. void saveProject();
  24. void connection();
  25. void disconnection();
  26. private:
  27. Ui::MainWindow *ui;
  28. RegisterManager* registerManager;
  29. PLC *plc_;
  30. HMI *hmi_;
  31. ModbusManager* modbusManager;
  32. Project plcProject_;
  33. Project hmiProject_;
  34. QString plcFilePath_;
  35. QString hmiFilePath_;
  36. bool currentIsPLC_ = true;
  37. };
  38. #endif // MAINWINDOW_H