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

kapman

  • sources
  • kde-4.14
  • kdegames
  • kapman
settings.cpp
Go to the documentation of this file.
1 // This file is generated by kconfig_compiler from kapman.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( "kapmanrc" ) )
29 {
30  Q_ASSERT(!s_globalSettings->q);
31  s_globalSettings->q = this;
32  setCurrentGroup( QLatin1String( "General" ) );
33 
34  KConfigSkeleton::ItemString *itemTheme;
35  itemTheme = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Theme" ), mTheme, QLatin1String( "themes/mummies_crypt.desktop" ) );
36  addItem( itemTheme, QLatin1String( "Theme" ) );
37  KConfigSkeleton::ItemBool *itemSounds;
38  itemSounds = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Sounds" ), mSounds, true );
39  addItem( itemSounds, QLatin1String( "Sounds" ) );
40 }
41 
42 Settings::~Settings()
43 {
44  if (!s_globalSettings.isDestroyed()) {
45  s_globalSettings->q = 0;
46  }
47 }
48 
Settings::~Settings
~Settings()
Definition: settings.cpp:42
KConfigSkeleton
Settings::mTheme
QString mTheme
Definition: settings.h:60
Settings::Settings
Settings()
Definition: settings.cpp:27
Settings
Definition: settings.h:9
Settings::mSounds
bool mSounds
Definition: settings.h:61
settings.h
QLatin1String
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kapman

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

kdegames API Reference

Skip menu "kdegames API Reference"
  • granatier
  • kapman
  • kblackbox
  • kgoldrunner
  • kigo
  • kmahjongg
  • KShisen
  • ksquares
  • libkdegames
  •   highscore
  •   libkdegamesprivate
  •     kgame
  • libkmahjongg
  • palapeli
  •   libpala

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