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
qqmlpropertyvalueinterceptor.cpp
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
4
6
7QT_BEGIN_NAMESPACE
8
9/*!
10 \class QQmlPropertyValueInterceptor
11 \brief The QQmlPropertyValueInterceptor class is inherited by property interceptors such as Behavior.
12 \internal
13
14 This class intercepts property writes, allowing for custom handling. For example, Behavior uses this
15 interception to provide a default animation for all changes to a property's value.
16 */
17
18/*!
19 Constructs a QQmlPropertyValueInterceptor.
20*/
21QQmlPropertyValueInterceptor::QQmlPropertyValueInterceptor() : m_next(nullptr)
22{
23}
24
25QQmlPropertyValueInterceptor::~QQmlPropertyValueInterceptor()
26{
27}
28
29/*!
30 \internal
31 Called when a BindableProperty metacall gets intercepted. The default implementation does nothing
32 and simply returns false.
33 A subclass which can properly intercept the metacall should return true after doing its work.
34 \a bindable is the pointer to the QUntypedBindable passed through the metacall
35 \a target is the QUntypedBindable of the intercepted property
36*/
37bool QQmlPropertyValueInterceptor::bindable(QUntypedBindable *bindable, QUntypedBindable target)
38{
39 Q_UNUSED(bindable);
40 Q_UNUSED(target)
41 return false;
42}
43
44/*!
45 \fn void QQmlPropertyValueInterceptor::setTarget(const QQmlProperty &property)
46 Set the target \a property for the value interceptor. This method will
47 be called by the QML engine when assigning a value interceptor.
48*/
49
50/*!
51 \fn void QQmlPropertyValueInterceptor::write(const QVariant &value)
52 This method will be called when a new \a value is assigned to the property being intercepted.
53*/
54
55QT_END_NAMESPACE