Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickanimatedimage_p.h
Go to the documentation of this file.
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 QQUICKANIMATEDIMAGE_P_H
5#define QQUICKANIMATEDIMAGE_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_animatedimage);
21
22#include "qquickimage_p.h"
23
25
26class QMovie;
28
29class Q_QUICK_EXPORT QQuickAnimatedImage : public QQuickImage
30{
32
33 Q_PROPERTY(bool playing READ isPlaying WRITE setPlaying NOTIFY playingChanged)
34 Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged)
35 Q_PROPERTY(int currentFrame READ currentFrame WRITE setCurrentFrame NOTIFY frameChanged)
36 Q_PROPERTY(int frameCount READ frameCount NOTIFY frameCountChanged)
37 Q_PROPERTY(qreal speed READ speed WRITE setSpeed NOTIFY speedChanged REVISION(2, 11))
38
39 QML_NAMED_ELEMENT(AnimatedImage)
41
42public:
43 QQuickAnimatedImage(QQuickItem *parent=nullptr);
45
46 bool isPlaying() const;
47 void setPlaying(bool play);
48
49 bool isPaused() const;
50 void setPaused(bool pause);
51
52 int currentFrame() const override;
53 void setCurrentFrame(int frame) override;
54
55 int frameCount() const override;
56
57 qreal speed() const;
58 void setSpeed(qreal speed);
59
60 // Extends QQuickImage's src property
61 void setSource(const QUrl&) override;
62
64 void playingChanged();
65 void pausedChanged();
66 void frameChanged();
67 void currentFrameChanged();
68 void frameCountChanged();
69 Q_REVISION(2, 11) void speedChanged();
70
72 void movieUpdate();
73 void movieRequestFinished();
74 void playingStatusChanged();
75 void onCacheChanged();
76
77protected:
78 void load() override;
79 void componentComplete() override;
80
82 Q_DISABLE_COPY(QQuickAnimatedImage)
83 Q_DECLARE_PRIVATE(QQuickAnimatedImage)
84};
85
87
88#endif // QQUICKANIMATEDIMAGE_P_H
\inmodule QtGui
Definition qmovie.h:28
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
\inmodule QtCore
Definition qurl.h:94
p1 load("image.bmp")
Combined button and popup list for selecting options.
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QT_REQUIRE_CONFIG(feature)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_REVISION(...)
#define Q_SLOTS
#define Q_SIGNALS
double qreal
Definition qtypes.h:187
QFrame frame
[0]