Kirigami2

spellcheckattached.cpp
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
7SpellCheckAttached::SpellCheckAttached(QObject *parent)
8 : QObject(parent)
9{
10}
11
12SpellCheckAttached::~SpellCheckAttached()
13{
14}
15
16void SpellCheckAttached::setEnabled(bool enabled)
17{
18 if (enabled == m_enabled) {
19 return;
20 }
21
22 m_enabled = enabled;
23 Q_EMIT enabledChanged();
24}
25
27{
28 return m_enabled;
29}
30
31SpellCheckAttached *SpellCheckAttached::qmlAttachedProperties(QObject *object)
32{
33 return new SpellCheckAttached(object);
34}
35
36#include "moc_spellcheckattached.cpp"
This attached property contains hints for spell checker.
QML_ELEMENTbool enabled
This property holds whether the spell checking should be enabled on the TextField/TextArea.
Q_EMITQ_EMIT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.