author | zautrix <zautrix> | 2004-10-23 07:26:27 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-23 07:26:27 (UTC) |
commit | c1afd7a11c374573ad39a829567d05fb5a0453ce (patch) (unidiff) | |
tree | a44ee04fc4c74c9501d271c1edb6f1cb52a965f2 /kaddressbook/kabprefs.cpp | |
parent | 65989e4ab454f228fb6cd2fa532145ed54366701 (diff) | |
download | kdepimpi-c1afd7a11c374573ad39a829567d05fb5a0453ce.zip kdepimpi-c1afd7a11c374573ad39a829567d05fb5a0453ce.tar.gz kdepimpi-c1afd7a11c374573ad39a829567d05fb5a0453ce.tar.bz2 |
compile fix
-rw-r--r-- | kaddressbook/kabprefs.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp index 79fff47..01c935f 100644 --- a/kaddressbook/kabprefs.cpp +++ b/kaddressbook/kabprefs.cpp | |||
@@ -1,103 +1,108 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KAddressBook. | 2 | This file is part of KAddressBook. |
3 | Copyright (c) 2002 Mike Pilone <mpilone@slac.com> | 3 | Copyright (c) 2002 Mike Pilone <mpilone@slac.com> |
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 | //US#ifdef KAB_EMBEDDED | 24 | //US#ifdef KAB_EMBEDDED |
25 | //#include <qstring.h> | 25 | //#include <qstring.h> |
26 | //#endif //KAB_EMBEDDED | 26 | //#endif //KAB_EMBEDDED |
27 | 27 | ||
28 | #include <qtextstream.h> | 28 | #include <qtextstream.h> |
29 | #include <qfile.h> | 29 | #include <qfile.h> |
30 | #include <qregexp.h> | ||
30 | #include <stdlib.h> | 31 | #include <stdlib.h> |
31 | #include <libkdepim/kpimglobalprefs.h> | 32 | #include <libkdepim/kpimglobalprefs.h> |
32 | 33 | ||
33 | #include <kconfig.h> | 34 | #include <kconfig.h> |
34 | #include <klocale.h> | 35 | #include <klocale.h> |
35 | #include <kstaticdeleter.h> | 36 | #include <kstaticdeleter.h> |
36 | //US#include <kdebug.h> // defines kdDebug() | 37 | //US#include <kdebug.h> // defines kdDebug() |
37 | 38 | ||
38 | #include "kabprefs.h" | 39 | #include "kabprefs.h" |
39 | 40 | ||
41 | #ifdef DESKTOP_VERSION | ||
42 | #include <qapplication.h> | ||
43 | #endif | ||
44 | |||
40 | KABPrefs *KABPrefs::sInstance = 0; | 45 | KABPrefs *KABPrefs::sInstance = 0; |
41 | static KStaticDeleter<KABPrefs> staticDeleter; | 46 | static KStaticDeleter<KABPrefs> staticDeleter; |
42 | 47 | ||
43 | KABPrefs::KABPrefs() | 48 | KABPrefs::KABPrefs() |
44 | : KPimPrefs("kaddressbookrc") | 49 | : KPimPrefs("kaddressbookrc") |
45 | { | 50 | { |
46 | 51 | ||
47 | mLocaleDict = 0; | 52 | mLocaleDict = 0; |
48 | mDetailsFont = QFont("helvetica",12); | 53 | mDetailsFont = QFont("helvetica",12); |
49 | KPrefs::setCurrentGroup( "Views" ); | 54 | KPrefs::setCurrentGroup( "Views" ); |
50 | addItemBool( "HonorSingleClick", &mHonorSingleClick, false ); | 55 | addItemBool( "HonorSingleClick", &mHonorSingleClick, false ); |
51 | 56 | ||
52 | KPrefs::setCurrentGroup( "General" ); | 57 | KPrefs::setCurrentGroup( "General" ); |
53 | addItemBool( "AutomaticNameParsing", &mAutomaticNameParsing, true ); | 58 | addItemBool( "AutomaticNameParsing", &mAutomaticNameParsing, true ); |
54 | addItemInt( "CurrentIncSearchField", &mCurrentIncSearchField, 0 ); | 59 | addItemInt( "CurrentIncSearchField", &mCurrentIncSearchField, 0 ); |
55 | 60 | ||
56 | #ifdef KAB_EMBEDDED | 61 | #ifdef KAB_EMBEDDED |
57 | addItemBool("AskForQuit",&mAskForQuit,true); | 62 | addItemBool("AskForQuit",&mAskForQuit,true); |
58 | addItemBool("ToolBarHor",&mToolBarHor, true ); | 63 | addItemBool("ToolBarHor",&mToolBarHor, true ); |
59 | addItemBool("ToolBarUp",&mToolBarUp, false ); | 64 | addItemBool("ToolBarUp",&mToolBarUp, false ); |
60 | addItemBool("SearchWithReturn",&mSearchWithReturn, true ); | 65 | addItemBool("SearchWithReturn",&mSearchWithReturn, true ); |
61 | addItemFont("DetailsFont",&mDetailsFont); | 66 | addItemFont("DetailsFont",&mDetailsFont); |
62 | 67 | ||
63 | 68 | ||
64 | #endif //KAB_EMBEDDED | 69 | #endif //KAB_EMBEDDED |
65 | 70 | ||
66 | KPrefs::setCurrentGroup( "MainWindow" ); | 71 | KPrefs::setCurrentGroup( "MainWindow" ); |
67 | addItemBool( "JumpButtonBarVisible", &mJumpButtonBarVisible, false ); | 72 | addItemBool( "JumpButtonBarVisible", &mJumpButtonBarVisible, false ); |
68 | addItemBool( "DetailsPageVisible", &mDetailsPageVisible, true ); | 73 | addItemBool( "DetailsPageVisible", &mDetailsPageVisible, true ); |
69 | addItemIntList( "ExtensionsSplitter", &mExtensionsSplitter ); | 74 | addItemIntList( "ExtensionsSplitter", &mExtensionsSplitter ); |
70 | addItemIntList( "DetailsSplitter", &mDetailsSplitter ); | 75 | addItemIntList( "DetailsSplitter", &mDetailsSplitter ); |
71 | addItemBool( "MultipleViewsAtOnce", &mMultipleViewsAtOnce, true ); | 76 | addItemBool( "MultipleViewsAtOnce", &mMultipleViewsAtOnce, true ); |
72 | 77 | ||
73 | 78 | ||
74 | KPrefs::setCurrentGroup( "Extensions_General" ); | 79 | KPrefs::setCurrentGroup( "Extensions_General" ); |
75 | QStringList defaultExtensions; | 80 | QStringList defaultExtensions; |
76 | defaultExtensions << "merge"; | 81 | defaultExtensions << "merge"; |
77 | defaultExtensions << "distribution_list_editor"; | 82 | defaultExtensions << "distribution_list_editor"; |
78 | addItemInt( "CurrentExtension", &mCurrentExtension, 0 ); | 83 | addItemInt( "CurrentExtension", &mCurrentExtension, 0 ); |
79 | addItemStringList( "ActiveExtensions", &mActiveExtensions, defaultExtensions ); | 84 | addItemStringList( "ActiveExtensions", &mActiveExtensions, defaultExtensions ); |
80 | 85 | ||
81 | KPrefs::setCurrentGroup( "Views" ); | 86 | KPrefs::setCurrentGroup( "Views" ); |
82 | QString defaultView = i18n( "Default Table View" ); | 87 | QString defaultView = i18n( "Default Table View" ); |
83 | addItemString( "CurrentView", &mCurrentView, defaultView ); | 88 | addItemString( "CurrentView", &mCurrentView, defaultView ); |
84 | addItemStringList( "ViewNames", &mViewNames, defaultView ); | 89 | addItemStringList( "ViewNames", &mViewNames, defaultView ); |
85 | 90 | ||
86 | KPrefs::setCurrentGroup( "Filters" ); | 91 | KPrefs::setCurrentGroup( "Filters" ); |
87 | addItemInt( "CurrentFilter", &mCurrentFilter, 0 ); | 92 | addItemInt( "CurrentFilter", &mCurrentFilter, 0 ); |
88 | 93 | ||
89 | } | 94 | } |
90 | 95 | ||
91 | KABPrefs::~KABPrefs() | 96 | KABPrefs::~KABPrefs() |
92 | { | 97 | { |
93 | //qDebug("KABPrefs::~KABPrefs() "); | 98 | //qDebug("KABPrefs::~KABPrefs() "); |
94 | setLocaleDict( 0 ); | 99 | setLocaleDict( 0 ); |
95 | if ( mLocaleDict ) | 100 | if ( mLocaleDict ) |
96 | delete mLocaleDict; | 101 | delete mLocaleDict; |
97 | } | 102 | } |
98 | 103 | ||
99 | KABPrefs *KABPrefs::instance() | 104 | KABPrefs *KABPrefs::instance() |
100 | { | 105 | { |
101 | if ( !sInstance ) { | 106 | if ( !sInstance ) { |
102 | #ifdef KAB_EMBEDDED | 107 | #ifdef KAB_EMBEDDED |
103 | sInstance = staticDeleter.setObject( new KABPrefs() ); | 108 | sInstance = staticDeleter.setObject( new KABPrefs() ); |