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

kmahjongg

  • sources
  • kde-4.14
  • kdegames
  • kmahjongg
prefs.cpp
Go to the documentation of this file.
1 // This file is generated by kconfig_compiler from kmahjongg.kcfg.
2 // All changes you do to this file will be lost.
3 
4 #include "prefs.h"
5 
6 #include <kglobal.h>
7 #include <QtCore/QFile>
8 
9 class PrefsHelper
10 {
11  public:
12  PrefsHelper() : q(0) {}
13  ~PrefsHelper() { delete q; }
14  Prefs *q;
15 };
16 K_GLOBAL_STATIC(PrefsHelper, s_globalPrefs)
17 Prefs *Prefs::self()
18 {
19  if (!s_globalPrefs->q) {
20  new Prefs;
21  s_globalPrefs->q->readConfig();
22  }
23 
24  return s_globalPrefs->q;
25 }
26 
27 Prefs::Prefs( )
28  : KConfigSkeleton( QLatin1String( "kmahjonggrc" ) )
29 {
30  Q_ASSERT(!s_globalPrefs->q);
31  s_globalPrefs->q = this;
32  setCurrentGroup( QLatin1String( "General" ) );
33 
34  KConfigSkeleton::ItemString *itemTileSet;
35  itemTileSet = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Tileset_file" ), mTileSet );
36  addItem( itemTileSet, QLatin1String( "TileSet" ) );
37  KConfigSkeleton::ItemString *itemBackground;
38  itemBackground = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Background_file" ), mBackground );
39  addItem( itemBackground, QLatin1String( "Background" ) );
40  KConfigSkeleton::ItemString *itemLayout;
41  itemLayout = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "Layout_file" ), mLayout );
42  addItem( itemLayout, QLatin1String( "Layout" ) );
43  KConfigSkeleton::ItemInt *itemAngle;
44  itemAngle = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "Angle" ), mAngle, 0 );
45  addItem( itemAngle, QLatin1String( "Angle" ) );
46  KConfigSkeleton::ItemBool *itemRandomLayout;
47  itemRandomLayout = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "RandomLayout" ), mRandomLayout, false );
48  addItem( itemRandomLayout, QLatin1String( "RandomLayout" ) );
49  KConfigSkeleton::ItemBool *itemSolvableGames;
50  itemSolvableGames = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Solvable_game" ), mSolvableGames, true );
51  addItem( itemSolvableGames, QLatin1String( "SolvableGames" ) );
52  KConfigSkeleton::ItemBool *itemShowMatchingTiles;
53  itemShowMatchingTiles = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "ShowMatchingTiles" ), mShowMatchingTiles, false );
54  addItem( itemShowMatchingTiles, QLatin1String( "ShowMatchingTiles" ) );
55  KConfigSkeleton::ItemRect *itemEditorGeometry;
56  itemEditorGeometry = new KConfigSkeleton::ItemRect( currentGroup(), QLatin1String( "EditorGeometry" ), mEditorGeometry );
57  addItem( itemEditorGeometry, QLatin1String( "EditorGeometry" ) );
58 }
59 
60 Prefs::~Prefs()
61 {
62  if (!s_globalPrefs.isDestroyed()) {
63  s_globalPrefs->q = 0;
64  }
65 }
66 
Prefs::mShowMatchingTiles
bool mShowMatchingTiles
Definition: prefs.h:180
Prefs
Definition: prefs.h:9
prefs.h
KConfigSkeleton
Prefs::mBackground
QString mBackground
Definition: prefs.h:175
Prefs::mEditorGeometry
QRect mEditorGeometry
Definition: prefs.h:181
Prefs::mAngle
int mAngle
Definition: prefs.h:177
Prefs::mRandomLayout
bool mRandomLayout
Definition: prefs.h:178
Prefs::Prefs
Prefs()
Definition: prefs.cpp:27
Prefs::mSolvableGames
bool mSolvableGames
Definition: prefs.h:179
QLatin1String
Prefs::~Prefs
~Prefs()
Definition: prefs.cpp:60
Prefs::mLayout
QString mLayout
Definition: prefs.h:176
Prefs::mTileSet
QString mTileSet
Definition: prefs.h:174
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:33 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kmahjongg

Skip menu "kmahjongg"
  • 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