aboutsummaryrefslogtreecommitdiff
path: root/installer/fadestackedwidget.h
blob: 9f43ba25491f0f5081a7c7ea55fc371303b51a0e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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