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.

164 lines
4.0 KiB
C

/**
*
* @file FITKAbstractGUI.h
* @brief GUI
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*
*/
#ifndef ___FITKABSTRACTGUI_H__
#define ___FITKABSTRACTGUI_H__
#include <QWidget>
#include <QDialog>
#include <QMainWindow>
#include "FITKAbstractGUIObject.h"
class QCloseEvent;
namespace Core
{
class FITKAbstractOperator;
/**
* @brief GUI WIDGET
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
class FITKCoreAPI FITKWidget : public QWidget ,public FITKAbstractGUIObject
{
Q_OBJECT
public:
/**
* @brief 使
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
using QWidget::QWidget;
virtual ~FITKWidget() = 0;
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-17
*/
virtual void flush();
/**
* @brief
* @param[i] operName
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-13
*/
virtual void initOperator(const QString & operName);
template<class T>
/**
* @brief
* @return T*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-13
*/
T* getTOperator()
{
return dynamic_cast<T*>(_oper);
}
protected:
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-13
*/
FITKAbstractOperator* _oper{};
};
/**
* @brief GUI Dialog
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
class FITKCoreAPI FITKDialog : public QDialog, public FITKAbstractGUIObject
{
Q_OBJECT
public:
/**
* @brief 使
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
using QDialog::QDialog;
virtual ~FITKDialog() = 0;
};
/**
* @brief Mainwindow
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
class FITKCoreAPI FITKMainWindow : public QMainWindow, public FITKAbstractGUIObject
{
Q_OBJECT
public:
/**
* @brief 使
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
using QMainWindow::QMainWindow;
virtual ~FITKMainWindow() = 0;
/**
* @brief
* @param[i] event
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-13
*/
virtual void closeEvent(QCloseEvent *event) override;
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-17
*/
virtual void flush();
};
/**
* @brief Mainwindow
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
class FITKCoreAPI FITKRibbonMainWindow : public QMainWindow, public FITKAbstractGUIObject
{
Q_OBJECT
public:
/**
* @brief 使
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-02
*/
using QMainWindow::QMainWindow;
virtual ~FITKRibbonMainWindow() = 0;
/**
* @brief
* @param[i] event
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-13
*/
virtual void closeEvent(QCloseEvent *event) override;
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-17
*/
virtual void flush();
};
}
#endif