Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qpropertyanimation_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// Qt-Security score:significant reason:default
4
5#ifndef QPROPERTYANIMATION_P_H
6#define QPROPERTYANIMATION_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
20
21#include "private/qvariantanimation_p.h"
22#include "private/qproperty_p.h"
23
25
26QT_BEGIN_NAMESPACE
27
28class QPropertyAnimationPrivate : public QVariantAnimationPrivate
29{
30 Q_DECLARE_PUBLIC(QPropertyAnimation)
31public:
32 QPropertyAnimationPrivate() : propertyType(0), propertyIndex(-1) { }
33 ~QPropertyAnimationPrivate() override;
34
35 void setTargetObjectForwarder(QObject *target) { q_func()->setTargetObject(target); }
36 Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QPropertyAnimationPrivate, QObject *, targetObject,
37 &QPropertyAnimationPrivate::setTargetObjectForwarder,
38 nullptr)
39 void targetObjectDestroyed()
40 {
41 // stop() has to be called before targetObject is set to nullptr.
42 // targetObject must not be nullptr in states unequal to "Stopped".
43 q_func()->stop();
44 targetObject.setValueBypassingBindings(nullptr);
45 targetObject.notify();
46 }
47
48 //for the QProperty
49 int propertyType;
50 int propertyIndex;
51
52 void setPropertyName(const QByteArray &propertyName)
53 {
54 q_func()->setPropertyName(propertyName);
55 }
56 Q_OBJECT_COMPAT_PROPERTY(QPropertyAnimationPrivate, QByteArray, propertyName,
57 &QPropertyAnimationPrivate::setPropertyName)
58 void updateProperty(const QVariant &);
59 void updateMetaProperty();
60};
61
62QT_END_NAMESPACE
63
64#endif //QPROPERTYANIMATION_P_H
QT_REQUIRE_CONFIG(animation)
QT_REQUIRE_CONFIG(animation)