summaryrefslogtreecommitdiffabout
path: root/libkdepim/kpimglobalprefs.cpp
authorulf69 <ulf69>2004-08-10 16:10:42 (UTC)
committer ulf69 <ulf69>2004-08-10 16:10:42 (UTC)
commitc56c4729e32a9c8ba8709493b3ea11cf7cf229d3 (patch) (unidiff)
tree10072e3a37eb3dca26482e67c08229bd2a1cbba6 /libkdepim/kpimglobalprefs.cpp
parentc9d570427f3d5bead7bee1301514a2d4b82836ea (diff)
downloadkdepimpi-c56c4729e32a9c8ba8709493b3ea11cf7cf229d3.zip
kdepimpi-c56c4729e32a9c8ba8709493b3ea11cf7cf229d3.tar.gz
kdepimpi-c56c4729e32a9c8ba8709493b3ea11cf7cf229d3.tar.bz2
additional files for external application configuration
Diffstat (limited to 'libkdepim/kpimglobalprefs.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kpimglobalprefs.cpp89
1 files changed, 89 insertions, 0 deletions
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
new file mode 100644
index 0000000..4790980
--- a/dev/null
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -0,0 +1,89 @@
1/*
2 This file is part of libkdepim.
3 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution.
22*/
23
24/*
25Enhanced Version of the file for platform independent KDE tools.
26Copyright (c) 2004 Ulf Schenk
27
28$Id$
29*/
30
31#include <kglobal.h>
32#include <kconfig.h>
33#include <klocale.h>
34#include <kdebug.h>
35#include <kstaticdeleter.h>
36
37#include "kpimglobalprefs.h"
38
39KPimGlobalPrefs *KPimGlobalPrefs::sInstance = 0;
40static KStaticDeleter<KPimGlobalPrefs> staticDeleter;
41
42
43KPimGlobalPrefs::KPimGlobalPrefs( const QString &name )
44 : KPrefs("kkdepimrc")
45{
46 KPrefs::setCurrentGroup( "ExternalApplications" );
47
48 addItemInt( "EmailChannelType", &mEmailClient, NONE_EMC );
49 addItemString( "EmailChannel", &mEmailOtherChannel, "" );
50 addItemString( "EmailChannelMessage", &mEmailOtherMessage, "" );
51 addItemString( "EmailChannelParameters", &mEmailOtherMessageParameters, "" );
52 addItemString( "EmailChannelMessage2", &mEmailOtherMessage2, "" );
53 addItemString( "EmailChannelParameters2", &mEmailOtherMessageParameters2, "" );
54
55 addItemInt( "PhoneChannelType", &mPhoneClient, NONE_PHC );
56 addItemString( "PhoneChannel", &mPhoneOtherChannel, "" );
57 addItemString( "PhoneChannelMessage", &mPhoneOtherMessage, "" );
58 addItemString( "PhoneChannelParameters", &mPhoneOtherMessageParameters, "" );
59
60 addItemInt( "FaxChannelType", &mFaxClient, NONE_FAC );
61 addItemString( "FaxChannel", &mFaxOtherChannel, "" );
62 addItemString( "FaxChannelMessage", &mFaxOtherMessage, "" );
63 addItemString( "FaxChannelParameters", &mFaxOtherMessageParameters, "" );
64
65 addItemInt( "SMSChannelType", &mSMSClient, NONE_SMC );
66 addItemString( "SMSChannel", &mSMSOtherChannel, "" );
67 addItemString( "SMSChannelMessage", &mSMSOtherMessage, "" );
68 addItemString( "SMSChannelParameters", &mSMSOtherMessageParameters, "" );
69
70 addItemInt( "PagerChannelType", &mPagerClient, NONE_PAC );
71 addItemString( "PagerChannel", &mPagerOtherChannel, "" );
72 addItemString( "PagerChannelMessage", &mPagerOtherMessage, "" );
73 addItemString( "PagerChannelParameters", &mPagerOtherMessageParameters, "" );
74
75}
76
77KPimGlobalPrefs::~KPimGlobalPrefs()
78{
79}
80
81KPimGlobalPrefs *KPimGlobalPrefs::instance()
82{
83 if ( !sInstance ) {
84 sInstance = staticDeleter.setObject( new KPimGlobalPrefs() );
85 sInstance->readConfig();
86 }
87
88 return sInstance;
89}