#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 /// /// 主界面框架 /// 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