| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #include <QtVirtualKeyboard/private/enterkeyactionattachedtype_p.h> |
| 5 | |
| 6 | QT_BEGIN_NAMESPACE |
| 7 | namespace QtVirtualKeyboard { |
| 8 | |
| 9 | /*! |
| 10 | \class QtVirtualKeyboard::EnterKeyActionAttachedType |
| 11 | \internal |
| 12 | */ |
| 13 | |
| 14 | EnterKeyActionAttachedType::EnterKeyActionAttachedType(QObject *parent) : |
| 15 | QObject(parent), |
| 16 | m_actionId(EnterKeyAction::None), |
| 17 | m_label(), |
| 18 | m_enabled(true) |
| 19 | { |
| 20 | } |
| 21 | |
| 22 | int EnterKeyActionAttachedType::actionId() const |
| 23 | { |
| 24 | return m_actionId; |
| 25 | } |
| 26 | |
| 27 | void EnterKeyActionAttachedType::setActionId(int actionId) |
| 28 | { |
| 29 | if (m_actionId != actionId) { |
| 30 | m_actionId = actionId; |
| 31 | emit actionIdChanged(); |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | QString EnterKeyActionAttachedType::label() const |
| 36 | { |
| 37 | return m_label; |
| 38 | } |
| 39 | |
| 40 | void EnterKeyActionAttachedType::setLabel(const QString& label) |
| 41 | { |
| 42 | if (m_label != label) { |
| 43 | m_label = label; |
| 44 | emit labelChanged(); |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | bool EnterKeyActionAttachedType::enabled() const |
| 49 | { |
| 50 | return m_enabled; |
| 51 | } |
| 52 | |
| 53 | void EnterKeyActionAttachedType::setEnabled(bool enabled) |
| 54 | { |
| 55 | if (m_enabled != enabled) { |
| 56 | m_enabled = enabled; |
| 57 | emit enabledChanged(); |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | } // namespace QtVirtualKeyboard |
| 62 | QT_END_NAMESPACE |
| 63 |
