12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- #ifndef MAINWINDOW_H
- #define MAINWINDOW_H
- #include "Common.h"
- #include "Document.h"
- #include "StatusBar.h"
- QT_BEGIN_NAMESPACE
- namespace Ui { class WindowMain; }
- QT_END_NAMESPACE
- /// <summary>
- /// 主界面框架
- /// </summary>
- class WindowHome;
- class WindowRuntime;
- class WindowHdw;
- class WindowApp;
- class WindowMain : public QMainWindow
- {
- Q_OBJECT
- public:
- WindowMain(QWidget *parent = nullptr);
- ~WindowMain();
- private:
- Ui::WindowMain*ui;
- protected:
- // 创建菜单Action
- void createMainActions();
- // 创建状态栏
- void createStatusbar();
- // 创建界面布局
- void createLayouts();
- // 槽函数
- public slots :
- // 点击按钮切换窗体
- void onViewRunTime();
- void onViewApp();
- // 菜单响应函数
- // File
- void onFileNew();
- void onFileOpen();
- void onFileSave();
- void onFileSaveAs();
- // Run
- void onTaskRun();
- void onTaskRunonce();
- void onTaskStop();
- // 系统
- void onPreferences();
- void onAppInfo();
- private:
- // Help
- QAction* helpAboutAction;
-
- // 状态栏
- QStatusBar* mainStatusBar;
- StatusBar* statusLabel;
- // 顶部的分组控件及其布局
- QGroupBox* groupTop;
- QHBoxLayout* groupLayout;
- // 中部界面容器以及布局
- // 垂直布局
- QVBoxLayout* layoutSubMain;
- // 其他子界面
- WindowRuntime* runtimeWindow;
- WindowApp* appWindow;
-
- // 多个窗体的Stack
- QStackedWidget* stackWindows;
- // 存档文件类
- Document m_Doc;
- };
- #endif // MAINWINDOW_H
|