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

226 lines
6.7 KiB
C

/**
* @file MainWindow.h
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-12
*/
#ifndef __MAINWINDOW_H__
#define __MAINWINDOW_H__
#include <QMainWindow>
#include "GUIFrameAPI.h"
#include "FITK_Kernel/FITKCore/FITKAbstractGUIObject.h"
#include "Tools/Win64/SARibbon/include/SARibbon-2.0.1/SARibbonMainWindow.h"
#include "Tools/Win64/SARibbon/include/SARibbon-2.0.1/SARibbonPannelItem.h"
#include <QFont>
class SARibbonBar;
class SARibbonPannel;
namespace Ui {
class MainWindow;
}
namespace GUI {
class MainMenuBase;
class ControlPanelWidget;
class RenderWidget;
class PropertyWidget;
class GroupPropertyWidget;
class ActionEventHandler;
class MainTreeWidget;
class TabWidget;
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-12
*/
class GUIFRAMEAPI MainWindow : public SARibbonMainWindow, public Core::FITKAbstractGUIObject {
Q_OBJECT;
public:
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-12
*/
MainWindow(QWidget* parent = nullptr);
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-12
*/
~MainWindow();
/**
* @brief action
* @return
* @author YanZhiHui (chanyuantiandao@126.com)
* @data 2024-06-12
*/
ActionEventHandler* getActionEventHandle() const;
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-12
*/
MainTreeWidget* getTreeWidget() const;
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-12
*/
RenderWidget* getRenderWidget() const;
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-12
*/
PropertyWidget* getPropertyWidget() const;
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-12
*/
GroupPropertyWidget* getGroupPropertyWidget() const;
/**
* @brief
* @param[i] toolTip
* @param[i] objectName
* @param[i] iconPath
* @param[i] iconText
* @return QAction* action
* @author BaGuijun (baguijun@163.com)
* @date 2024-05-11
*/
QAction* createAction(const QString& toolTip, const QString& objectName, const QString& iconPath = "", const QString& iconText = "");
signals:
;
/**
* @brief mainWindow
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-30
*/
void sigMainWindowClose();
protected:
/**
* @brief
* @param[i] event
* @author BaGuijun (baguijun@163.com)
* @date 2024-08-30
*/
virtual void closeEvent(QCloseEvent* event) override;
protected:
// TODO
void initMainWindowMenu();
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
void init();
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
void initCentralWidget();
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-05-11
*/
protected:
void initApplicationButton();
void initHome();
void initGeometry();
void initMesh();
void initSetting();
void initResult();
void initHelp();
/**
* @brief
* @param[i] action
* @param[i] iconPath
* @return true
* @return false
* @author BaGuijun (baguijun@163.com)
* @date 2024-05-11
*/
bool changeAction(QAction* action, const QString iconPath, const QString& iconText = "");
/**
* @brief RibbonPannelaction
* @param[i] pannel pannel
* @param[i] action action
* @param[i] actionType action
* @author BaGuijun (baguijun@163.com)
* @date 2024-05-30
*/
void pannelAddAction(SARibbonPannel* pannel, QAction* action, SARibbonPannelItem::RowProportion actionType = SARibbonPannelItem::Large);
/**
* @brief action
* @param[i] actionName action
* @return QAction* action
* @author BaGuijun (baguijun@163.com)
* @date 2024-05-30
*/
QAction* getAction(const QString actionName);
protected:
QWidget* _currentWidget = nullptr;
/**
* @brief RibbonBar
* @author BaGuijun (baguijun@163.com)
* @date 2024-05-30
*/
SARibbonBar* _ribbonBar = nullptr;
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-05-30
*/
MainTreeWidget* _treeWidget = nullptr;
/**
* @brief Tab
* @author BaGuijun (baguijun@163.com)
* @date 2024-05-30
*/
TabWidget* _tabWidgete = nullptr;
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
RenderWidget* m_RenderWidget{};
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
PropertyWidget* m_PropertyWidget{};
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
GroupPropertyWidget* m_GroupPropertyWidget{};
/**
* @brief action
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-12
*/
ActionEventHandler* m_ActionHandler{};
/**
* @brief
* @author BaGuijun (baguijun@163.com)
* @date 2024-05-30
*/
QFont _font = QFont("Arial", 9);
};
}
#endif // !__MAINWINDOW_H__