25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
910 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. void updateConnectionStatus(bool connection);
  27. private:
  28. Ui::MainWindow *ui;
  29. RegisterManager* registerManager;
  30. PLC *plc_;
  31. HMI *hmi_;
  32. ModbusManager* modbusManager;
  33. Project plcProject_;
  34. Project hmiProject_;
  35. QString plcFilePath_;
  36. QString hmiFilePath_;
  37. bool currentIsPLC_ = true;
  38. };
  39. #endif // MAINWINDOW_H