// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QQMLSIGNALANDPROPERTYNAMES_P_H #define QQMLSIGNALANDPROPERTYNAMES_P_H // // W A R N I N G // ------------- // // This file is not part of the Qt API. It exists purely as an // implementation detail. This header file may change from version to // version without notice, or even be removed. // // We mean it. // #include #include #include #include #include #include QT_BEGIN_NAMESPACE class Q_QML_EXPORT QQmlSignalNames { public: static QString propertyNameToChangedSignalName(QStringView property); static QByteArray propertyNameToChangedSignalName(QUtf8StringView property); static QString propertyNameToChangedHandlerName(QStringView property); static QString signalNameToHandlerName(QAnyStringView signal); static std::optional changedSignalNameToPropertyName(QStringView changeSignal); static std::optional changedSignalNameToPropertyName(QUtf8StringView changeSignal); static std::optional changedHandlerNameToPropertyName(QStringView handler); static std::optional changedHandlerNameToPropertyName(QUtf8StringView handler); static std::optional handlerNameToSignalName(QStringView handler); static std::optional changedHandlerNameToSignalName(QStringView changedHandler); static bool isChangedHandlerName(QStringView signalName); static bool isChangedSignalName(QStringView signalName); static bool isHandlerName(QStringView signalName); static QString addPrefixToPropertyName(QStringView prefix, QStringView propertyName); // ### Qt7: remove this static std::optional badHandlerNameToSignalName(QStringView handler); }; QT_END_NAMESPACE #endif // QQMLSIGNALANDPROPERTYNAMES_P_H