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