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__