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 QQMLSTRINGCONVERTERS_P_H
5#define QQMLSTRINGCONVERTERS_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 <QtCore/qglobal.h>
19#include <QtCore/qvariant.h>
20
21#include <private/qtqmlglobal_p.h>
22
23QT_BEGIN_NAMESPACE
24
25class QPointF;
26class QSizeF;
27class QRectF;
28class QString;
29class QByteArray;
30
31namespace QQmlStringConverters
32{
33 Q_QML_PRIVATE_EXPORT QVariant variantFromString(const QString &, QMetaType preferredType, bool *ok = nullptr);
34
35 Q_QML_PRIVATE_EXPORT QVariant colorFromString(const QString &, bool *ok = nullptr);
36 Q_QML_PRIVATE_EXPORT unsigned rgbaFromString(const QString &, bool *ok = nullptr);
37
38#if QT_CONFIG(datestring)
39 Q_QML_PRIVATE_EXPORT QDate dateFromString(const QString &, bool *ok = nullptr);
40 Q_QML_PRIVATE_EXPORT QTime timeFromString(const QString &, bool *ok = nullptr);
41 Q_QML_PRIVATE_EXPORT QDateTime dateTimeFromString(const QString &, bool *ok = nullptr);
42#endif
43 Q_QML_PRIVATE_EXPORT QPointF pointFFromString(const QString &, bool *ok = nullptr);
44 Q_QML_PRIVATE_EXPORT QSizeF sizeFFromString(const QString &, bool *ok = nullptr);
45 Q_QML_PRIVATE_EXPORT QRectF rectFFromString(const QString &, bool *ok = nullptr);
46}
47
48QT_END_NAMESPACE
49
50#endif // QQMLSTRINGCONVERTERS_P_H
51

source code of qtdeclarative/src/qml/qml/qqmlstringconverters_p.h