KTextAddons

textautocorrectionsettings.h
1/*
2 SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "textautocorrectioncore_export.h"
10#include "textautocorrectionsetting_base.h"
11
12class QTimer;
13
14namespace TextAutoCorrectionCore
15{
16/**
17 * @brief The TextAutoCorrectionSettings class
18 * @author Laurent Montel <montel@kde.org>
19 */
20class TEXTAUTOCORRECTIONCORE_EXPORT TextAutoCorrectionSettings : public TextAutoCorrectionCore::TextAutoCorrectionSettingsBase
21{
22 Q_OBJECT
23public:
24 static TextAutoCorrectionSettings *self();
25
26 /** Call this slot instead of directly @ref KConfig::sync() to
27 minimize the overall config writes. Calling this slot will
28 schedule a sync of the application config file using a timer, so
29 that many consecutive calls can be condensed into a single
30 sync, which is more efficient. */
31 void requestSync();
32
33private Q_SLOTS:
34 TEXTAUTOCORRECTIONCORE_NO_EXPORT void slotSyncNow();
35
36private:
37 TEXTAUTOCORRECTIONCORE_NO_EXPORT TextAutoCorrectionSettings();
39 static TextAutoCorrectionSettings *mSelf;
40
41 QTimer *const mConfigSyncTimer;
42};
43}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:49:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.