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

kblackbox

  • sources
  • kde-4.14
  • kdegames
  • kblackbox
kbbprefs.cpp
Go to the documentation of this file.
1 // This file is generated by kconfig_compiler from kblackbox.kcfg.
2 // All changes you do to this file will be lost.
3 
4 #include "kbbprefs.h"
5 
6 #include <klocale.h>
7 
8 #include <kglobal.h>
9 #include <QtCore/QFile>
10 
11 class KBBPrefsHelper
12 {
13  public:
14  KBBPrefsHelper() : q(0) {}
15  ~KBBPrefsHelper() { delete q; }
16  KBBPrefs *q;
17 };
18 K_GLOBAL_STATIC(KBBPrefsHelper, s_globalKBBPrefs)
19 KBBPrefs *KBBPrefs::self()
20 {
21  if (!s_globalKBBPrefs->q) {
22  new KBBPrefs;
23  s_globalKBBPrefs->q->readConfig();
24  }
25 
26  return s_globalKBBPrefs->q;
27 }
28 
29 KBBPrefs::KBBPrefs( )
30  : KConfigSkeleton( QLatin1String( "kblackboxrc" ) )
31 {
32  Q_ASSERT(!s_globalKBBPrefs->q);
33  s_globalKBBPrefs->q = this;
34  setCurrentGroup( QLatin1String( "KBlackBox Setup" ) );
35 
36  KConfigSkeleton::ItemString *itemTheme;
37  itemTheme = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "theme" ), mTheme );
38  itemTheme->setLabel( i18n("File of the current theme of the graphic elements. (SVGZ file with path and file extension)") );
39  addItem( itemTheme, QLatin1String( "theme" ) );
40  KConfigSkeleton::ItemInt *itemBalls;
41  itemBalls = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "balls" ), mBalls, 4 );
42  itemBalls->setLabel( i18n("Number of balls for custom difficulty level") );
43  addItem( itemBalls, QLatin1String( "balls" ) );
44  KConfigSkeleton::ItemInt *itemColumns;
45  itemColumns = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "columns" ), mColumns, 8 );
46  itemColumns->setLabel( i18n("Number of columns of the board for custom difficulty level") );
47  addItem( itemColumns, QLatin1String( "columns" ) );
48  KConfigSkeleton::ItemInt *itemRows;
49  itemRows = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "rows" ), mRows, 8 );
50  itemRows->setLabel( i18n("Number of rows of the board for custom difficuty level") );
51  addItem( itemRows, QLatin1String( "rows" ) );
52 }
53 
54 KBBPrefs::~KBBPrefs()
55 {
56  if (!s_globalKBBPrefs.isDestroyed()) {
57  s_globalKBBPrefs->q = 0;
58  }
59 }
60 
kbbprefs.h
KConfigSkeleton
KBBPrefs::KBBPrefs
KBBPrefs()
Definition: kbbprefs.cpp:29
KBBPrefs
Definition: kbbprefs.h:9
KBBPrefs::~KBBPrefs
~KBBPrefs()
Definition: kbbprefs.cpp:54
KBBPrefs::mTheme
QString mTheme
Definition: kbbprefs.h:98
KBBPrefs::mRows
int mRows
Definition: kbbprefs.h:101
KBBPrefs::mBalls
int mBalls
Definition: kbbprefs.h:99
QLatin1String
KBBPrefs::mColumns
int mColumns
Definition: kbbprefs.h:100
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kblackbox

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