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
QQmlStringConverters Namespace Reference

Functions

Q_QML_EXPORT QVariant variantFromString (const QString &, QMetaType preferredType, bool *ok=nullptr)
 
Q_QML_EXPORT QVariant colorFromString (const QString &, bool *ok=nullptr)
 
Q_QML_EXPORT unsigned rgbaFromString (const QString &, bool *ok=nullptr)
 
Q_QML_EXPORT QPointF pointFFromString (const QString &, bool *ok=nullptr)
 
Q_QML_EXPORT QSizeF sizeFFromString (const QString &, bool *ok=nullptr)
 
Q_QML_EXPORT QRectF rectFFromString (const QString &, bool *ok=nullptr)
 
template<int NumParams, char16_t... separators>
bool isValidNumberString (const QString &s, std::array< double, NumParams > *numbers=nullptr)
 
template<typename T , int NumParams, char16_t... separators>
valueTypeFromNumberString (const QString &s, bool *ok=nullptr)
 

Function Documentation

◆ colorFromString()

QVariant QQmlStringConverters::colorFromString ( const QString & s,
bool * ok = nullptr )

Definition at line 56 of file qqmlstringconverters.cpp.

References QQmlColorProvider::colorFromString(), ok, and QQml_colorProvider().

Referenced by QtObject::color(), QtObject::colorEqual(), and colorVariantFromJSValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isValidNumberString()

template<int NumParams, char16_t... separators>
bool QQmlStringConverters::isValidNumberString ( const QString & s,
std::array< double, NumParams > * numbers = nullptr )

Definition at line 50 of file qqmlstringconverters_p.h.

References i, Q_STATIC_ASSERT_X, and view.

Referenced by QQmlJSValueTypeFromStringCheck::hasError().

+ Here is the caller graph for this function:

◆ pointFFromString()

QPointF QQmlStringConverters::pointFFromString ( const QString & s,
bool * ok = nullptr )

Definition at line 90 of file qqmlstringconverters.cpp.

References ok.

Referenced by variantFromString().

+ Here is the caller graph for this function:

◆ rectFFromString()

QRectF QQmlStringConverters::rectFFromString ( const QString & s,
bool * ok = nullptr )

Definition at line 102 of file qqmlstringconverters.cpp.

References ok.

Referenced by variantFromString().

+ Here is the caller graph for this function:

◆ rgbaFromString()

unsigned QQmlStringConverters::rgbaFromString ( const QString & s,
bool * ok = nullptr )

Definition at line 61 of file qqmlstringconverters.cpp.

References ok, QQml_colorProvider(), and QQmlColorProvider::rgbaFromString().

+ Here is the call graph for this function:

◆ sizeFFromString()

QSizeF QQmlStringConverters::sizeFFromString ( const QString & s,
bool * ok = nullptr )

Definition at line 96 of file qqmlstringconverters.cpp.

References ok.

Referenced by variantFromString().

+ Here is the caller graph for this function:

◆ valueTypeFromNumberString()

template<typename T , int NumParams, char16_t... separators>
T QQmlStringConverters::valueTypeFromNumberString ( const QString & s,
bool * ok = nullptr )

Definition at line 88 of file qqmlstringconverters_p.h.

References ok, and Q_STATIC_ASSERT_X.

Referenced by QQuickMatrix4x4ValueType::create().

+ Here is the caller graph for this function:

◆ variantFromString()

QT_BEGIN_NAMESPACE QVariant QQmlStringConverters::variantFromString ( const QString & s,
QMetaType preferredType,
bool * ok = nullptr )

Definition at line 15 of file qqmlstringconverters.cpp.

References QQmlValueTypeProvider::createValueType(), dateFromString(), dateTimeFromString(), QVariant::fromValue(), QMetaType::id(), ok, pointFFromString(), qRound(), rectFFromString(), ret, sizeFFromString(), and timeFromString().

Referenced by QQuickPropertyAnimationPrivate::convertVariant(), and QQmlPropertyPrivate::write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: