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

kontact

  • sources
  • kde-4.12
  • kdepim
  • kontact
  • src
prefs.cpp
Go to the documentation of this file.
1 // This file is generated by kconfig_compiler from kontact.kcfg.
2 // All changes you do to this file will be lost.
3 
4 #include "prefs.h"
5 
6 #include <klocale.h>
7 
8 #include <kglobal.h>
9 #include <QtCore/QFile>
10 
11 using namespace Kontact;
12 
13 namespace Kontact {
14 
15 class PrefsHelper
16 {
17  public:
18  PrefsHelper() : q(0) {}
19  ~PrefsHelper() { delete q; }
20  Prefs *q;
21 };
22 }
23 
24 K_GLOBAL_STATIC(PrefsHelper, s_globalPrefs)
25 Prefs *Prefs::self()
26 {
27  if (!s_globalPrefs->q) {
28  new Prefs;
29  s_globalPrefs->q->readConfig();
30  }
31 
32  return s_globalPrefs->q;
33 }
34 
35 Prefs::Prefs( )
36  : KConfigSkeleton( QLatin1String( "kontactrc" ) )
37 {
38  Q_ASSERT(!s_globalPrefs->q);
39  s_globalPrefs->q = this;
40  setCurrentGroup( QLatin1String( "View" ) );
41 
42  mActivePluginItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "ActivePlugin" ), mActivePlugin, QLatin1String( "kontact_summaryplugin" ) );
43  mActivePluginItem->setLabel( i18n("ActivePlugin") );
44  mActivePluginItem->setToolTip( i18n("The currently active plugin") );
45  mActivePluginItem->setWhatsThis( i18n("The currently active plugin") );
46  addItem( mActivePluginItem, QLatin1String( "ActivePlugin" ) );
47  mForceStartupPluginItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "ForceStartupPlugin" ), mForceStartupPlugin, false );
48  mForceStartupPluginItem->setLabel( i18n("Always start with plugin:") );
49  mForceStartupPluginItem->setToolTip( i18n("Set the initial plugin on each start") );
50  mForceStartupPluginItem->setWhatsThis( i18n("Usually Kontact will come up with the plugin used before shutdown. Check this box if you would like the specified plugin to come up on start instead.") );
51  addItem( mForceStartupPluginItem, QLatin1String( "ForceStartupPlugin" ) );
52  mForcedStartupPluginItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "ForcedStartupPlugin" ), mForcedStartupPlugin );
53  mForcedStartupPluginItem->setLabel( i18n("ForcedStartupPlugin") );
54  addItem( mForcedStartupPluginItem, QLatin1String( "ForcedStartupPlugin" ) );
55  QList<int> defaultSidePaneSplitter;
56  defaultSidePaneSplitter.append( 1 );
57 
58  mSidePaneSplitterItem = new KConfigSkeleton::ItemIntList( currentGroup(), QLatin1String( "SidePaneSplitter" ), mSidePaneSplitter, defaultSidePaneSplitter );
59  mSidePaneSplitterItem->setLabel( i18n("SidePaneSplitter") );
60  addItem( mSidePaneSplitterItem, QLatin1String( "SidePaneSplitter" ) );
61  mSidePaneIconSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "SidePaneIconSize" ), mSidePaneIconSize, 32 );
62  mSidePaneIconSizeItem->setLabel( i18n("SidePaneIconSize") );
63  addItem( mSidePaneIconSizeItem, QLatin1String( "SidePaneIconSize" ) );
64  mSidePaneShowIconsItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "SidePaneShowIcons" ), mSidePaneShowIcons, true );
65  mSidePaneShowIconsItem->setLabel( i18n("SidePaneShowIcons") );
66  addItem( mSidePaneShowIconsItem, QLatin1String( "SidePaneShowIcons" ) );
67  mSidePaneShowTextItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "SidePaneShowText" ), mSidePaneShowText, true );
68  mSidePaneShowTextItem->setLabel( i18n("SidePaneShowText") );
69  addItem( mSidePaneShowTextItem, QLatin1String( "SidePaneShowText" ) );
70  mLastVersionSeenItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "LastVersionSeen" ), mLastVersionSeen );
71  mLastVersionSeenItem->setLabel( i18n("LastVersionSeen") );
72  addItem( mLastVersionSeenItem, QLatin1String( "LastVersionSeen" ) );
73 }
74 
75 Prefs::~Prefs()
76 {
77  if (!s_globalPrefs.isDestroyed()) {
78  s_globalPrefs->q = 0;
79  }
80 }
81 
Kontact::Prefs
Definition: prefs.h:13
Kontact::Prefs::mLastVersionSeen
QString mLastVersionSeen
Definition: prefs.h:250
Kontact::Prefs::mSidePaneIconSize
int mSidePaneIconSize
Definition: prefs.h:247
Kontact::Prefs::mSidePaneShowText
bool mSidePaneShowText
Definition: prefs.h:249
prefs.h
KConfigSkeleton
Kontact::Prefs::Prefs
Prefs()
Definition: prefs.cpp:35
Kontact::Prefs::mSidePaneSplitter
QList< int > mSidePaneSplitter
Definition: prefs.h:246
Kontact::Prefs::mActivePlugin
QString mActivePlugin
Definition: prefs.h:243
Kontact::Prefs::mForceStartupPlugin
bool mForceStartupPlugin
Definition: prefs.h:244
Kontact::Prefs::mSidePaneShowIcons
bool mSidePaneShowIcons
Definition: prefs.h:248
Kontact::Prefs::~Prefs
~Prefs()
Definition: prefs.cpp:75
Kontact::Prefs::mForcedStartupPlugin
QString mForcedStartupPlugin
Definition: prefs.h:245
QList< int >
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:30 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kontact

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

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