65class DStackWidget :
public QWidget,
public DTK_CORE_NAMESPACE::DObject
70 Q_PROPERTY(
bool busy READ busy NOTIFY busyChanged FINAL)
72 Q_PROPERTY(
int depth READ depth NOTIFY depthChanged FINAL)
73 Q_PROPERTY(
int currentIndex READ currentIndex NOTIFY currentIndexChanged)
74 Q_PROPERTY(QWidget* currentWidget READ currentWidget NOTIFY currentWidgetChanged)
76 Q_PROPERTY(
int animationDuration READ animationDuration WRITE setAnimationDuration)
77 Q_PROPERTY(QEasingCurve::Type animationType READ animationType WRITE setAnimationType)
85 int currentIndex() const;
86 QWidget* currentWidget() const;
89 int animationDuration() const;
90 QEasingCurve::Type animationType() const;
93 int pushWidget(QWidget *widget,
bool enableTransition = true);
94 void insertWidget(
int index, QWidget *widget,
bool enableTransition = true);
98 void popWidget(QWidget *widget =
nullptr,
bool isDelete = true,
99 int count = 1,
bool enableTransition = true);
102 int indexOf(QWidget *widget) const;
103 QWidget* getWidgetByIndex(
int index) const;
106 void setAnimationDuration(
int animationDuration);
107 void setAnimationType(QEasingCurve::Type animationType);
110 void busyChanged(
bool busy);
111 void depthChanged(
int depth);
113 void currentIndexChanged(
int currentIndex);
114 void currentWidgetChanged(QWidget* currentWidget);
116 void widgetDepthChanged(QWidget *widget,
int depth);
118 void switchWidgetFinished();
123 void setCurrentIndex(
int currentIndex,
125 bool enableTransition = true);
126 void setCurrentWidget(QWidget* currentWidget,
128 bool enableTransition = true);