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

kapptemplate

  • sources
  • kde-4.12
  • kdesdk
  • kapptemplate
  • templates
  • C++
  • akonadiresource
C++/akonadiresource/settings.cpp
Go to the documentation of this file.
1 // This file is generated by kconfig_compiler from %{APPNAMELC}resource.kcfg.
2 // All changes you do to this file will be lost.
3 
4 #include "settings.h"
5 
6 #include <klocale.h>
7 
8 #include <kglobal.h>
9 #include <QtCore/QFile>
10 
11 class SettingsHelper
12 {
13  public:
14  SettingsHelper() : q(0) {}
15  ~SettingsHelper() { delete q; }
16  Settings *q;
17 };
18 K_GLOBAL_STATIC(SettingsHelper, s_globalSettings)
19 Settings *Settings::self()
20 {
21  if (!s_globalSettings->q) {
22  new Settings;
23  s_globalSettings->q->readConfig();
24  }
25 
26  return s_globalSettings->q;
27 }
28 
29 Settings::Settings( )
30  : KConfigSkeleton()
31 {
32  Q_ASSERT(!s_globalSettings->q);
33  s_globalSettings->q = this;
34  setCurrentGroup( QLatin1String( "General" ) );
35 
36  mReadOnlyItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "ReadOnly" ), mReadOnly, false );
37  mReadOnlyItem->setLabel( i18n("Do not change the actual backend data.") );
38  addItem( mReadOnlyItem, QLatin1String( "ReadOnly" ) );
39 }
40 
41 Settings::~Settings()
42 {
43  if (!s_globalSettings.isDestroyed()) {
44  s_globalSettings->q = 0;
45  }
46 }
47 
Settings::mReadOnly
bool mReadOnly
Definition: C++/akonadiresource/settings.h:49
Settings::~Settings
~Settings()
Definition: C++/akonadiresource/settings.cpp:41
KConfigSkeleton
settings.h
Settings::Settings
Settings()
Definition: C++/akonadiresource/settings.cpp:29
Settings
Definition: C++/akonadiresource/settings.h:9
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:03:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kapptemplate

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

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

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