• 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++
  • kapp4
  • src
C++/kapp4/src/settings.cpp
Go to the documentation of this file.
1 // This file is generated by kconfig_compiler from %{APPNAMELC}.kcfg.
2 // All changes you do to this file will be lost.
3 
4 #include "settings.h"
5 
6 #include <kglobal.h>
7 #include <QtCore/QFile>
8 
9 class SettingsHelper
10 {
11  public:
12  SettingsHelper() : q(0) {}
13  ~SettingsHelper() { delete q; }
14  Settings *q;
15 };
16 K_GLOBAL_STATIC(SettingsHelper, s_globalSettings)
17 Settings *Settings::self()
18 {
19  if (!s_globalSettings->q) {
20  new Settings;
21  s_globalSettings->q->readConfig();
22  }
23 
24  return s_globalSettings->q;
25 }
26 
27 Settings::Settings( )
28  : KConfigSkeleton( QLatin1String( "%{APPNAMELC}rc" ) )
29 {
30  Q_ASSERT(!s_globalSettings->q);
31  s_globalSettings->q = this;
32  setCurrentGroup( QLatin1String( "Preferences" ) );
33 
34  KConfigSkeleton::ItemColor *itemCol_background;
35  itemCol_background = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "col_background" ), mCol_background, QColor( "black" ) );
36  addItem( itemCol_background, QLatin1String( "col_background" ) );
37  KConfigSkeleton::ItemColor *itemCol_foreground;
38  itemCol_foreground = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "col_foreground" ), mCol_foreground, QColor( "yellow" ) );
39  addItem( itemCol_foreground, QLatin1String( "col_foreground" ) );
40  KConfigSkeleton::ItemInt *itemVal_time;
41  itemVal_time = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "val_time" ), mVal_time, 2 );
42  addItem( itemVal_time, QLatin1String( "val_time" ) );
43 }
44 
45 Settings::~Settings()
46 {
47  if (!s_globalSettings.isDestroyed()) {
48  s_globalSettings->q = 0;
49  }
50 }
51 
Settings::~Settings
~Settings()
Definition: C++/akonadiresource/settings.cpp:41
KConfigSkeleton
Settings::mVal_time
int mVal_time
Definition: C++/kapp4/src/settings.h:72
Settings::Settings
Settings()
Definition: C++/akonadiresource/settings.cpp:29
settings.h
Settings
Definition: C++/akonadiresource/settings.h:9
Settings::mCol_foreground
QColor mCol_foreground
Definition: C++/kapp4/src/settings.h:71
Settings::mCol_background
QColor mCol_background
Definition: C++/kapp4/src/settings.h:70
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