summaryrefslogtreecommitdiffabout
path: root/libkdepim
authorulf69 <ulf69>2004-08-06 20:30:16 (UTC)
committer ulf69 <ulf69>2004-08-06 20:30:16 (UTC)
commit26697d027609149853b984874190e2624749b7e3 (patch) (unidiff)
tree84b4392b20d1572645cb3d9ff5b6057da52ce970 /libkdepim
parent38d84409bcca83516eb816461c8b79b4cf6cbf57 (diff)
downloadkdepimpi-26697d027609149853b984874190e2624749b7e3.zip
kdepimpi-26697d027609149853b984874190e2624749b7e3.tar.gz
kdepimpi-26697d027609149853b984874190e2624749b7e3.tar.bz2
moved pim related parameters into kpimprefs. (email, phone parameters)
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kpimprefs.cpp4
-rw-r--r--libkdepim/kpimprefs.h18
-rw-r--r--libkdepim/libkdepim.pro12
-rw-r--r--libkdepim/libkdepimE.pro13
4 files changed, 35 insertions, 12 deletions
diff --git a/libkdepim/kpimprefs.cpp b/libkdepim/kpimprefs.cpp
index ce4c540..15531c7 100644
--- a/libkdepim/kpimprefs.cpp
+++ b/libkdepim/kpimprefs.cpp
@@ -1,59 +1,63 @@
1/* 1/*
2 This file is part of libkdepim. 2 This file is part of libkdepim.
3 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 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 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 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 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 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. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <kglobal.h> 24#include <kglobal.h>
25#include <kconfig.h> 25#include <kconfig.h>
26#include <klocale.h> 26#include <klocale.h>
27#include <kdebug.h> 27#include <kdebug.h>
28 28
29#include "kpimprefs.h" 29#include "kpimprefs.h"
30 30
31KPimPrefs::KPimPrefs( const QString &name ) : 31KPimPrefs::KPimPrefs( const QString &name ) :
32 KPrefs( name ) 32 KPrefs( name )
33{ 33{
34 KPrefs::setCurrentGroup( "ExternalApplications" );
35 addItemInt( "EmailChannelType", &mEmailClient, OMPI );
36 addItemString( "EmailChannelOther", &mEmailChannel, "" );
37
34} 38}
35 39
36KPimPrefs::~KPimPrefs() 40KPimPrefs::~KPimPrefs()
37{ 41{
38} 42}
39 43
40void KPimPrefs::usrSetDefaults() 44void KPimPrefs::usrSetDefaults()
41{ 45{
42 setCategoryDefaults(); 46 setCategoryDefaults();
43} 47}
44 48
45void KPimPrefs::usrReadConfig() 49void KPimPrefs::usrReadConfig()
46{ 50{
47 kdDebug(5300) << "KPimPrefs::usrReadConfig()" << endl; 51 kdDebug(5300) << "KPimPrefs::usrReadConfig()" << endl;
48 52
49 config()->setGroup("General"); 53 config()->setGroup("General");
50 mCustomCategories = config()->readListEntry("Custom Categories"); 54 mCustomCategories = config()->readListEntry("Custom Categories");
51 if (mCustomCategories.isEmpty()) setCategoryDefaults(); 55 if (mCustomCategories.isEmpty()) setCategoryDefaults();
52} 56}
53 57
54 58
55void KPimPrefs::usrWriteConfig() 59void KPimPrefs::usrWriteConfig()
56{ 60{
57 config()->setGroup("General"); 61 config()->setGroup("General");
58 config()->writeEntry("Custom Categories",mCustomCategories); 62 config()->writeEntry("Custom Categories",mCustomCategories);
59} 63}
diff --git a/libkdepim/kpimprefs.h b/libkdepim/kpimprefs.h
index 05a564c..5186315 100644
--- a/libkdepim/kpimprefs.h
+++ b/libkdepim/kpimprefs.h
@@ -1,53 +1,67 @@
1/* 1/*
2 This file is part of libkdepim. 2 This file is part of libkdepim.
3 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 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 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 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 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 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. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#ifndef KPIMPREFS_H 23#ifndef KPIMPREFS_H
24#define KPIMPREFS_H 24#define KPIMPREFS_H
25 25
26#include <qstringlist.h> 26#include <qstringlist.h>
27 27
28#include "kprefs.h" 28#include "kprefs.h"
29 29
30class KPimPrefs : public KPrefs 30class KPimPrefs : public KPrefs
31{ 31{
32 public: 32 public:
33
33 KPimPrefs( const QString &name = QString::null ); 34 KPimPrefs( const QString &name = QString::null );
34 35
35 virtual ~KPimPrefs(); 36 virtual ~KPimPrefs();
36 37
37 /** Set preferences to default values */ 38 /** Set preferences to default values */
38 void usrSetDefaults(); 39 void usrSetDefaults();
39 40
40 /** Read preferences from config file */ 41 /** Read preferences from config file */
41 void usrReadConfig(); 42 void usrReadConfig();
42 43
43 /** Write preferences to config file */ 44 /** Write preferences to config file */
44 void usrWriteConfig(); 45 void usrWriteConfig();
45 46
47 enum EMailClients {
48 OMPI = 0,
49 QTOPIA = 1,
50 OPIE = 2,
51 OTHER = 3
52 };
53
54
46 public: 55 public:
47 QStringList mCustomCategories; 56 QStringList mCustomCategories;
48 57
58 int mEmailClient;
59 QString mEmailChannel;
60
61
62
49 protected: 63 protected:
50 virtual void setCategoryDefaults() = 0; 64 virtual void setCategoryDefaults() = 0;
51}; 65};
52 66
53#endif 67#endif
diff --git a/libkdepim/libkdepim.pro b/libkdepim/libkdepim.pro
index a2fae0b..902f049 100644
--- a/libkdepim/libkdepim.pro
+++ b/libkdepim/libkdepim.pro
@@ -1,53 +1,55 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG = qt warn_on 2 CONFIG = qt warn_on
3DEFINES +=KORG_NOKABC 3DEFINES +=KORG_NOKABC
4TARGET = microkdepim 4TARGET = microkdepim
5INCLUDEPATH += ../microkde ../libkabcwrap ../microkde/kdecore . .. 5INCLUDEPATH += ../microkde ../libkabcwrap ../microkde/kdecore ../microkde/kdeui . ..
6DESTDIR=../bin 6DESTDIR=../bin
7 7
8DEFINES += DESKTOP_VERSION 8DEFINES += DESKTOP_VERSION
9include( ../variables.pri ) 9include( ../variables.pri )
10unix : { 10unix : {
11OBJECTS_DIR = obj/unix 11OBJECTS_DIR = obj/unix
12MOC_DIR = moc/unix 12MOC_DIR = moc/unix
13} 13}
14win32: { 14win32: {
15DEFINES += _WIN32_ 15DEFINES += _WIN32_
16OBJECTS_DIR = obj/win 16OBJECTS_DIR = obj/win
17MOC_DIR = moc/win 17MOC_DIR = moc/win
18} 18}
19INTERFACES = \ 19INTERFACES = \
20 20
21HEADERS = \ 21HEADERS = \
22 categoryeditdialog.h \ 22 categoryeditdialog.h \
23 categoryeditdialog_base.h \ 23 categoryeditdialog_base.h \
24 categoryselectdialog.h \ 24 categoryselectdialog.h \
25 categoryselectdialog_base.h \ 25 categoryselectdialog_base.h \
26 kdateedit.h \ 26 kdateedit.h \
27 kdatepicker.h \ 27 kdatepicker.h \
28 kinputdialog.h \ 28 kinputdialog.h \
29 kincidenceformatter.h \ 29 kincidenceformatter.h \
30 kpimprefs.h \ 30 kpimprefs.h \
31 kprefs.h \
32 kprefsdialog.h \ 31 kprefsdialog.h \
33 addresseeview.h \ 32 addresseeview.h \
34 ksyncprofile.h \ 33 ksyncprofile.h \
35 ksyncprefsdialog.h 34 ksyncprefsdialog.h \
35 kcmconfigs/kcmkdepimconfig.h \
36 kcmconfigs/kdepimconfigwidget.h
36 37
37SOURCES = \ 38SOURCES = \
38 categoryeditdialog.cpp \ 39 categoryeditdialog.cpp \
39 categoryeditdialog_base.cpp \ 40 categoryeditdialog_base.cpp \
40 categoryselectdialog.cpp \ 41 categoryselectdialog.cpp \
41 categoryselectdialog_base.cpp \ 42 categoryselectdialog_base.cpp \
42 kdateedit.cpp \ 43 kdateedit.cpp \
43 kdatepicker.cpp \ 44 kdatepicker.cpp \
44 kinputdialog.cpp \ 45 kinputdialog.cpp \
45 kincidenceformatter.cpp \ 46 kincidenceformatter.cpp \
46 kpimprefs.cpp \ 47 kpimprefs.cpp \
47 kprefs.cpp \
48 kprefsdialog.cpp \ 48 kprefsdialog.cpp \
49 addresseeview.cpp \ 49 addresseeview.cpp \
50 ksyncprofile.cpp \ 50 ksyncprofile.cpp \
51 ksyncprefsdialog.cpp 51 ksyncprefsdialog.cpp \
52 kcmconfigs/kcmkdepimconfig.cpp \
53 kcmconfigs/kdepimconfigwidget.cpp
52 54
53 55
diff --git a/libkdepim/libkdepimE.pro b/libkdepim/libkdepimE.pro
index 36a789d..fc8abe1 100644
--- a/libkdepim/libkdepimE.pro
+++ b/libkdepim/libkdepimE.pro
@@ -1,46 +1,49 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt warn_on 2 CONFIG += qt warn_on
3TARGET = microkdepim 3TARGET = microkdepim
4INCLUDEPATH += ../microkde ../qtcompat ../libkabcwrap ../microkde/kdecore $(QPEDIR)/include 4INCLUDEPATH += ../microkde ../qtcompat ../libkabcwrap ../microkde/kdecore ../microkde/kdeui $(QPEDIR)/include
5INCLUDEPATH += . .. 5INCLUDEPATH += . ..
6LIBS += -lmicrokde 6LIBS += -lmicrokde
7LIBS += -L$(QPEDIR)/lib 7LIBS += -L$(QPEDIR)/lib
8OBJECTS_DIR = obj/$(PLATFORM) 8OBJECTS_DIR = obj/$(PLATFORM)
9MOC_DIR = moc/$(PLATFORM) 9MOC_DIR = moc/$(PLATFORM)
10DESTDIR=$(QPEDIR)/lib 10DESTDIR=$(QPEDIR)/lib
11 11
12 12
13INTERFACES = \ 13INTERFACES = \
14 14
15HEADERS = \ 15HEADERS = \
16 categoryeditdialog.h \ 16 categoryeditdialog.h \
17 categoryeditdialog_base.h \ 17 categoryeditdialog_base.h \
18 categoryselectdialog.h \ 18 categoryselectdialog.h \
19 categoryselectdialog_base.h \ 19 categoryselectdialog_base.h \
20 kdateedit.h \ 20 kdateedit.h \
21 kdatepicker.h \ 21 kdatepicker.h \
22 kinputdialog.h \ 22 kinputdialog.h \
23 kincidenceformatter.h \ 23 kincidenceformatter.h \
24 kpimprefs.h \ 24 kpimprefs.h \
25 kprefs.h \
26 kprefsdialog.h \ 25 kprefsdialog.h \
27 addresseeview.h \ 26 addresseeview.h \
28 ksyncprofile.h \ 27 ksyncprofile.h \
29 ksyncprefsdialog.h 28 ksyncprefsdialog.h \
29 kcmconfigs/kcmkdepimconfig.h \
30 kcmconfigs/kdepimconfigwidget.h
31
30 32
31 33
32SOURCES = \ 34SOURCES = \
33 categoryeditdialog.cpp \ 35 categoryeditdialog.cpp \
34 categoryeditdialog_base.cpp \ 36 categoryeditdialog_base.cpp \
35 categoryselectdialog.cpp \ 37 categoryselectdialog.cpp \
36 categoryselectdialog_base.cpp \ 38 categoryselectdialog_base.cpp \
37 kdateedit.cpp \ 39 kdateedit.cpp \
38 kinputdialog.cpp \ 40 kinputdialog.cpp \
39 kdatepicker.cpp \ 41 kdatepicker.cpp \
40 kincidenceformatter.cpp \ 42 kincidenceformatter.cpp \
41 kpimprefs.cpp \ 43 kpimprefs.cpp \
42 kprefs.cpp \
43 kprefsdialog.cpp \ 44 kprefsdialog.cpp \
44 addresseeview.cpp \ 45 addresseeview.cpp \
45 ksyncprofile.cpp \ 46 ksyncprofile.cpp \
46 ksyncprefsdialog.cpp 47 ksyncprefsdialog.cpp \
48 kcmconfigs/kcmkdepimconfig.cpp \
49 kcmconfigs/kdepimconfigwidget.cpp