aboutsummaryrefslogtreecommitdiff
path: root/installer/fadestackedwidget.h
diff options
context:
space:
mode:
authorVictor Tran <vicr12345@gmail.com>2018-07-12 18:12:14 +1000
committerVictor Tran <vicr12345@gmail.com>2018-07-12 18:12:14 +1000
commit2adcd4f24eca2fa529c42fc1165319bcc4ea179e (patch)
tree1c1c8292e9e864640b19c7ff1ae4acaeb90244be /installer/fadestackedwidget.h
downloadtheInstaller-2adcd4f24eca2fa529c42fc1165319bcc4ea179e.tar.gz
theInstaller-2adcd4f24eca2fa529c42fc1165319bcc4ea179e.tar.bz2
theInstaller-2adcd4f24eca2fa529c42fc1165319bcc4ea179e.zip
Initial commit
Diffstat (limited to 'installer/fadestackedwidget.h')
-rw-r--r--installer/fadestackedwidget.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/installer/fadestackedwidget.h b/installer/fadestackedwidget.h
new file mode 100644
index 0000000..9f43ba2
--- /dev/null
+++ b/installer/fadestackedwidget.h
@@ -0,0 +1,29 @@
+#ifndef FADESTACKEDWIDGET_H
+#define FADESTACKEDWIDGET_H
+
+#include <QObject>
+#include <QWidget>
+#include <QStackedWidget>
+#include <QVariantAnimation>
+#include <QGraphicsOpacityEffect>
+
+class FadeStackedWidget : public QStackedWidget
+{
+ Q_OBJECT
+public:
+ explicit FadeStackedWidget(QWidget *parent = nullptr);
+
+signals:
+
+public slots:
+ void setCurrentIndex(int index);
+
+private slots:
+ void doSetCurrentIndex(int index);
+
+private:
+ bool doingNewAnimation = false;
+ QVariantAnimation* anim;
+};
+
+#endif // FADESTACKEDWIDGET_H