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
qqmlexpression_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 QQMLEXPRESSION_P_H
5#define QQMLEXPRESSION_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 "qqmlexpression.h"
19
20#include <private/qqmlengine_p.h>
21#include <private/qfieldlist_p.h>
22#include <private/qqmljavascriptexpression_p.h>
23
25
26class QQmlExpression;
27class QString;
30{
31 Q_DECLARE_PUBLIC(QQmlExpression)
32public:
35
36 void init(const QQmlRefPointer<QQmlContextData> &, const QString &, QObject *);
37 void init(const QQmlRefPointer<QQmlContextData> &, QV4::Function *runtimeFunction, QObject *);
38
39 QVariant value(bool *isUndefined = nullptr);
40
41 QV4::ReturnedValue v4value(bool *isUndefined = nullptr);
42 bool mustCaptureBindableProperty() const final {return true;}
43
44 static inline QQmlExpressionPrivate *get(QQmlExpression *expr);
45 static inline QQmlExpression *get(QQmlExpressionPrivate *expr);
46
47 void _q_notify();
48
50
51 // Inherited from QQmlJavaScriptExpression
52 QString expressionIdentifier() const override;
54
55 QString expression;
56
57 QString url; // This is a QString for a reason. QUrls are slooooooow...
60 QString name; //function name, hint for the debugger
61};
62
64{
65 return static_cast<QQmlExpressionPrivate *>(QObjectPrivate::get(expr));
66}
67
69{
70 return expr->q_func();
71}
72
73
74QT_END_NAMESPACE
75
76#endif // QQMLEXPRESSION_P_H
void dropDestroyedQObject(const QString &name, QObject *destroyed)
void setNotifyIndex(int notifyIndex)
void setPropertyValue(int index, const QVariant &value)
void appendInstance(QObject *instance)
int notifyIndex() const
void appendPropertyValue(const QVariant &value)
QList< QPointer< QObject > > instances() const
int numPropertyValues() const
QVariant propertyValue(int index) const
static QObject * context_at(QQmlListProperty< QObject > *, qsizetype)
bool mustCaptureBindableProperty() const final
void expressionChanged() override
void init(const QQmlRefPointer< QQmlContextData > &, QV4::Function *runtimeFunction, QObject *)
QV4::ReturnedValue v4value(bool *isUndefined=nullptr)
void init(const QQmlRefPointer< QQmlContextData > &, const QString &, QObject *)
QVariant value(bool *isUndefined=nullptr)
static QQmlExpression * get(QQmlExpressionPrivate *expr)
static QQmlExpressionPrivate * get(QQmlExpression *expr)
QString expressionIdentifier() const override
~QQmlExpressionPrivate() override
static bool readObjectProperty(const QQmlRefPointer< QQmlContextData > &data, QObject *object, const QString &name, QVariant *target)