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.

103 lines
2.8 KiB
C++

/**
* @brief 渲染区子面板
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-04
*/
#ifndef __RENDERWIDGET_H__
#define __RENDERWIDGET_H__
#include "GUIFrameAPI.h"
#include "FITK_Kernel/FITKCore/FITKAbstractGUI.h"
#include "FITK_Component/FITKWidget/FITKMdiArea.h"
namespace Comp{
class FITKMdiArea;
}
class QVBoxLayout;
namespace GUI
{
class MainWindow;
/**
* @brief 渲染区域子面板类
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-04
*/
class GUIFRAMEAPI RenderWidget : public Core::FITKWidget
{
Q_OBJECT;
public:
/**
* @brief 构造函数
* @param[i] mainWindow 主窗口对象
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-04
*/
RenderWidget(QWidget* parent = nullptr);
/**
* @brief 析构函数
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-04
*/
~RenderWidget() = default;
/**
* @brief 初始化
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-13
*/
void init();
/**
* @brief 添加渲染窗口
* @param[i] title 标题
* @param[i] index 索引
* @return int 视口对应的id
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-13
*/
int addGraphWidget(QString title, int index = 1);
/**
* @brief 获取多视口管理
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-04
*/
Comp::FITKMdiArea* getMdiArea() const;
/**
* @brief 设置视口样式
* @param[i] type 视口样式
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-13
*/
void setVportsType(Comp::FITKVportsLayoutType type);
/**
* @brief 获取视口样式
* @return Comp::FITKVportsLayoutType 视口样式
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-13
*/
Comp::FITKVportsLayoutType getVportsType();
/**
* @brief 获取当前界面
* @return QWidget* 界面
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-18
*/
QWidget* getCurrentWidget();
private:
QVBoxLayout* _gridLayout = nullptr;
/**
* @brief 多视口管理
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-04
*/
Comp::FITKMdiArea* _mdiArea = nullptr;
/**
* @brief 视口样式
* @author BaGuijun (baguijun@163.com)
* @date 2024-09-13
*/
Comp::FITKVportsLayoutType _vportsType = Comp::FITKVportsLayoutType::Tab;
};
}
#endif // !__RENDERWIDGET_H__