| 1 | // Copyright (C) 2021 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef ENTERKEYACTION_P_H |
| 5 | #define ENTERKEYACTION_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 <QtQml/qqml.h> |
| 19 | #include <QtVirtualKeyboard/qvirtualkeyboard_global.h> |
| 20 | #include <QtCore/private/qglobal_p.h> |
| 21 | |
| 22 | QT_BEGIN_NAMESPACE |
| 23 | namespace QtVirtualKeyboard { |
| 24 | |
| 25 | class EnterKeyActionAttachedType; |
| 26 | |
| 27 | class Q_VIRTUALKEYBOARD_EXPORT EnterKeyAction : public QObject |
| 28 | { |
| 29 | Q_OBJECT |
| 30 | QML_NAMED_ELEMENT(EnterKeyAction) |
| 31 | QML_UNCREATABLE("EnterKeyAction is an abstract type that is only available as an attached property.") |
| 32 | QML_ATTACHED(EnterKeyActionAttachedType) |
| 33 | QML_ADDED_IN_VERSION(1, 0) |
| 34 | QML_EXTRA_VERSION(2, 0) |
| 35 | |
| 36 | public: |
| 37 | enum Id { |
| 38 | None, |
| 39 | Go, |
| 40 | Search, |
| 41 | Send, |
| 42 | Next, |
| 43 | Done |
| 44 | }; |
| 45 | |
| 46 | Q_ENUM(Id) |
| 47 | |
| 48 | public: |
| 49 | static EnterKeyActionAttachedType *qmlAttachedProperties(QObject *object); |
| 50 | }; |
| 51 | |
| 52 | } // namespace QtVirtualKeyboard |
| 53 | QT_END_NAMESPACE |
| 54 | |
| 55 | Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QtVirtualKeyboard)::EnterKeyAction::Id) |
| 56 | QML_DECLARE_TYPEINFO(QT_PREPEND_NAMESPACE(QtVirtualKeyboard)::EnterKeyAction, QML_HAS_ATTACHED_PROPERTIES) |
| 57 | |
| 58 | #endif |
| 59 |
