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

cantor/src/lib

  • sources
  • kde-4.14
  • kdeedu
  • cantor
  • src
  • lib
settings.cpp
Go to the documentation of this file.
1 // This file is generated by kconfig_compiler from cantor_libs.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()
29 {
30  Q_ASSERT(!s_globalSettings->q);
31  s_globalSettings->q = this;
32  setCurrentGroup( QLatin1String( "Cantor" ) );
33 
34  KConfigSkeleton::ItemString *itemLatexCommand;
35  itemLatexCommand = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "LatexCommand" ), mLatexCommand, KStandardDirs::findExe( "latex" ) );
36  addItem( itemLatexCommand, QLatin1String( "LatexCommand" ) );
37  KConfigSkeleton::ItemString *itemDvipsCommand;
38  itemDvipsCommand = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "DvipsCommand" ), mDvipsCommand, KStandardDirs::findExe( "dvips" ) );
39  addItem( itemDvipsCommand, QLatin1String( "DvipsCommand" ) );
40 }
41 
42 Settings::~Settings()
43 {
44  if (!s_globalSettings.isDestroyed()) {
45  s_globalSettings->q = 0;
46  }
47 }
48 
Settings::mLatexCommand
QString mLatexCommand
Definition: settings.h:43
Settings::~Settings
~Settings()
Definition: settings.cpp:42
KConfigSkeleton
Settings::mDvipsCommand
QString mDvipsCommand
Definition: settings.h:44
Settings::Settings
Settings()
Definition: settings.cpp:27
Settings
Definition: settings.h:10
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:16:33 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

cantor/src/lib

Skip menu "cantor/src/lib"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

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