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/PanelWidgetBase.h

110 lines
2.6 KiB
C

/**
* @file PanelWidgetBase.h
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
#ifndef __PANELWIDGETBASE_H__
#define __PANELWIDGETBASE_H__
#include "GUIFrameAPI.h"
#include <QWidget>
#include <QList>
class QLabel;
class QVBoxLayout;
namespace GUI
{
class MainWindow;
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
class GUIFRAMEAPI PanelWidgetBase : public QWidget
{
Q_OBJECT
public:
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
explicit PanelWidgetBase(MainWindow *mainWindow);
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
virtual ~PanelWidgetBase() = 0;
/**
* @brief
* @param title
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
void setTitle(QString title);
/**
* @brief
* @return
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
QString getTitle() const;
/**
* @brief (50)
* @param height
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
void setTitleHeight(int height = 50);
/**
* @brief
* @param widget
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
void setWidget(QWidget *widget);
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
void removeWidget();
/**
* @brief
* @param widget
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
QWidget* getCurrentWidget();
protected:
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
MainWindow *m_MainWindow{};
/**
* @brief Label
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
QLabel *m_TitleLabel{};
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
QVBoxLayout *m_Layout{};
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
QWidget* m_Widget{};
};
}
#endif // !__PANELWIDGETBASE_H__