Messagelib

messageviewersettings.h
1/*
2 This file is part of KMail.
3
4 SPDX-FileCopyrightText: 2005 David Faure <faure@kde.org>
5
6 SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0
7*/
8
9#pragma once
10
11#include "globalsettings_messageviewer.h"
12
13class QTimer;
14
15namespace MessageViewer
16{
17/**
18 * @brief The MessageViewerSettings class
19 */
20class MESSAGEVIEWER_EXPORT MessageViewerSettings : public MessageViewer::MessageViewerSettingsBase
21{
22 Q_OBJECT
23public:
24 static MessageViewerSettings *self();
25
26 /** Call this slot instead of directly 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 MESSAGEVIEWER_NO_EXPORT void slotSyncNow();
35
36private:
37 MESSAGEVIEWER_NO_EXPORT MessageViewerSettings();
38 ~MessageViewerSettings() override;
39 static MessageViewerSettings *mSelf;
40
41 QTimer *mConfigSyncTimer = nullptr;
42};
43}
The MessageViewerSettings class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.