summaryrefslogtreecommitdiffstats
path: root/src/qmlandroid/widget/qqmlandroidviewanimator_p.h
blob: 01eb24c7c2044d83ee3ad08ae5ee50e658dce216 (plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef QQMLANDROIDVIEWANIMATOR_P_H
#define QQMLANDROIDVIEWANIMATOR_P_H

//
//  W A R N I N G
//  -------------
//
// This file is not part of the Qt API.  It exists purely as an
// implementation detail.  This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//

#include "qqmlandroidframelayout_p.h"

QT_BEGIN_NAMESPACE

class QQmlAndroidViewAnimator : public QQmlAndroidFrameLayout
{
    Q_OBJECT
    Q_PROPERTY(int displayedChild READ displayedChild WRITE setDisplayedChild NOTIFY displayedChildChanged)
    Q_PROPERTY(int inAnimation READ inAnimation WRITE setInAnimation NOTIFY inAnimationChanged)
    Q_PROPERTY(int outAnimation READ outAnimation WRITE setOutAnimation NOTIFY outAnimationChanged)

public:
    explicit QQmlAndroidViewAnimator(QQmlAndroidView *parent = 0);

    int displayedChild() const;
    void setDisplayedChild(int child);

    int inAnimation() const;
    void setInAnimation(int animation);

    int outAnimation() const;
    void setOutAnimation(int animation);

public Q_SLOTS:
    void showNext();
    void showPrevious();

Q_SIGNALS:
    void displayedChildChanged();
    void inAnimationChanged();
    void outAnimationChanged();

protected:
    QAndroidJniObject onCreate() Q_DECL_OVERRIDE;
    void onInflate(QAndroidJniObject &instance) Q_DECL_OVERRIDE;

private:
    QQmlAndroidOptional<int> m_displayedChild;
    QQmlAndroidOptional<int> m_inAnimation;
    QQmlAndroidOptional<int> m_outAnimation;
};

QT_END_NAMESPACE

#endif // QQMLANDROIDVIEWANIMATOR_P_H