| 1 | // SPDX-FileCopyrightText: 2021 Carl Schwan <carl@carlschwan.eu> |
|---|---|
| 2 | // SPDX-License-Identifier: LGPL-2.0-or-later |
| 3 | |
| 4 | #include "spellcheckattached.h" |
| 5 | #include <QQuickItem> |
| 6 | |
| 7 | SpellCheckAttached::SpellCheckAttached(QObject *parent) |
| 8 | : QObject(parent) |
| 9 | { |
| 10 | } |
| 11 | |
| 12 | SpellCheckAttached::~SpellCheckAttached() |
| 13 | { |
| 14 | } |
| 15 | |
| 16 | void SpellCheckAttached::setEnabled(bool enabled) |
| 17 | { |
| 18 | if (enabled == m_enabled) { |
| 19 | return; |
| 20 | } |
| 21 | |
| 22 | m_enabled = enabled; |
| 23 | Q_EMIT enabledChanged(); |
| 24 | } |
| 25 | |
| 26 | bool SpellCheckAttached::enabled() const |
| 27 | { |
| 28 | return m_enabled; |
| 29 | } |
| 30 | |
| 31 | SpellCheckAttached *SpellCheckAttached::qmlAttachedProperties(QObject *object) |
| 32 | { |
| 33 | return new SpellCheckAttached(object); |
| 34 | } |
| 35 | |
| 36 | #include "moc_spellcheckattached.cpp" |
| 37 |
