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
qqmlsignalnames_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 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 QQMLSIGNALANDPROPERTYNAMES_P_H
5#define QQMLSIGNALANDPROPERTYNAMES_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 <cstddef>
19#include <optional>
20
21#include <QtQml/private/qtqmlglobal_p.h>
22#include <QtCore/qstringview.h>
23#include <QtCore/qstring.h>
24#include <type_traits>
25
27
28class Q_QML_EXPORT QQmlSignalNames
29{
30public:
31 static QString propertyNameToChangedSignalName(QStringView property);
32 static QByteArray propertyNameToChangedSignalName(QUtf8StringView property);
33
34 static QString propertyNameToChangedHandlerName(QStringView property);
35
37
38 static std::optional<QString> changedSignalNameToPropertyName(QStringView changeSignal);
39 static std::optional<QByteArray> changedSignalNameToPropertyName(QUtf8StringView changeSignal);
40
41 static std::optional<QString> changedHandlerNameToPropertyName(QStringView handler);
42 static std::optional<QByteArray> changedHandlerNameToPropertyName(QUtf8StringView handler);
43
44 static std::optional<QString> handlerNameToSignalName(QStringView handler);
45 static std::optional<QString> changedHandlerNameToSignalName(QStringView changedHandler);
46
47 static bool isChangedHandlerName(QStringView signalName);
48 static bool isChangedSignalName(QStringView signalName);
49 static bool isHandlerName(QStringView signalName);
50
51 static QString addPrefixToPropertyName(QStringView prefix, QStringView propertyName);
52
53 // ### Qt7: remove this
54 static std::optional<QString> badHandlerNameToSignalName(QStringView handler);
55};
56
58
59#endif // QQMLSIGNALANDPROPERTYNAMES_P_H
\inmodule QtCore
\inmodule QtCore
Definition qbytearray.h:57
static std::optional< QByteArray > changedHandlerNameToPropertyName(QUtf8StringView handler)
\inmodule QtCore
Definition qstringview.h:78
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
auto signal
Combined button and popup list for selecting options.
static QHashedString signalNameToHandlerName(const QHashedString &methodName)
const char property[13]
Definition qwizard.cpp:101