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
qquickdesignercustomobjectdata_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 DESIGNERCUSTOMOBJECTDATA_H
5
#define DESIGNERCUSTOMOBJECTDATA_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 "
qquickdesignersupport_p.h
"
19
20
#include <QHash>
21
#include <QObject>
22
#include <QVariant>
23
24
#include <private/qqmlanybinding_p.h>
25
26
QT_BEGIN_NAMESPACE
27
class
QQmlContext
;
28
29
class
QQuickDesignerCustomObjectData
30
{
31
public
:
32
static
void
registerData
(
QObject
*
object
);
33
static
QQuickDesignerCustomObjectData
*
get
(
QObject
*
object
);
34
static
QVariant
getResetValue
(
QObject
*
object
,
const
QQuickDesignerSupport::PropertyName
&propertyName);
35
static
void
doResetProperty
(
QObject
*
object
,
QQmlContext
*
context
,
const
QQuickDesignerSupport::PropertyName
&propertyName);
36
static
bool
hasValidResetBinding
(
QObject
*
object
,
const
QQuickDesignerSupport::PropertyName
&propertyName);
37
static
bool
hasBindingForProperty
(
QObject
*
object
,
38
QQmlContext
*
context
,
39
const
QQuickDesignerSupport::PropertyName
&propertyName,
40
bool
*hasChanged);
41
static
void
setPropertyBinding
(
QObject
*
object
,
42
QQmlContext
*
context
,
43
const
QQuickDesignerSupport::PropertyName
&propertyName,
44
const
QString
&expression);
45
static
void
keepBindingFromGettingDeleted
(
QObject
*
object
,
46
QQmlContext
*
context
,
47
const
QQuickDesignerSupport::PropertyName
&propertyName);
48
void
handleDestroyed
();
49
50
private
:
51
QQuickDesignerCustomObjectData
(
QObject
*
object
);
52
void
populateResetHashes();
53
QObject
*
object
()
const
;
54
QVariant
getResetValue
(
const
QQuickDesignerSupport::PropertyName
&propertyName)
const
;
55
void
doResetProperty
(
QQmlContext
*
context
,
const
QQuickDesignerSupport::PropertyName
&propertyName);
56
bool
hasValidResetBinding
(
const
QQuickDesignerSupport::PropertyName
&propertyName)
const
;
57
QQmlAnyBinding
getResetBinding(
const
QQuickDesignerSupport::PropertyName
&propertyName)
const
;
58
bool
hasBindingForProperty
(
QQmlContext
*
context
,
const
QQuickDesignerSupport::PropertyName
&propertyName,
bool
*hasChanged)
const
;
59
void
setPropertyBinding
(
QQmlContext
*
context
,
const
QQuickDesignerSupport::PropertyName
&propertyName,
const
QString
&expression);
60
void
keepBindingFromGettingDeleted
(
QQmlContext
*
context
,
const
QQuickDesignerSupport::PropertyName
&propertyName);
61
62
QObject
*m_object;
63
QHash<QQuickDesignerSupport::PropertyName, QVariant> m_resetValueHash;
64
QHash<QQuickDesignerSupport::PropertyName, QQmlAnyBinding> m_resetBindingHash;
65
mutable
QHash<QQuickDesignerSupport::PropertyName, bool> m_hasBindingHash;
66
};
67
68
QT_END_NAMESPACE
69
70
#endif
// DESIGNERCUSTOMOBJECTDATA_H
QByteArray
\inmodule QtCore
Definition
qbytearray.h:57
QObject
\inmodule QtCore
Definition
qobject.h:103
QQmlAnyBinding
QQmlAnyBinding is an abstraction over the various bindings in QML.
Definition
qqmlanybinding_p.h:44
QQmlContext
The QQmlContext class defines a context within a QML engine.
Definition
qqmlcontext.h:25
QQuickDesignerCustomObjectData
Definition
qquickdesignercustomobjectdata_p.h:30
QQuickDesignerCustomObjectData::doResetProperty
static void doResetProperty(QObject *object, QQmlContext *context, const QQuickDesignerSupport::PropertyName &propertyName)
Definition
qquickdesignercustomobjectdata.cpp:60
QQuickDesignerCustomObjectData::handleDestroyed
void handleDestroyed()
Definition
qquickdesignercustomobjectdata.cpp:260
QQuickDesignerCustomObjectData::setPropertyBinding
static void setPropertyBinding(QObject *object, QQmlContext *context, const QQuickDesignerSupport::PropertyName &propertyName, const QString &expression)
Definition
qquickdesignercustomobjectdata.cpp:91
QQuickDesignerCustomObjectData::hasValidResetBinding
static bool hasValidResetBinding(QObject *object, const QQuickDesignerSupport::PropertyName &propertyName)
Definition
qquickdesignercustomobjectdata.cpp:68
QQuickDesignerCustomObjectData::getResetValue
static QVariant getResetValue(QObject *object, const QQuickDesignerSupport::PropertyName &propertyName)
Definition
qquickdesignercustomobjectdata.cpp:50
QQuickDesignerCustomObjectData::hasBindingForProperty
static bool hasBindingForProperty(QObject *object, QQmlContext *context, const QQuickDesignerSupport::PropertyName &propertyName, bool *hasChanged)
Definition
qquickdesignercustomobjectdata.cpp:78
QQuickDesignerCustomObjectData::keepBindingFromGettingDeleted
static void keepBindingFromGettingDeleted(QObject *object, QQmlContext *context, const QQuickDesignerSupport::PropertyName &propertyName)
Definition
qquickdesignercustomobjectdata.cpp:102
QQuickDesignerCustomObjectData::registerData
static void registerData(QObject *object)
Definition
qquickdesignercustomobjectdata.cpp:40
QQuickDesignerCustomObjectData::get
static QQuickDesignerCustomObjectData * get(QObject *object)
Definition
qquickdesignercustomobjectdata.cpp:45
QString
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition
qstring.h:129
QVariant
\inmodule QtCore
Definition
qvariant.h:65
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
context
static void * context
Definition
qandroidaudiosource.cpp:42
object
GLuint object
[3]
Definition
qopengles2ext.h:1248
qquickdesignersupport_p.h
qtdeclarative
src
quick
designer
qquickdesignercustomobjectdata_p.h
Generated by
1.10.0