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

lokalize

  • sources
  • kde-4.14
  • kdesdk
  • lokalize
  • src
  • prefs
prefs_lokalize.cpp
Go to the documentation of this file.
1 // This file is generated by kconfig_compiler from lokalize.kcfg.
2 // All changes you do to this file will be lost.
3 
4 #include "prefs_lokalize.h"
5 
6 #include <klocale.h>
7 
8 #include <kglobal.h>
9 #include <QtCore/QFile>
10 
11 class SettingsHelper
12 {
13  public:
14  SettingsHelper() : q(0) {}
15  ~SettingsHelper() { delete q; }
16  Settings *q;
17 };
18 K_GLOBAL_STATIC(SettingsHelper, s_globalSettings)
19 Settings *Settings::self()
20 {
21  if (!s_globalSettings->q) {
22  new Settings;
23  s_globalSettings->q->readConfig();
24  }
25 
26  return s_globalSettings->q;
27 }
28 
29 Settings::Settings( )
30  : KConfigSkeleton( QLatin1String( "lokalizerc" ) )
31 {
32  Q_ASSERT(!s_globalSettings->q);
33  s_globalSettings->q = this;
34  setCurrentGroup( QLatin1String( "Identity" ) );
35 
36  mAuthorNameItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "authorName" ), mAuthorName, KEMailSettings().getSetting(KEMailSettings::RealName) );
37  mAuthorNameItem->setLabel( i18n("authorName") );
38  addItem( mAuthorNameItem, QLatin1String( "authorName" ) );
39  mAuthorLocalizedNameItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "authorLocalizedName" ), mAuthorLocalizedName, KEMailSettings().getSetting(KEMailSettings::RealName) );
40  mAuthorLocalizedNameItem->setLabel( i18n("authorLocalizedName") );
41  addItem( mAuthorLocalizedNameItem, QLatin1String( "authorLocalizedName" ) );
42  mAuthorEmailItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "authorEmail" ), mAuthorEmail, KEMailSettings().getSetting(KEMailSettings::EmailAddress) );
43  mAuthorEmailItem->setLabel( i18n("authorEmail") );
44  addItem( mAuthorEmailItem, QLatin1String( "authorEmail" ) );
45  mDefaultLangCodeItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "DefaultLangCode" ), mDefaultLangCode, KGlobal::locale()->language() );
46  mDefaultLangCodeItem->setLabel( i18n("DefaultLangCode") );
47  addItem( mDefaultLangCodeItem, QLatin1String( "DefaultLangCode" ) );
48  mDefaultMailingListItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "DefaultMailingList" ), mDefaultMailingList, getMailingList() );
49  mDefaultMailingListItem->setLabel( i18n("DefaultMailingList") );
50  addItem( mDefaultMailingListItem, QLatin1String( "DefaultMailingList" ) );
51 
52  setCurrentGroup( QLatin1String( "Appearance" ) );
53 
54  mAddColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "AddColor" ), mAddColor, QColor( "#99CCFF" ) );
55  mAddColorItem->setLabel( i18n("AddColor") );
56  addItem( mAddColorItem, QLatin1String( "AddColor" ) );
57  mDelColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "DelColor" ), mDelColor, QColor( "#FF9999" ) );
58  mDelColorItem->setLabel( i18n("DelColor") );
59  addItem( mDelColorItem, QLatin1String( "DelColor" ) );
60  mHighlightSpacesItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "HighlightSpaces" ), mHighlightSpaces, true );
61  mHighlightSpacesItem->setLabel( i18n("HighlightSpaces") );
62  addItem( mHighlightSpacesItem, QLatin1String( "HighlightSpaces" ) );
63  mMsgFontItem = new KConfigSkeleton::ItemFont( currentGroup(), QLatin1String( "MsgFont" ), mMsgFont, KGlobalSettings::generalFont() );
64  mMsgFontItem->setLabel( i18n("MsgFont") );
65  addItem( mMsgFontItem, QLatin1String( "MsgFont" ) );
66  mLedsItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Leds" ), mLeds, false );
67  mLedsItem->setLabel( i18n("Leds") );
68  addItem( mLedsItem, QLatin1String( "Leds" ) );
69 
70  setCurrentGroup( QLatin1String( "Editor" ) );
71 
72  mAutoApproveItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "AutoApprove" ), mAutoApprove, true );
73  mAutoApproveItem->setLabel( i18n("AutoApprove") );
74  addItem( mAutoApproveItem, QLatin1String( "AutoApprove" ) );
75  mAutoSpellcheckItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "AutoSpellcheck" ), mAutoSpellcheck, true );
76  mAutoSpellcheckItem->setLabel( i18n("AutoSpellcheck") );
77  addItem( mAutoSpellcheckItem, QLatin1String( "AutoSpellcheck" ) );
78  mMouseWheelGoItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "MouseWheelGo" ), mMouseWheelGo, false );
79  mMouseWheelGoItem->setLabel( i18n("MouseWheelGo") );
80  addItem( mMouseWheelGoItem, QLatin1String( "MouseWheelGo" ) );
81  mWordCompletionLengthItem = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "WordCompletionLength" ), mWordCompletionLength, 4 );
82  mWordCompletionLengthItem->setLabel( i18n("WordCompletionLength") );
83  addItem( mWordCompletionLengthItem, QLatin1String( "WordCompletionLength" ) );
84 
85  setCurrentGroup( QLatin1String( "TM" ) );
86 
87  mPrefetchTMItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "PrefetchTM" ), mPrefetchTM, false );
88  mPrefetchTMItem->setLabel( i18n("PrefetchTM") );
89  addItem( mPrefetchTMItem, QLatin1String( "PrefetchTM" ) );
90  mSuggCountItem = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "SuggCount" ), mSuggCount, 7 );
91  mSuggCountItem->setLabel( i18n("SuggCount") );
92  addItem( mSuggCountItem, QLatin1String( "SuggCount" ) );
93  mAutoaddTMItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "AutoaddTM" ), mAutoaddTM, true );
94  mAutoaddTMItem->setLabel( i18n("AutoaddTM") );
95  addItem( mAutoaddTMItem, QLatin1String( "AutoaddTM" ) );
96  mScanToTMOnOpenItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "ScanToTMOnOpen" ), mScanToTMOnOpen, false );
97  mScanToTMOnOpenItem->setLabel( i18n("ScanToTMOnOpen") );
98  addItem( mScanToTMOnOpenItem, QLatin1String( "ScanToTMOnOpen" ) );
99 }
100 
101 Settings::~Settings()
102 {
103  if (!s_globalSettings.isDestroyed()) {
104  s_globalSettings->q = 0;
105  }
106 }
107 
Settings::mMouseWheelGo
bool mMouseWheelGo
Definition: prefs_lokalize.h:384
Settings::mDefaultLangCode
QString mDefaultLangCode
Definition: prefs_lokalize.h:371
Settings::~Settings
~Settings()
Definition: prefs_lokalize.cpp:101
KConfigSkeleton
Settings::mScanToTMOnOpen
bool mScanToTMOnOpen
Definition: prefs_lokalize.h:391
getMailingList
static QString getMailingList()
Definition: kde-i18n-lists.h:31
Settings::mAddColor
QColor mAddColor
Definition: prefs_lokalize.h:375
Settings::mDefaultMailingList
QString mDefaultMailingList
Definition: prefs_lokalize.h:372
Settings::mAuthorLocalizedName
QString mAuthorLocalizedName
Definition: prefs_lokalize.h:369
Settings::mAutoaddTM
bool mAutoaddTM
Definition: prefs_lokalize.h:390
Settings::mAutoSpellcheck
bool mAutoSpellcheck
Definition: prefs_lokalize.h:383
Settings::Settings
Settings()
Definition: prefs_lokalize.cpp:29
Settings::mWordCompletionLength
int mWordCompletionLength
Definition: prefs_lokalize.h:385
QColor
Settings::mDelColor
QColor mDelColor
Definition: prefs_lokalize.h:376
Settings
Definition: prefs_lokalize.h:13
Settings::mPrefetchTM
bool mPrefetchTM
Definition: prefs_lokalize.h:388
Settings::mAutoApprove
bool mAutoApprove
Definition: prefs_lokalize.h:382
Settings::mHighlightSpaces
bool mHighlightSpaces
Definition: prefs_lokalize.h:377
prefs_lokalize.h
QLatin1String
Settings::mSuggCount
int mSuggCount
Definition: prefs_lokalize.h:389
Settings::mMsgFont
QFont mMsgFont
Definition: prefs_lokalize.h:378
Settings::mAuthorName
QString mAuthorName
Definition: prefs_lokalize.h:368
Settings::mAuthorEmail
QString mAuthorEmail
Definition: prefs_lokalize.h:370
Settings::mLeds
bool mLeds
Definition: prefs_lokalize.h:379
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

lokalize

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

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • 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