![]() |
Qt 6.x
The Qt SDK
|
#include <private/qmetaobject_p.h>
#include <private/qqmlmetaobject_p.h>
#include <private/qqmltype_p.h>
#include <private/qtqmlglobal_p.h>
#include <QtQml/qqml.h>
#include <QtCore/qobject.h>
Go to the source code of this file.
Classes | |
class | QQmlValueTypeProvider |
class | QQmlColorProvider |
class | QQmlGuiProvider |
class | QQmlApplication |
class | QQmlApplicationPrivate |
struct | QQmlSourceLocation |
Macros | |
#define | DEFINE_BOOL_CONFIG_OPTION(name, var) |
#define | qmlobject_connect(Sender, SenderType, Signal, Receiver, ReceiverType, Method) |
Connect Signal of Sender to Method of Receiver. | |
#define | qmlobject_disconnect(Sender, SenderType, Signal, Receiver, ReceiverType, Method) |
Disconnect Signal of Sender from Method of Receiver. | |
#define | IS_SIGNAL_CONNECTED(Sender, SenderType, Name, Arguments) |
Functions | |
QT_BEGIN_NAMESPACE bool | qmlConvertBoolConfigOption (const char *v) |
template<typename T , T(*)(const char *) Convert> | |
T | qmlGetConfigOption (const char *var) |
Q_QML_PRIVATE_EXPORT bool | qmlobject_can_cpp_cast (QObject *object, const QMetaObject *mo) |
Q_QML_PRIVATE_EXPORT bool | qmlobject_can_qml_cast (QObject *object, const QQmlType &type) |
template<class T > | |
T | qmlobject_cast (QObject *object) |
This method is identical to qobject_cast<T>() except that it does not require lazy QMetaObjects to be built, so should be preferred in all QML code that might interact with QML built objects. | |
template<> | |
QQuickItem * | qmlobject_cast< QQuickItem * > (QObject *object) |
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, and false otherwise. | |
void | QQml_setParent_noEvent (QObject *object, QObject *parent) |
Makes the object a child of parent. | |
Q_QML_PRIVATE_EXPORT QQmlColorProvider * | QQml_setColorProvider (QQmlColorProvider *) |
Q_QML_PRIVATE_EXPORT QQmlColorProvider * | QQml_colorProvider () |
Q_QML_PRIVATE_EXPORT QQmlGuiProvider * | QQml_setGuiProvider (QQmlGuiProvider *) |
Q_AUTOTEST_EXPORT QQmlGuiProvider * | QQml_guiProvider () |
Definition at line 41 of file qqmlglobal_p.h.
#define IS_SIGNAL_CONNECTED | ( | Sender, | |
SenderType, | |||
Name, | |||
Arguments | |||
) |
Definition at line 163 of file qqmlglobal_p.h.
#define qmlobject_connect | ( | Sender, | |
SenderType, | |||
Signal, | |||
Receiver, | |||
ReceiverType, | |||
Method | |||
) |
Connect Signal of Sender to Method of Receiver.
Signal must be of type SenderType and Receiver of type ReceiverType.
Unlike QObject::connect(), this method caches the lookup of the signal and method indexes. It also does not require lazy QMetaObjects to be built so should be preferred in all QML code that might interact with QML built objects.
Definition at line 63 of file qqmlglobal_p.h.
#define qmlobject_disconnect | ( | Sender, | |
SenderType, | |||
Signal, | |||
Receiver, | |||
ReceiverType, | |||
Method | |||
) |
Disconnect Signal of Sender from Method of Receiver.
Signal must be of type SenderType and Receiver of type ReceiverType.
Unlike QObject::disconnect(), this method caches the lookup of the signal and method indexes. It also does not require lazy QMetaObjects to be built so should be preferred in all QML code that might interact with QML built objects.
Definition at line 102 of file qqmlglobal_p.h.
|
inline |
Definition at line 28 of file qqmlglobal_p.h.
References qstrcmp().
T qmlGetConfigOption | ( | const char * | var | ) |
Definition at line 34 of file qqmlglobal_p.h.
References Q_UNLIKELY, qEnvironmentVariableIsEmpty(), qgetenv(), and var.
Referenced by QV4::ExecutionEngine::diskCacheOptions().
Q_QML_PRIVATE_EXPORT bool qmlobject_can_cpp_cast | ( | QObject * | object, |
const QMetaObject * | mo | ||
) |
Definition at line 919 of file qqmlglobal.cpp.
References ddata_for_cast(), mo, and Q_ASSERT.
Referenced by QV4::MatchScore(), and qmlobject_cast().
Definition at line 927 of file qqmlglobal.cpp.
References QQmlRefPointer< T >::data(), ddata_for_cast(), QQmlMetaType::findPropertyCacheInCompositeTypes(), and Q_ASSERT.
Referenced by QV4::coerceQObject().
T qmlobject_cast | ( | QObject * | object | ) |
This method is identical to qobject_cast<T>() except that it does not require lazy QMetaObjects to be built, so should be preferred in all QML code that might interact with QML built objects.
Definition at line 142 of file qqmlglobal_p.h.
References qmlobject_can_cpp_cast().
|
inline |
Definition at line 154 of file qqmlglobal_p.h.
Referenced by QQuickKeysAttached::QQuickKeysAttached(), QQuickPathView::childMouseEventFilter(), QQuickWindowQmlImpl::componentComplete(), QQuickItemView::createdItem(), QQuickTableViewPrivate::createFxTableItem(), QQuickItemViewPrivate::createItem(), QQuickFlickablePrivate::data_append(), QQuickItemPrivate::data_append(), QQuickDeliveryAgentPrivate::deliverTouchAsMouse(), QQuickDeliveryAgentPrivate::deliverUpdatedPoints(), QQuickItemView::destroyingItem(), QQuickPathViewPrivate::getItem(), QQuickDeliveryAgentPrivate::handleWindowDeactivate(), QQuickStackElement::incubate(), QQuickLoaderPrivate::incubatorStateChanged(), QQuickItemView::initItem(), QQuickGridView::initItem(), QQuickListView::initItem(), QQuickFlickable::mouseReleaseEvent(), QQuickDeliveryAgentPrivate::onGrabChanged(), QQuickPointerHandler::parentItem(), qquickitem_autoParent(), QQuickItemPrivate::setImplicitLayoutMirror(), QQuickLoaderPrivate::setInitialState(), and QQuickFlickable::touchEvent().
Q_QML_PRIVATE_EXPORT QQmlColorProvider * QQml_colorProvider | ( | ) |
Definition at line 772 of file qqmlglobal.cpp.
References getColorProvider().
Referenced by QtObject::alpha(), QQuickColorValueType::alpha(), QQmlStringConverters::colorFromString(), QtObject::darker(), QQuickColorValueType::darker(), QuickTestResult::fuzzyCompare(), QtObject::hsla(), QtObject::hsva(), QtObject::lighter(), QQuickColorValueType::lighter(), QtObject::rgba(), QQmlStringConverters::rgbaFromString(), QtObject::tint(), and QQuickColorValueType::tint().
Q_AUTOTEST_EXPORT QQmlGuiProvider * QQml_guiProvider | ( | ) |
Definition at line 825 of file qqmlglobal.cpp.
References getGuiProvider().
Referenced by QtObject::fontFamilies(), QtObject::inputMethod(), QtObject::openUrlExternally(), QQmlPlatform::pluginName(), and QtObject::styleHints().
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, and false otherwise.
This is used to ensure that the behavior of QML on a case-insensitive file system is the same as on a case-sensitive file system. This function performs a "best effort" attempt to determine the real case of the file. It may have false positives (say the case is correct when it isn't), but it should never have a false negative (say the case is incorrect when it is correct).
Length specifies specifies the number of characters to be checked from behind. That is, if a file name results from a relative path specification like "foo/bar.qml" and is made absolute, the original length (11) should be passed indicating that only the last part of the relative path should be checked.
Definition at line 2088 of file qqmlengine.cpp.
References QFileInfo::absoluteFilePath(), QString::at(), QFileInfo::canonicalFilePath(), fileName, info, QString::lastIndexOf(), QString::length(), Q_UNUSED, and qMin().
Referenced by QQmlPluginImporter::importDynamicPlugin(), QQmlFile::load(), QQmlFile::load(), QQmlTypeLoader::qmldirContent(), and QQmlImportInstance::resolveType().
Q_QML_PRIVATE_EXPORT QQmlColorProvider * QQml_setColorProvider | ( | QQmlColorProvider * | newProvider | ) |
Definition at line 754 of file qqmlglobal.cpp.
References colorProvider.
Referenced by QQuick_initializeModule().
Q_QML_PRIVATE_EXPORT QQmlGuiProvider * QQml_setGuiProvider | ( | QQmlGuiProvider * | newProvider | ) |
Definition at line 808 of file qqmlglobal.cpp.
References guiProvider.
Referenced by QQuick_initializeModule().
Makes the object a child of parent.
Note that when using this method, neither parent nor the object's previous parent (if it had one) will receive ChildRemoved or ChildAdded events.
Definition at line 197 of file qqmlglobal_p.h.
References QObject::d_ptr, QObjectPrivate::get(), parent, and QObjectData::sendChildEvents.
Referenced by QQmlDelegateModelAttached::QQmlDelegateModelAttached(), QQmlDelegateModelAttached::QQmlDelegateModelAttached(), QQuickMenuPrivate::beginCreateItem(), QQuickMenuBarPrivate::beginCreateItem(), QQuickItemViewPrivate::createComponentItem(), QQuickFolderBreadcrumbBarPrivate::createDelegateItem(), QQuickPathViewPrivate::createHighlight(), QQuickListViewPrivate::getSectionItem(), QQuickFlickablePrivate::init(), QQuickWindowPrivate::init(), QQuickStateGroupPrivate::setCurrentStateInternal(), QQuickLoaderPrivate::setInitialState(), QQmlStrongJSQObjectReference< T >::setObject(), and QQuickViewPrivate::setRootObject().