1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQUICKFLIPABLE_P_H
5#define QQUICKFLIPABLE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <private/qtquickglobal_p.h>
19
20QT_REQUIRE_CONFIG(quick_flipable);
21
22#include "qquickitem.h"
23
24#include <QtGui/qtransform.h>
25#include <QtGui/qvector3d.h>
26#include <QtCore/qobject.h>
27
28QT_BEGIN_NAMESPACE
29
30class QQuickFlipablePrivate;
31class Q_QUICK_PRIVATE_EXPORT QQuickFlipable : public QQuickItem
32{
33 Q_OBJECT
34
35 Q_PROPERTY(QQuickItem *front READ front WRITE setFront NOTIFY frontChanged FINAL)
36 Q_PROPERTY(QQuickItem *back READ back WRITE setBack NOTIFY backChanged FINAL)
37 Q_PROPERTY(Side side READ side NOTIFY sideChanged FINAL)
38 QML_NAMED_ELEMENT(Flipable)
39 QML_ADDED_IN_VERSION(2, 0)
40 //### flipAxis
41 //### flipRotation
42public:
43 QQuickFlipable(QQuickItem *parent=nullptr);
44 ~QQuickFlipable();
45
46 QQuickItem *front() const;
47 void setFront(QQuickItem *);
48
49 QQuickItem *back();
50 void setBack(QQuickItem *);
51
52 enum Side { Front, Back };
53 Q_ENUM(Side)
54 Side side() const;
55
56Q_SIGNALS:
57 void frontChanged();
58 void backChanged();
59 void sideChanged();
60
61protected:
62 void updatePolish() override;
63
64private Q_SLOTS:
65 void retransformBack();
66
67private:
68 Q_DISABLE_COPY(QQuickFlipable)
69 Q_DECLARE_PRIVATE(QQuickFlipable)
70};
71
72QT_END_NAMESPACE
73
74QML_DECLARE_TYPE(QQuickFlipable)
75
76#endif // QQUICKFLIPABLE_P_H
77

source code of qtdeclarative/src/quick/items/qquickflipable_p.h