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.

43 lines
1.1 KiB
C

#ifndef SARIBBONSTACKEDWIDGET_H
#define SARIBBONSTACKEDWIDGET_H
#include <QStackedWidget>
#include "SARibbonGlobal.h"
class QHideEvent;
class QResizeEvent;
/**
* @brief qdialogstackwidgetstackdialog
*/
class SA_RIBBON_EXPORT SARibbonStackedWidget : public QStackedWidget
{
Q_OBJECT
SA_RIBBON_DECLARE_PRIVATE(SARibbonStackedWidget)
public:
SARibbonStackedWidget(QWidget* parent);
~SARibbonStackedWidget();
void setPopupMode();
bool isPopupMode() const;
void setNormalMode();
bool isNormalMode() const;
void exec();
// 设置stacked管理的窗口会随着stacked的大小变化而变化大小
// 就算不激活也调整大小
void setAutoResize(bool autoresize);
bool isAutoResize() const;
// 移动窗口
void moveWidget(int from, int to);
protected:
// void mouseReleaseEvent(QMouseEvent *e);
void hideEvent(QHideEvent* e) Q_DECL_OVERRIDE;
virtual void resizeEvent(QResizeEvent* e) Q_DECL_OVERRIDE;
signals:
/**
* @brief hidWindow
*/
void hidWindow();
};
#endif // SARIBBONSTACKEDWIDGET_H