Messagelib

messageviewersettings.h
1 /*
2  This file is part of KMail.
3 
4  SPDX-FileCopyrightText: 2005 David Faure <[email protected]>
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 
13 class QTimer;
14 
15 namespace MessageViewer
16 {
17 /**
18  * @brief The MessageViewerSettings class
19  */
20 class MESSAGEVIEWER_EXPORT MessageViewerSettings : public MessageViewer::MessageViewerSettingsBase
21 {
22  Q_OBJECT
23 public:
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 
33 private Q_SLOTS:
34  MESSAGEVIEWER_NO_EXPORT void slotSyncNow();
35 
36 private:
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-2023 The KDE developers.
Generated on Sat Sep 30 2023 03:53:39 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.