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.

119 lines
3.4 KiB
C

/**********************************************************************
* @file FITKMdiSubWindow.h
* @brief
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-10-18
*********************************************************************/
#ifndef _FITMdiSubWindow_H
#define _FITMdiSubWindow_H
#include "FITKWidgetAPI.h"
#include <QMdiSubWindow>
#include <QPoint>
#include <QMutex>
namespace Comp
{
class FITKMdiArea;
/**
* @brief
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-10-18
*/
class FITKWidgetAPI FITKMdiSubWindow :public QMdiSubWindow
{
Q_OBJECT;
public:
/**
* @brief Construct a new FITKMdiSubWindow object
* @param[i] parent My Param doc
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-10-18
*/
explicit FITKMdiSubWindow(QWidget* parent = nullptr);
/**
* @brief Destroy the FITKMdiSubWindow object
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-10-18
*/
virtual ~FITKMdiSubWindow();
/**
* @brief
* @param[i] widget
* @return void
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-10-22
*/
void setWidget(QWidget *widget);
/**
* @brief
* @return QWidget *
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-10-22
*/
QWidget *widget() const;
/**
* @brief
* @param[i] parent
* @return void
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-10-22
*/
void setParent(FITKMdiArea* parent);
protected:
/**
* @brief
* @return void
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-10-22
*/
void initWidget();
/**
* @brief
* @param[i] event
* @return void
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-10-18
*/
void mousePressEvent(QMouseEvent *event) override;
/**
* @brief
* @param[i] event
* @return void
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-10-18
*/
void mouseMoveEvent(QMouseEvent *event) override;
/**
* @brief
* @param[i] event
* @return void
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-10-18
*/
void mouseReleaseEvent(QMouseEvent *event) override;
public slots:
void widgetExteriorMove();
void widgetMoveRestore();
private:
/**
* @brief
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-10-18
*/
static QMutex _mutex;
/**
* @brief
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-10-22
*/
QWidget* m_widget{};
FITKMdiArea* m_parent{};
};
}
#endif