• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

kmail

  • sources
  • kde-4.12
  • kdepim
  • kmail
  • settings
globalsettings.cpp
Go to the documentation of this file.
1 /*
2  This file is part of KMail.
3 
4  Copyright (c) 2005 David Faure <faure@kde.org>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License version 2,
8  as published by the Free Software Foundation.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 
19  As a special exception, permission is given to link this program
20  with any edition of Qt, and distribute the resulting executable,
21  without including the source code for Qt in the source distribution.
22 */
23 
24 
25 #include "settings/globalsettings.h"
26 #include <QTimer>
27 
28 GlobalSettings *GlobalSettings::mSelf = 0;
29 
30 GlobalSettings *GlobalSettings::self()
31 {
32  if ( !mSelf ) {
33  mSelf = new GlobalSettings();
34  mSelf->readConfig();
35  }
36 
37  return mSelf;
38 }
39 
40 GlobalSettings::GlobalSettings()
41 {
42  mConfigSyncTimer = new QTimer( this );
43  mConfigSyncTimer->setSingleShot( true );
44  connect( mConfigSyncTimer, SIGNAL(timeout()), this, SLOT(slotSyncNow()) );
45 }
46 
47 void GlobalSettings::requestSync()
48 {
49  if ( !mConfigSyncTimer->isActive() )
50  mConfigSyncTimer->start( 0 );
51 }
52 
53 void GlobalSettings::slotSyncNow()
54 {
55  config()->sync();
56 }
57 
58 GlobalSettings::~GlobalSettings()
59 {
60 }
61 
62 #include "globalsettings.moc"
globalsettings.h
GlobalSettings
Definition: globalsettings.h:31
GlobalSettings::requestSync
void requestSync()
Call this slot instead of directly KConfig::sync() to minimize the overall config writes...
Definition: globalsettings.cpp:47
GlobalSettings::self
static GlobalSettings * self()
Definition: globalsettings.cpp:30
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kmail

Skip menu "kmail"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal