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

source code of qtdeclarative/src/qml/qml/qqmlpropertyvalueinterceptor.cpp