SARibbon 2.5.2
SARibbon wiki
载入中...
搜索中...
未找到
SARibbonStackedWidget.h
1#ifndef SARIBBONSTACKEDWIDGET_H
2#define SARIBBONSTACKEDWIDGET_H
3#include <QStackedWidget>
4#include "SARibbonGlobal.h"
5class QHideEvent;
6class QResizeEvent;
7
33class SA_RIBBON_EXPORT SARibbonStackedWidget : public QStackedWidget
34{
35 Q_OBJECT
36 SA_RIBBON_DECLARE_PRIVATE(SARibbonStackedWidget)
37public:
38 Q_PROPERTY(int animationWidgetHeight READ animationWidgetHeight WRITE setAnimationWidgetHeight) // Add custom property
39public:
41 explicit SARibbonStackedWidget(QWidget* parent);
42
45
47 void setPopupMode();
48
50 bool isPopupMode() const;
51
53 void setNormalMode();
54
56 bool isNormalMode() const;
57
59 void exec();
60
62 void moveWidget(int from, int to);
63
65 void setUseAnimation(bool on);
66
68 bool isUseAnimation() const;
69
71 void setAnimationDuration(int duration);
72
74 int animationDuration() const;
75
77 int animationWidgetHeight() const;
78
80 void setAnimationWidgetHeight(int h);
81
83 void setNormalGeometry(const QRect& normalGeometry);
84
86 QRect normalGeometry() const;
87
89 void layoutRequestInnerWidgets();
90Q_SIGNALS:
100 void hidWindow();
101
102protected:
104 void showEvent(QShowEvent* e) override;
105
107 void hideEvent(QHideEvent* e) override;
108
110 virtual void resizeEvent(QResizeEvent* e) override;
111
113 void updateInnerWidgetGeometry();
114private Q_SLOTS:
116 void onAnimationFinished();
117
119 void setupAnimation();
120};
121
122#endif // SARIBBONSTACKEDWIDGET_H
Definition SARibbonStackedWidget.h:34