18#include <private/qmetaobject_p.h>
19#include <private/qqmlmetaobject_p.h>
20#include <private/qqmltype_p.h>
21#include <private/qtqmlglobal_p.h>
23#include <QtQml/qqml.h>
24#include <QtCore/qobject.h>
33template<
typename T, T(*Convert)(const
char *)>
38 return Convert(
nullptr);
41#define DEFINE_BOOL_CONFIG_OPTION(name, var) \
44 static const bool result = qmlGetConfigOption<bool, qmlConvertBoolConfigOption>(#var); \
63#define qmlobject_connect(Sender, SenderType, Signal, Receiver, ReceiverType, Method) \
65 SenderType *sender = (Sender); \
66 ReceiverType *receiver = (Receiver); \
67 const char *signal = (Signal); \
68 const char *method = (Method); \
69 static int signalIdx = -1; \
70 static int methodIdx = -1; \
71 if (signalIdx < 0) { \
72 Q_ASSERT((int(*signal) - '0') == QSIGNAL_CODE); \
73 signalIdx = SenderType::staticMetaObject.indexOfSignal(signal+1); \
75 if (methodIdx < 0) { \
76 int code = (int(*method) - '0'); \
77 Q_ASSERT(code == QSLOT_CODE || code == QSIGNAL_CODE); \
78 if (code == QSLOT_CODE) \
79 methodIdx = ReceiverType::staticMetaObject.indexOfSlot(method+1); \
81 methodIdx = ReceiverType::staticMetaObject.indexOfSignal(method+1); \
83 Q_ASSERT(signalIdx != -1 && methodIdx != -1); \
84 QMetaObject::connect(sender, signalIdx, receiver, methodIdx, Qt::DirectConnection); \
102#define qmlobject_disconnect(Sender, SenderType, Signal, Receiver, ReceiverType, Method) \
104 SenderType *sender = (Sender); \
105 ReceiverType *receiver = (Receiver); \
106 const char *signal = (Signal); \
107 const char *method = (Method); \
108 static int signalIdx = -1; \
109 static int methodIdx = -1; \
110 if (signalIdx < 0) { \
111 Q_ASSERT((int(*signal) - '0') == QSIGNAL_CODE); \
112 signalIdx = SenderType::staticMetaObject.indexOfSignal(signal+1); \
114 if (methodIdx < 0) { \
115 int code = (int(*method) - '0'); \
116 Q_ASSERT(code == QSLOT_CODE || code == QSIGNAL_CODE); \
117 if (code == QSLOT_CODE) \
118 methodIdx = ReceiverType::staticMetaObject.indexOfSlot(method+1); \
120 methodIdx = ReceiverType::staticMetaObject.indexOfSignal(method+1); \
122 Q_ASSERT(signalIdx != -1 && methodIdx != -1); \
123 QMetaObject::disconnect(sender, signalIdx, receiver, methodIdx); \
147 return static_cast<T
>(
object);
156 if (!
object || !
object->isQuickItemType())
163#define IS_SIGNAL_CONNECTED(Sender, SenderType, Name, Arguments) \
165 QObject *sender = (Sender); \
166 void (SenderType::*signal)Arguments = &SenderType::Name; \
167 static QMetaMethod method = QMetaMethod::fromSignal(signal); \
168 static int signalIdx = QMetaObjectPrivate::signalIndex(method); \
169 return QObjectPrivate::get(sender)->isSignalConnected(signalIdx); \
202 object->setParent(
parent);
218 int ctorIndex,
void *ctorArg);
231 virtual unsigned rgbaFromString(
const QString &,
bool *);
233 virtual QVariant fromRgbF(
double,
double,
double,
double);
234 virtual QVariant fromHslF(
double,
double,
double,
double);
235 virtual QVariant fromHsvF(
double,
double,
double,
double);
251 virtual QObject *inputMethod();
254 virtual bool openUrlExternally(
const QUrl &);
270 Q_PROPERTY(
QString organization READ organization WRITE setOrganization NOTIFY organizationChanged)
The QJSValue class acts as a container for Qt/JavaScript data types.
static QObjectPrivate * get(QObject *o)
QScopedPointer< QObjectData > d_ptr
void organizationChanged()
static bool populateValueType(QMetaType targetMetaType, void *target, const QV4::Value &source)
static Q_QML_PRIVATE_EXPORT void * heapCreateValueType(const QQmlType &targetType, const QV4::Value &source)
static QVariant constructValueType(QMetaType targetMetaType, const QMetaObject *targetMetaObject, int ctorIndex, void *ctorArg)
static QVariant createValueType(const QJSValue &, QMetaType)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
\macro QT_RESTRICTED_CAST_FROM_ASCII
employee setName("Richard Schmit")
QList< QVariant > arguments
Combined button and popup list for selecting options.
Q_CORE_EXPORT int qstrcmp(const char *str1, const char *str2)
GLsizei const GLfloat * v
[13]
GLenum GLuint GLenum GLsizei length
GLsizei GLsizei GLchar * source
GLenum GLenum GLsizei void GLsizei void * column
GLfloat GLfloat GLfloat alpha
void QQml_setParent_noEvent(QObject *object, QObject *parent)
Makes the object a child of parent.
bool QQml_isFileCaseCorrect(const QString &fileName, int length=-1)
Returns true if the case of fileName is equivalent to the file case of fileName on disk,...
Q_QML_PRIVATE_EXPORT bool qmlobject_can_qml_cast(QObject *object, const QQmlType &type)
Q_QML_PRIVATE_EXPORT bool qmlobject_can_cpp_cast(QObject *object, const QMetaObject *mo)
T qmlobject_cast(QObject *object)
This method is identical to qobject_cast<T>() except that it does not require lazy QMetaObjects to be...
T qmlGetConfigOption(const char *var)
Q_AUTOTEST_EXPORT QQmlGuiProvider * QQml_guiProvider()
Q_QML_PRIVATE_EXPORT QQmlGuiProvider * QQml_setGuiProvider(QQmlGuiProvider *)
QT_BEGIN_NAMESPACE bool qmlConvertBoolConfigOption(const char *v)
Q_QML_PRIVATE_EXPORT QQmlColorProvider * QQml_colorProvider()
Q_QML_PRIVATE_EXPORT QQmlColorProvider * QQml_setColorProvider(QQmlColorProvider *)
QQuickItem * qmlobject_cast< QQuickItem * >(QObject *object)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_AUTOTEST_EXPORT
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
Q_CORE_EXPORT bool qEnvironmentVariableIsEmpty(const char *varName) noexcept
QQmlSourceLocation(const QString &sourceFile, quint16 line, quint16 column)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent