Kirigami2

spellcheckinghint.cpp
1 // SPDX-FileCopyrightText: 2021 Carl Schwan <[email protected]>
2 // SPDX-License-Identifier: LGPL-2.0-or-later
3 
4 #include "spellcheckinghint.h"
5 #include <QQuickItem>
6 
7 SpellCheckingAttached::SpellCheckingAttached(QObject *parent)
8  : QObject(parent)
9 {
10 }
11 
12 SpellCheckingAttached::~SpellCheckingAttached()
13 {
14 }
15 
16 void SpellCheckingAttached::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 
31 SpellCheckingAttached *SpellCheckingAttached::qmlAttachedProperties(QObject *object)
32 {
33  return new SpellCheckingAttached(object);
34 }
35 
36 #include "moc_spellcheckinghint.cpp"
Q_EMITQ_EMIT
This attached property contains hints for enabling spell checking.
bool enabled
This property holds whether the spell checking should be enabled on the TextField/TextArea.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Dec 5 2023 04:08:21 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.