add some comments
[makneto-zunavac1.git] / src / ui-kde / settings.cpp
blobfcadf8fd55ccc5272005ada499fb28e9dc1bee14
1 // This file is generated by kconfig_compiler from makneto.kcfg.
2 // All changes you do to this file will be lost.
4 #include "settings.h"
6 #include <kglobal.h>
7 #include <QtCore/QFile>
9 class SettingsHelper
11 public:
12 SettingsHelper() : q(0) {}
13 ~SettingsHelper() { delete q; }
14 Settings *q;
16 K_GLOBAL_STATIC(SettingsHelper, s_globalSettings)
17 Settings *Settings::self()
19 if (!s_globalSettings->q) {
20 new Settings;
21 s_globalSettings->q->readConfig();
24 return s_globalSettings->q;
27 Settings::Settings( )
28 : KConfigSkeleton( QLatin1String( "maknetorc" ) )
30 Q_ASSERT(!s_globalSettings->q);
31 s_globalSettings->q = this;
32 setCurrentGroup( QLatin1String( "Account" ) );
34 KConfigSkeleton::ItemString *itemJabberID;
35 itemJabberID = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "jabberID" ), mJabberID );
36 addItem( itemJabberID, QLatin1String( "jabberID" ) );
37 KConfigSkeleton::ItemPassword *itemJabberPassword;
38 itemJabberPassword = new KConfigSkeleton::ItemPassword( currentGroup(), QLatin1String( "jabberPassword" ), mJabberPassword );
39 addItem( itemJabberPassword, QLatin1String( "jabberPassword" ) );
40 KConfigSkeleton::ItemBool *itemStorePassword;
41 itemStorePassword = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "storePassword" ), mStorePassword );
42 addItem( itemStorePassword, QLatin1String( "storePassword" ) );
43 KConfigSkeleton::ItemString *itemJabberHost;
44 itemJabberHost = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "jabberHost" ), mJabberHost );
45 addItem( itemJabberHost, QLatin1String( "jabberHost" ) );
46 KConfigSkeleton::ItemInt *itemJabberPort;
47 itemJabberPort = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "jabberPort" ), mJabberPort, 5222 );
48 addItem( itemJabberPort, QLatin1String( "jabberPort" ) );
49 KConfigSkeleton::ItemString *itemJabberFileTransferJID;
50 itemJabberFileTransferJID = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "jabberFileTransferJID" ), mJabberFileTransferJID );
51 addItem( itemJabberFileTransferJID, QLatin1String( "jabberFileTransferJID" ) );
52 KConfigSkeleton::ItemBool *itemAllowPlain;
53 itemAllowPlain = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "allowPlain" ), mAllowPlain, true );
54 addItem( itemAllowPlain, QLatin1String( "allowPlain" ) );
55 KConfigSkeleton::ItemBool *itemUseSSL;
56 itemUseSSL = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "useSSL" ), mUseSSL, false );
57 addItem( itemUseSSL, QLatin1String( "useSSL" ) );
58 KConfigSkeleton::ItemBool *itemNoSSLWarn;
59 itemNoSSLWarn = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "noSSLWarn" ), mNoSSLWarn, false );
60 addItem( itemNoSSLWarn, QLatin1String( "noSSLWarn" ) );
63 Settings::~Settings()
65 if (!s_globalSettings.isDestroyed()) {
66 s_globalSettings->q = 0;