-rw-r--r-- | libkdepim/kcmconfigs/kcmkdepimconfig.cpp | 4 | ||||
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 53 | ||||
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.h | 6 |
3 files changed, 36 insertions, 27 deletions
diff --git a/libkdepim/kcmconfigs/kcmkdepimconfig.cpp b/libkdepim/kcmconfigs/kcmkdepimconfig.cpp index 5094830..9f47766 100644 --- a/libkdepim/kcmconfigs/kcmkdepimconfig.cpp +++ b/libkdepim/kcmconfigs/kcmkdepimconfig.cpp | |||
@@ -1,80 +1,82 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KDEPim/Pi. | 2 | This file is part of KDEPim/Pi. |
3 | Copyright (c) 2004 Ulf Schenk | 3 | Copyright (c) 2004 Ulf Schenk |
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 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | 31 | ||
32 | #include <qlayout.h> | 32 | #include <qlayout.h> |
33 | //Added by qt3to4: | ||
34 | #include <Q3VBoxLayout> | ||
33 | 35 | ||
34 | #include <kdebug.h> | 36 | #include <kdebug.h> |
35 | //#include <klocale.h> | 37 | //#include <klocale.h> |
36 | //#include <stdlib.h> | 38 | //#include <stdlib.h> |
37 | 39 | ||
38 | #include "kdepimconfigwidget.h" | 40 | #include "kdepimconfigwidget.h" |
39 | 41 | ||
40 | #include "kcmkdepimconfig.h" | 42 | #include "kcmkdepimconfig.h" |
41 | #include "kprefs.h" | 43 | #include "kprefs.h" |
42 | #include "kpimglobalprefs.h" | 44 | #include "kpimglobalprefs.h" |
43 | 45 | ||
44 | #ifndef _WIN32_ | 46 | #ifndef _WIN32_ |
45 | extern "C" | 47 | extern "C" |
46 | { | 48 | { |
47 | KCModule *create_kdepimconfig(QWidget *parent, const char * ) { | 49 | KCModule *create_kdepimconfig(QWidget *parent, const char * ) { |
48 | return new KCMKdePimConfig(parent, "kcmkdepimconfig" ); | 50 | return new KCMKdePimConfig(parent, "kcmkdepimconfig" ); |
49 | } | 51 | } |
50 | } | 52 | } |
51 | #endif | 53 | #endif |
52 | 54 | ||
53 | KCMKdePimConfig::KCMKdePimConfig(QWidget *parent, const char *name ) | 55 | KCMKdePimConfig::KCMKdePimConfig(QWidget *parent, const char *name ) |
54 | : KCModule( KPimGlobalPrefs::instance(), parent, name ) | 56 | : KCModule( KPimGlobalPrefs::instance(), parent, name ) |
55 | { | 57 | { |
56 | //abort(); | 58 | //abort(); |
57 | QVBoxLayout *layout = new QVBoxLayout( this ); | 59 | Q3VBoxLayout *layout = new Q3VBoxLayout( this ); |
58 | mConfigWidget = new KDEPIMConfigWidget( (KPimGlobalPrefs*)getPreferences(), this, "KDEPIMConfigWidget" ); | 60 | mConfigWidget = new KDEPIMConfigWidget( (KPimGlobalPrefs*)getPreferences(), this, "KDEPIMConfigWidget" ); |
59 | layout->addWidget( mConfigWidget ); | 61 | layout->addWidget( mConfigWidget ); |
60 | layout->setSpacing( 0 ); | 62 | layout->setSpacing( 0 ); |
61 | layout->setMargin( 0 ); | 63 | layout->setMargin( 0 ); |
62 | 64 | ||
63 | connect( mConfigWidget, SIGNAL( changed( bool ) ), SIGNAL( changed( bool ) ) ); | 65 | connect( mConfigWidget, SIGNAL( changed( bool ) ), SIGNAL( changed( bool ) ) ); |
64 | } | 66 | } |
65 | 67 | ||
66 | void KCMKdePimConfig::load() | 68 | void KCMKdePimConfig::load() |
67 | { | 69 | { |
68 | mConfigWidget->readConfig(); | 70 | mConfigWidget->readConfig(); |
69 | } | 71 | } |
70 | 72 | ||
71 | void KCMKdePimConfig::save() | 73 | void KCMKdePimConfig::save() |
72 | { | 74 | { |
73 | mConfigWidget->writeConfig(); | 75 | mConfigWidget->writeConfig(); |
74 | } | 76 | } |
75 | 77 | ||
76 | void KCMKdePimConfig::defaults() | 78 | void KCMKdePimConfig::defaults() |
77 | { | 79 | { |
78 | qDebug("KCMKdePimConfig::defaults()"); | 80 | qDebug("KCMKdePimConfig::defaults()"); |
79 | mConfigWidget->setDefaults(); | 81 | mConfigWidget->setDefaults(); |
80 | } | 82 | } |
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index 292951b..11a2b45 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp | |||
@@ -1,1011 +1,1016 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KdePim/Pi. | 2 | This file is part of KdePim/Pi. |
3 | Copyright (c) 2004 Ulf Schenk | 3 | Copyright (c) 2004 Ulf Schenk |
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 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | #include <qtabwidget.h> | 32 | #include <qtabwidget.h> |
33 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
34 | #include <qgroupbox.h> | 34 | #include <q3groupbox.h> |
35 | #include <qlabel.h> | 35 | #include <qlabel.h> |
36 | #include <qlineedit.h> | 36 | #include <qlineedit.h> |
37 | #include <qbuttongroup.h> | 37 | #include <q3buttongroup.h> |
38 | #include <qcheckbox.h> | 38 | #include <qcheckbox.h> |
39 | #include <qfile.h> | 39 | #include <qfile.h> |
40 | #include <qvbox.h> | 40 | #include <q3vbox.h> |
41 | #include <qdir.h> | 41 | #include <qdir.h> |
42 | #include <qregexp.h> | 42 | #include <qregexp.h> |
43 | #include <qspinbox.h> | 43 | #include <qspinbox.h> |
44 | #include <QDesktopWidget> | ||
45 | //Added by qt3to4: | ||
46 | #include <Q3HBoxLayout> | ||
47 | #include <Q3GridLayout> | ||
48 | #include <Q3VBoxLayout> | ||
44 | 49 | ||
45 | #include <kdialog.h> | 50 | #include <kdialog.h> |
46 | #include <kprefsdialog.h> | 51 | #include <kprefsdialog.h> |
47 | #include <klocale.h> | 52 | #include <klocale.h> |
48 | #include <kglobalsettings.h> | 53 | #include <kglobalsettings.h> |
49 | #include <kdateedit.h> | 54 | #include <kdateedit.h> |
50 | #include <kglobal.h> | 55 | #include <kglobal.h> |
51 | #include <stdlib.h> | 56 | #include <stdlib.h> |
52 | 57 | ||
53 | /*US | 58 | /*US |
54 | #include <qcheckbox.h> | 59 | #include <qcheckbox.h> |
55 | #include <qframe.h> | 60 | #include <qframe.h> |
56 | #include <qpushbutton.h> | 61 | #include <qpushbutton.h> |
57 | #include <qcombobox.h> | 62 | #include <qcombobox.h> |
58 | #include <qlineedit.h> | 63 | #include <qlineedit.h> |
59 | #include <qlabel.h> | 64 | #include <qlabel.h> |
60 | #include <qfile.h> | 65 | #include <qfile.h> |
61 | 66 | ||
62 | #include <kconfig.h> | 67 | #include <kconfig.h> |
63 | #include <kdebug.h> | 68 | #include <kdebug.h> |
64 | #include <kdialog.h> | 69 | #include <kdialog.h> |
65 | #include <klistview.h> | 70 | #include <klistview.h> |
66 | #include <klocale.h> | 71 | #include <klocale.h> |
67 | #include <kglobal.h> | 72 | #include <kglobal.h> |
68 | #include <kmessagebox.h> | 73 | #include <kmessagebox.h> |
69 | #include <kstandarddirs.h> | 74 | #include <kstandarddirs.h> |
70 | 75 | ||
71 | #ifndef KAB_EMBEDDED | 76 | #ifndef KAB_EMBEDDED |
72 | #include <ktrader.h> | 77 | #include <ktrader.h> |
73 | #else // KAB_EMBEDDED | 78 | #else // KAB_EMBEDDED |
74 | #include <mergewidget.h> | 79 | #include <mergewidget.h> |
75 | #include <distributionlistwidget.h> | 80 | #include <distributionlistwidget.h> |
76 | #endif // KAB_EMBEDDED | 81 | #endif // KAB_EMBEDDED |
77 | 82 | ||
78 | #include "addresseewidget.h" | 83 | #include "addresseewidget.h" |
79 | #include "extensionconfigdialog.h" | 84 | #include "extensionconfigdialog.h" |
80 | #include "extensionwidget.h" | 85 | #include "extensionwidget.h" |
81 | */ | 86 | */ |
82 | 87 | ||
83 | #include "qapplication.h" | 88 | #include "qapplication.h" |
84 | 89 | ||
85 | #include "kpimglobalprefs.h" | 90 | #include "kpimglobalprefs.h" |
86 | 91 | ||
87 | #include "kdepimconfigwidget.h" | 92 | #include "kdepimconfigwidget.h" |
88 | #include <kprefs.h> | 93 | #include <kprefs.h> |
89 | #include <kmessagebox.h> | 94 | #include <kmessagebox.h> |
90 | 95 | ||
91 | 96 | ||
92 | 97 | ||
93 | KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name ) | 98 | KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name ) |
94 | : KPrefsWidget(prefs, parent, name ) | 99 | : KPrefsWidget(prefs, parent, name ) |
95 | { | 100 | { |
96 | mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email")); | 101 | mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email")); |
97 | mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone")); | 102 | mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone")); |
98 | mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS")); | 103 | mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS")); |
99 | mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax")); | 104 | mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax")); |
100 | mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); | 105 | mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); |
101 | mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); | 106 | mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); |
102 | 107 | ||
103 | 108 | ||
104 | QVBoxLayout *topLayout = new QVBoxLayout( this, 0, | 109 | Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0, |
105 | KDialog::spacingHint() ); | 110 | KDialog::spacingHint() ); |
106 | 111 | ||
107 | tabWidget = new QTabWidget( this ); | 112 | tabWidget = new QTabWidget( this ); |
108 | topLayout->addWidget( tabWidget ); | 113 | topLayout->addWidget( tabWidget ); |
109 | 114 | ||
110 | 115 | ||
111 | setupLocaleTab(); | 116 | setupLocaleTab(); |
112 | setupLocaleDateTab(); | 117 | setupLocaleDateTab(); |
113 | setupTimeZoneTab(); | 118 | setupTimeZoneTab(); |
114 | setupExternalAppTab(); | 119 | setupExternalAppTab(); |
115 | setupStoreTab(); | 120 | setupStoreTab(); |
116 | setupBackupTab(); | 121 | setupBackupTab(); |
117 | } | 122 | } |
118 | void KDEPIMConfigWidget::showTimeZoneTab() | 123 | void KDEPIMConfigWidget::showTimeZoneTab() |
119 | { | 124 | { |
120 | tabWidget->setCurrentPage ( 3 ) ; | 125 | tabWidget->setCurrentPage ( 3 ) ; |
121 | } | 126 | } |
122 | void KDEPIMConfigWidget::setupBackupTab() | 127 | void KDEPIMConfigWidget::setupBackupTab() |
123 | { | 128 | { |
124 | QVBox *colorPage = new QVBox( this ); | 129 | Q3VBox *colorPage = new Q3VBox( this ); |
125 | tabWidget->addTab( colorPage, i18n( "Backup" ) ); | 130 | tabWidget->addTab( colorPage, i18n( "Backup" ) ); |
126 | QWidget* topFrame = new QWidget( colorPage ); | 131 | QWidget* topFrame = new QWidget( colorPage ); |
127 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | 132 | Q3VBoxLayout *topLayout = new Q3VBoxLayout(topFrame); |
128 | KPrefsWidBool *sb = addWidBool(i18n("Backup enabled"), | 133 | KPrefsWidBool *sb = addWidBool(i18n("Backup enabled"), |
129 | &(KPimGlobalPrefs::instance()->mBackupEnabled),topFrame); | 134 | &(KPimGlobalPrefs::instance()->mBackupEnabled),topFrame); |
130 | topLayout->addWidget((QWidget*)sb->checkBox()); | 135 | topLayout->addWidget((QWidget*)sb->checkBox()); |
131 | QWidget* bupFrame = new QWidget( topFrame ); | 136 | QWidget* bupFrame = new QWidget( topFrame ); |
132 | topLayout->addWidget((bupFrame)); | 137 | topLayout->addWidget((bupFrame)); |
133 | QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) ); | 138 | QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) ); |
134 | QVBoxLayout *bupLayout = new QVBoxLayout(bupFrame); | 139 | Q3VBoxLayout *bupLayout = new Q3VBoxLayout(bupFrame); |
135 | sb = addWidBool(i18n("Use standard backup dir"), | 140 | sb = addWidBool(i18n("Use standard backup dir"), |
136 | &(KPimGlobalPrefs::instance()->mBackupUseDefaultDir),bupFrame); | 141 | &(KPimGlobalPrefs::instance()->mBackupUseDefaultDir),bupFrame); |
137 | bupLayout->addWidget((QWidget*)sb->checkBox()); | 142 | bupLayout->addWidget((QWidget*)sb->checkBox()); |
138 | mBackupUrl = new KURLRequester( bupFrame ); | 143 | mBackupUrl = new KURLRequester( bupFrame ); |
139 | mBackupUrl->setPathIsDir(); | 144 | mBackupUrl->setPathIsDir(); |
140 | mBackupUrl->setURL( KGlobalSettings::backupDataDir() ); | 145 | mBackupUrl->setURL( KGlobalSettings::backupDataDir() ); |
141 | QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), mBackupUrl ,SLOT ( setDisabled( bool ) ) ); | 146 | QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), mBackupUrl ,SLOT ( setDisabled( bool ) ) ); |
142 | bupLayout->addWidget( mBackupUrl ); | 147 | bupLayout->addWidget( mBackupUrl ); |
143 | 148 | ||
144 | mBackupUrl->setEnabled( !KPimGlobalPrefs::instance()->mBackupUseDefaultDir ); | 149 | mBackupUrl->setEnabled( !KPimGlobalPrefs::instance()->mBackupUseDefaultDir ); |
145 | bupFrame->setEnabled( KPimGlobalPrefs::instance()->mBackupEnabled ); | 150 | bupFrame->setEnabled( KPimGlobalPrefs::instance()->mBackupEnabled ); |
146 | QHBox *dummy = new QHBox(bupFrame); | 151 | Q3HBox *dummy = new Q3HBox(bupFrame); |
147 | new QLabel(i18n("Number of Backups:"),dummy); | 152 | new QLabel(i18n("Number of Backups:"),dummy); |
148 | mBackupNumbersSpin = new QSpinBox(1,21,1,dummy); | 153 | mBackupNumbersSpin = new QSpinBox(1,21,1,dummy); |
149 | new QLabel(i18n(" "),dummy); | 154 | new QLabel(i18n(" "),dummy); |
150 | bupLayout->addWidget( dummy ); | 155 | bupLayout->addWidget( dummy ); |
151 | 156 | ||
152 | dummy = new QHBox(bupFrame); | 157 | dummy = new Q3HBox(bupFrame); |
153 | new QLabel(i18n("Make backup every "),dummy); | 158 | new QLabel(i18n("Make backup every "),dummy); |
154 | mBackupDayCountSpin = new QSpinBox(1,28,1,dummy); | 159 | mBackupDayCountSpin = new QSpinBox(1,28,1,dummy); |
155 | new QLabel(i18n(" days"),dummy); | 160 | new QLabel(i18n(" days"),dummy); |
156 | new QLabel(i18n(" "),dummy); | 161 | new QLabel(i18n(" "),dummy); |
157 | bupLayout->addWidget( dummy ); | 162 | bupLayout->addWidget( dummy ); |
158 | QString localKdeDir; | 163 | QString localKdeDir; |
159 | localKdeDir = readEnvPath("LOCALMICROKDEHOME"); | 164 | localKdeDir = readEnvPath("LOCALMICROKDEHOME"); |
160 | if ( ! localKdeDir.isEmpty() ) { | 165 | if ( ! localKdeDir.isEmpty() ) { |
161 | sb->checkBox()->setEnabled( false ); | 166 | sb->checkBox()->setEnabled( false ); |
162 | sb->checkBox()->setChecked( true ); | 167 | sb->checkBox()->setChecked( true ); |
163 | mBackupUrl->setEnabled( false ); | 168 | mBackupUrl->setEnabled( false ); |
164 | KPimGlobalPrefs::instance()->mBackupUseDefaultDir = true; | 169 | KPimGlobalPrefs::instance()->mBackupUseDefaultDir = true; |
165 | } | 170 | } |
166 | 171 | ||
167 | } | 172 | } |
168 | void KDEPIMConfigWidget::setupStoreTab() | 173 | void KDEPIMConfigWidget::setupStoreTab() |
169 | { | 174 | { |
170 | QVBox *colorPage = new QVBox( this ); | 175 | Q3VBox *colorPage = new Q3VBox( this ); |
171 | tabWidget->addTab( colorPage, i18n( "Colors" ) ); | 176 | tabWidget->addTab( colorPage, i18n( "Colors" ) ); |
172 | QWidget* cw = new QWidget( colorPage ); | 177 | QWidget* cw = new QWidget( colorPage ); |
173 | KPrefsWidColor *holidayColor = | 178 | KPrefsWidColor *holidayColor = |
174 | addWidColor(i18n("Alternating background of list views"), | 179 | addWidColor(i18n("Alternating background of list views"), |
175 | &(KPimGlobalPrefs::instance()->mAlternateColor),cw); | 180 | &(KPimGlobalPrefs::instance()->mAlternateColor),cw); |
176 | QHBoxLayout *topLayout = new QHBoxLayout(cw); | 181 | Q3HBoxLayout *topLayout = new Q3HBoxLayout(cw); |
177 | topLayout->addWidget(holidayColor->label()); | 182 | topLayout->addWidget(holidayColor->label()); |
178 | topLayout->addWidget( (QWidget* )holidayColor->button()); | 183 | topLayout->addWidget( (QWidget* )holidayColor->button()); |
179 | 184 | ||
180 | 185 | ||
181 | QVBox *storePage = new QVBox( this ); | 186 | Q3VBox *storePage = new Q3VBox( this ); |
182 | if ( QApplication::desktop()->height() > 240 ) | 187 | if ( QApplication::desktop()->height() > 240 ) |
183 | new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage ); | 188 | new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage ); |
184 | new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); | 189 | new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); |
185 | mStoreUrl = new KURLRequester( storePage ); | 190 | mStoreUrl = new KURLRequester( storePage ); |
186 | mStoreUrl->setPathIsDir(); | 191 | mStoreUrl->setPathIsDir(); |
187 | mStoreUrl->setURL( KGlobal::dirs()->localkdedir() ); | 192 | mStoreUrl->setURL( KGlobal::dirs()->localkdedir() ); |
188 | #ifdef DESKTOP_VERSION | 193 | #ifdef DESKTOP_VERSION |
189 | QString confFile = qApp->applicationDirPath ()+ "/.microkdehome" ; | 194 | QString confFile = qApp->applicationDirPath ()+ "/.microkdehome" ; |
190 | QFileInfo fi ( confFile ); | 195 | QFileInfo fi ( confFile ); |
191 | if ( fi.exists() ) { | 196 | if ( fi.exists() ) { |
192 | KConfig cfg ( confFile ); | 197 | KConfig cfg ( confFile ); |
193 | cfg.setGroup("Global"); | 198 | cfg.setGroup("Global"); |
194 | QString localKdeDir = cfg.readEntry( "MICROKDEHOME", "x_x_x" ); | 199 | QString localKdeDir = cfg.readEntry( "MICROKDEHOME", "x_x_x" ); |
195 | if ( localKdeDir != "x_x_x" ) { | 200 | if ( localKdeDir != "x_x_x" ) { |
196 | mStoreUrl->setURL( localKdeDir ); | 201 | mStoreUrl->setURL( localKdeDir ); |
197 | qDebug("Reading config from %s ", confFile.latin1()); | 202 | qDebug("Reading config from %s ", confFile.latin1()); |
198 | } | 203 | } |
199 | } | 204 | } |
200 | 205 | ||
201 | #endif | 206 | #endif |
202 | new QLabel( i18n("New dirs are created automatically"), storePage ); | 207 | new QLabel( i18n("New dirs are created automatically"), storePage ); |
203 | QHBox *bb = new QHBox( storePage ); | 208 | Q3HBox *bb = new Q3HBox( storePage ); |
204 | QPushButton * pb; | 209 | QPushButton * pb; |
205 | if ( QApplication::desktop()->width() < 640 ) | 210 | if ( QApplication::desktop()->width() < 640 ) |
206 | pb = new QPushButton ( i18n("Save"), bb ); | 211 | pb = new QPushButton ( i18n("Save"), bb ); |
207 | else | 212 | else |
208 | pb = new QPushButton ( i18n("Save settings"), bb ); | 213 | pb = new QPushButton ( i18n("Save settings"), bb ); |
209 | connect(pb, SIGNAL( clicked() ), this, SLOT ( saveStoreSettings() ) ); | 214 | connect(pb, SIGNAL( clicked() ), this, SLOT ( saveStoreSettings() ) ); |
210 | pb = new QPushButton ( i18n("Save standard"), bb ); | 215 | pb = new QPushButton ( i18n("Save standard"), bb ); |
211 | connect(pb, SIGNAL( clicked() ), this, SLOT ( setStandardStore() ) ); | 216 | connect(pb, SIGNAL( clicked() ), this, SLOT ( setStandardStore() ) ); |
212 | #ifdef DESKTOP_VERSION | 217 | #ifdef DESKTOP_VERSION |
213 | pb = new QPushButton ( i18n("Save using LOCAL storage"), bb ); | 218 | pb = new QPushButton ( i18n("Save using LOCAL storage"), bb ); |
214 | connect(pb, SIGNAL( clicked() ), this, SLOT ( setLocalStore() ) ); | 219 | connect(pb, SIGNAL( clicked() ), this, SLOT ( setLocalStore() ) ); |
215 | #endif | 220 | #endif |
216 | new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage ); | 221 | new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage ); |
217 | mDataStoragePath = new QLabel( i18n("Settings are stored in\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage ); | 222 | mDataStoragePath = new QLabel( i18n("Settings are stored in\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage ); |
218 | tabWidget->addTab( storePage, i18n( "Data storage path" ) ); | 223 | tabWidget->addTab( storePage, i18n( "Data storage path" ) ); |
219 | 224 | ||
220 | #ifdef DESKTOP_VERSION | 225 | #ifdef DESKTOP_VERSION |
221 | if ( mStoreUrl->url().startsWith( "LOCAL:" ) ) { | 226 | if ( mStoreUrl->url().startsWith( "LOCAL:" ) ) { |
222 | mDataStoragePath->setText( i18n("Settings are stored in\n%1").arg( qApp->applicationDirPath ()+"/.microkdehome" )); | 227 | mDataStoragePath->setText( i18n("Settings are stored in\n%1").arg( qApp->applicationDirPath ()+"/.microkdehome" )); |
223 | } | 228 | } |
224 | #endif | 229 | #endif |
225 | } | 230 | } |
226 | void KDEPIMConfigWidget::setLocalStore() | 231 | void KDEPIMConfigWidget::setLocalStore() |
227 | { | 232 | { |
228 | mStoreUrl->setURL( "LOCAL:kdepimpi" ); | 233 | mStoreUrl->setURL( "LOCAL:kdepimpi" ); |
229 | saveStoreSettings(); | 234 | saveStoreSettings(); |
230 | QString message = i18n("'LOCAL' mode makes is possible to run\nKA/Pi and KO/Pi from a USB memory stick.\nIn LOCAL mode the data is stored\nin a path relative to the executable.\nNote, that in LOCAL mode only addressbook\nresource files in\n <path of the executable>/<dirname after LOCAL:>/apps/kabc/*.vcf\n are supported.\nIf you use the standard addressbook settings\nyou do not have to reconfigure any path,\njust restart the application and import\nyour addressbook and calendar data."); | 235 | QString message = i18n("'LOCAL' mode makes is possible to run\nKA/Pi and KO/Pi from a USB memory stick.\nIn LOCAL mode the data is stored\nin a path relative to the executable.\nNote, that in LOCAL mode only addressbook\nresource files in\n <path of the executable>/<dirname after LOCAL:>/apps/kabc/*.vcf\n are supported.\nIf you use the standard addressbook settings\nyou do not have to reconfigure any path,\njust restart the application and import\nyour addressbook and calendar data."); |
231 | KMessageBox::information( this, message); | 236 | KMessageBox::information( this, message); |
232 | } | 237 | } |
233 | void KDEPIMConfigWidget::setStandardStore() | 238 | void KDEPIMConfigWidget::setStandardStore() |
234 | { | 239 | { |
235 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); | 240 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); |
236 | saveStoreSettings(); | 241 | saveStoreSettings(); |
237 | } | 242 | } |
238 | void KDEPIMConfigWidget::saveStoreSettings() | 243 | void KDEPIMConfigWidget::saveStoreSettings() |
239 | { | 244 | { |
240 | #ifdef DESKTOP_VERSION | 245 | #ifdef DESKTOP_VERSION |
241 | if ( !mStoreUrl->url().startsWith( "LOCAL:" ) ) { | 246 | if ( !mStoreUrl->url().startsWith( "LOCAL:" ) ) { |
242 | QString file = qApp->applicationDirPath ()+"/.microkdehome"; | 247 | QString file = qApp->applicationDirPath ()+"/.microkdehome"; |
243 | QFileInfo fi ( file ); | 248 | QFileInfo fi ( file ); |
244 | if ( fi.exists() ) { | 249 | if ( fi.exists() ) { |
245 | bool res = QFile::remove( file ); | 250 | bool res = QFile::remove( file ); |
246 | if ( ! res ) | 251 | if ( ! res ) |
247 | KMessageBox::information( this, i18n("ERROR: Cannot remove file\n%1\nPlease remove it manually.").arg( file )); | 252 | KMessageBox::information( this, i18n("ERROR: Cannot remove file\n%1\nPlease remove it manually.").arg( file )); |
248 | } | 253 | } |
249 | } | 254 | } |
250 | #endif | 255 | #endif |
251 | if ( !mStoreUrl->url().isEmpty() ) { | 256 | if ( !mStoreUrl->url().isEmpty() ) { |
252 | QString path = QDir::homeDirPath(); | 257 | QString path = QDir::homeDirPath(); |
253 | QString url = mStoreUrl->url(); | 258 | QString url = mStoreUrl->url(); |
254 | #ifdef DESKTOP_VERSION | 259 | #ifdef DESKTOP_VERSION |
255 | if ( url.startsWith( "LOCAL:" ) ) { | 260 | if ( url.startsWith( "LOCAL:" ) ) { |
256 | path = qApp->applicationDirPath () ; | 261 | path = qApp->applicationDirPath () ; |
257 | } | 262 | } |
258 | #endif | 263 | #endif |
259 | KConfig cfg ( path + "/.microkdehome" ); | 264 | KConfig cfg ( path + "/.microkdehome" ); |
260 | cfg.setGroup("Global"); | 265 | cfg.setGroup("Global"); |
261 | cfg.writeEntry( "MICROKDEHOME", url ); | 266 | cfg.writeEntry( "MICROKDEHOME", url ); |
262 | qDebug("cfg.writeEntry( MICROKDEHOME, %s ", url.latin1()); | 267 | qDebug("cfg.writeEntry( MICROKDEHOME, %s ", url.latin1()); |
263 | cfg.sync(); | 268 | cfg.sync(); |
264 | mDataStoragePath->setText( i18n("Settings are stored in\n%1").arg( path+"/.microkdehome" )); | 269 | mDataStoragePath->setText( i18n("Settings are stored in\n%1").arg( path+"/.microkdehome" )); |
265 | } else { | 270 | } else { |
266 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); | 271 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); |
267 | saveStoreSettings(); | 272 | saveStoreSettings(); |
268 | } | 273 | } |
269 | } | 274 | } |
270 | void KDEPIMConfigWidget::setupExternalAppTab() | 275 | void KDEPIMConfigWidget::setupExternalAppTab() |
271 | { | 276 | { |
272 | QWidget *externalAppsPage = new QWidget( this ); | 277 | QWidget *externalAppsPage = new QWidget( this ); |
273 | QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), | 278 | Q3VBoxLayout* layout = new Q3VBoxLayout( externalAppsPage, KDialog::marginHintSmall(), |
274 | KDialog::spacingHintSmall() ); | 279 | KDialog::spacingHintSmall() ); |
275 | 280 | ||
276 | mExternalApps = new QComboBox( externalAppsPage ); | 281 | mExternalApps = new QComboBox( externalAppsPage ); |
277 | 282 | ||
278 | QMap<ExternalAppHandler::Types, QString>::Iterator it; | 283 | QMap<ExternalAppHandler::Types, QString>::Iterator it; |
279 | for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) | 284 | for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) |
280 | mExternalApps->insertItem( it.data(), it.key() ); | 285 | mExternalApps->insertItem( it.data(), it.key() ); |
281 | 286 | ||
282 | layout->addWidget( mExternalApps ); | 287 | layout->addWidget( mExternalApps ); |
283 | 288 | ||
284 | connect( mExternalApps, SIGNAL( activated( int ) ), | 289 | connect( mExternalApps, SIGNAL( activated( int ) ), |
285 | this, SLOT (externalapp_changed( int ) ) ); | 290 | this, SLOT (externalapp_changed( int ) ) ); |
286 | 291 | ||
287 | 292 | ||
288 | mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); | 293 | mExternalAppGroupBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); |
289 | QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); | 294 | Q3GridLayout *boxLayout = new Q3GridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); |
290 | mExternalAppGroupBox->layout()->setMargin(4); | 295 | mExternalAppGroupBox->layout()->setMargin(4); |
291 | 296 | ||
292 | mClient = new QComboBox( mExternalAppGroupBox ); | 297 | mClient = new QComboBox( mExternalAppGroupBox ); |
293 | boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); | 298 | boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); |
294 | 299 | ||
295 | connect( mClient, SIGNAL( activated( int ) ), | 300 | connect( mClient, SIGNAL( activated( int ) ), |
296 | this, SLOT (client_changed( int ) ) ); | 301 | this, SLOT (client_changed( int ) ) ); |
297 | 302 | ||
298 | QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox); | 303 | QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox); |
299 | boxLayout->addWidget( lab, 1, 0 ); | 304 | boxLayout->addWidget( lab, 1, 0 ); |
300 | mChannel = new QLineEdit(mExternalAppGroupBox); | 305 | mChannel = new QLineEdit(mExternalAppGroupBox); |
301 | mChannel->setReadOnly(true); | 306 | mChannel->setReadOnly(true); |
302 | boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 ); | 307 | boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 ); |
303 | 308 | ||
304 | lab = new QLabel( i18n("Message:"), mExternalAppGroupBox); | 309 | lab = new QLabel( i18n("Message:"), mExternalAppGroupBox); |
305 | boxLayout->addWidget( lab, 3, 0 ); | 310 | boxLayout->addWidget( lab, 3, 0 ); |
306 | mMessage = new QLineEdit(mExternalAppGroupBox); | 311 | mMessage = new QLineEdit(mExternalAppGroupBox); |
307 | mMessage->setReadOnly(true); | 312 | mMessage->setReadOnly(true); |
308 | boxLayout->addWidget( mMessage , 4, 0); | 313 | boxLayout->addWidget( mMessage , 4, 0); |
309 | 314 | ||
310 | lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox); | 315 | lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox); |
311 | boxLayout->addWidget( lab, 3, 1 ); | 316 | boxLayout->addWidget( lab, 3, 1 ); |
312 | mParameters = new QLineEdit(mExternalAppGroupBox); | 317 | mParameters = new QLineEdit(mExternalAppGroupBox); |
313 | mParameters->setReadOnly(true); | 318 | mParameters->setReadOnly(true); |
314 | boxLayout->addWidget( mParameters, 4, 1 ); | 319 | boxLayout->addWidget( mParameters, 4, 1 ); |
315 | lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); | 320 | lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); |
316 | boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); | 321 | boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); |
317 | 322 | ||
318 | 323 | ||
319 | if ( QApplication::desktop()->height() > 240 ) { | 324 | if ( QApplication::desktop()->height() > 240 ) { |
320 | lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); | 325 | lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); |
321 | boxLayout->addWidget( lab, 6, 0 ); | 326 | boxLayout->addWidget( lab, 6, 0 ); |
322 | mMessage2 = new QLineEdit(mExternalAppGroupBox); | 327 | mMessage2 = new QLineEdit(mExternalAppGroupBox); |
323 | mMessage2->setReadOnly(true); | 328 | mMessage2->setReadOnly(true); |
324 | boxLayout->addWidget( mMessage2 , 7, 0); | 329 | boxLayout->addWidget( mMessage2 , 7, 0); |
325 | 330 | ||
326 | lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); | 331 | lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); |
327 | boxLayout->addWidget( lab, 6, 1 ); | 332 | boxLayout->addWidget( lab, 6, 1 ); |
328 | mParameters2 = new QLineEdit(mExternalAppGroupBox); | 333 | mParameters2 = new QLineEdit(mExternalAppGroupBox); |
329 | mParameters2->setReadOnly(true); | 334 | mParameters2->setReadOnly(true); |
330 | boxLayout->addWidget( mParameters2, 7, 1 ); | 335 | boxLayout->addWidget( mParameters2, 7, 1 ); |
331 | 336 | ||
332 | lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); | 337 | lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); |
333 | boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); | 338 | boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); |
334 | connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 339 | connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
335 | connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 340 | connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
336 | } else { | 341 | } else { |
337 | mMessage2 = 0; | 342 | mMessage2 = 0; |
338 | mParameters2 = 0; | 343 | mParameters2 = 0; |
339 | } | 344 | } |
340 | 345 | ||
341 | connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 346 | connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
342 | connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 347 | connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
343 | connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 348 | connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
344 | 349 | ||
345 | 350 | ||
346 | layout->addWidget( mExternalAppGroupBox ); | 351 | layout->addWidget( mExternalAppGroupBox ); |
347 | tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) ); | 352 | tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) ); |
348 | 353 | ||
349 | } | 354 | } |
350 | 355 | ||
351 | 356 | ||
352 | void KDEPIMConfigWidget::setupLocaleDateTab() | 357 | void KDEPIMConfigWidget::setupLocaleDateTab() |
353 | { | 358 | { |
354 | QWidget *topFrame = new QWidget( this ); | 359 | QWidget *topFrame = new QWidget( this ); |
355 | QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); | 360 | Q3GridLayout *topLayout = new Q3GridLayout( topFrame, 3, 2); |
356 | 361 | ||
357 | topLayout->setSpacing(KDialog::spacingHintSmall()); | 362 | topLayout->setSpacing(KDialog::spacingHintSmall()); |
358 | topLayout->setMargin(KDialog::marginHintSmall()); | 363 | topLayout->setMargin(KDialog::marginHintSmall()); |
359 | int iii = 0; | 364 | int iii = 0; |
360 | 365 | ||
361 | 366 | ||
362 | KPrefsWidRadios *syncPrefsGroup = | 367 | KPrefsWidRadios *syncPrefsGroup = |
363 | addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame); | 368 | addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame); |
364 | QString format; | 369 | QString format; |
365 | if ( QApplication::desktop()->width() < 480 ) | 370 | if ( QApplication::desktop()->width() < 480 ) |
366 | format = "(%d.%m.%Y)"; | 371 | format = "(%d.%m.%Y)"; |
367 | else | 372 | else |
368 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 373 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
369 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 374 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
370 | if ( QApplication::desktop()->width() < 480 ) | 375 | if ( QApplication::desktop()->width() < 480 ) |
371 | format = "(%m.%d.%Y)"; | 376 | format = "(%m.%d.%Y)"; |
372 | else | 377 | else |
373 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 378 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
374 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 379 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
375 | if ( QApplication::desktop()->width() < 480 ) | 380 | if ( QApplication::desktop()->width() < 480 ) |
376 | format = "(%Y-%m-%d)"; | 381 | format = "(%Y-%m-%d)"; |
377 | else | 382 | else |
378 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 383 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
379 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 384 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
380 | syncPrefsGroup->addRadio(i18n("User defined")); | 385 | syncPrefsGroup->addRadio(i18n("User defined")); |
381 | if ( QApplication::desktop()->width() < 480 ) { | 386 | if ( QApplication::desktop()->width() < 480 ) { |
382 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); | 387 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); |
383 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); | 388 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); |
384 | } | 389 | } |
385 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); | 390 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); |
386 | ++iii; | 391 | ++iii; |
387 | ++iii; | 392 | ++iii; |
388 | QLabel * lab; | 393 | QLabel * lab; |
389 | mUserDateFormatLong = new QLineEdit(topFrame); | 394 | mUserDateFormatLong = new QLineEdit(topFrame); |
390 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 395 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
391 | topLayout->addWidget(lab ,iii,0); | 396 | topLayout->addWidget(lab ,iii,0); |
392 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 397 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
393 | ++iii; | 398 | ++iii; |
394 | mUserDateFormatShort = new QLineEdit(topFrame); | 399 | mUserDateFormatShort = new QLineEdit(topFrame); |
395 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 400 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
396 | topLayout->addWidget(lab ,iii,0); | 401 | topLayout->addWidget(lab ,iii,0); |
397 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 402 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
398 | ++iii; | 403 | ++iii; |
399 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 404 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
400 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 405 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
401 | ++iii; | 406 | ++iii; |
402 | //qDebug(" QApplication::desktop()->height()xx %d ", QApplication::desktop()->height() ); | 407 | //qDebug(" QApplication::desktop()->height()xx %d ", QApplication::desktop()->height() ); |
403 | if ( QApplication::desktop()->height() > 240 ) { | 408 | if ( QApplication::desktop()->height() > 240 ) { |
404 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 409 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
405 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 410 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
406 | ++iii; | 411 | ++iii; |
407 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 412 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
408 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 413 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
409 | ++iii; | 414 | ++iii; |
410 | } | 415 | } |
411 | 416 | ||
412 | connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 417 | connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
413 | connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 418 | connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
414 | 419 | ||
415 | 420 | ||
416 | tabWidget->addTab( topFrame, i18n( "Date Format" ) ); | 421 | tabWidget->addTab( topFrame, i18n( "Date Format" ) ); |
417 | } | 422 | } |
418 | 423 | ||
419 | void KDEPIMConfigWidget::setupLocaleTab() | 424 | void KDEPIMConfigWidget::setupLocaleTab() |
420 | { | 425 | { |
421 | 426 | ||
422 | QWidget *topFrame = new QWidget( this ); | 427 | QWidget *topFrame = new QWidget( this ); |
423 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 428 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); |
424 | 429 | ||
425 | topLayout->setSpacing(KDialog::spacingHint()); | 430 | topLayout->setSpacing(KDialog::spacingHint()); |
426 | topLayout->setMargin(KDialog::marginHint()); | 431 | topLayout->setMargin(KDialog::marginHint()); |
427 | int iii = 0; | 432 | int iii = 0; |
428 | KPrefsWidRadios *syncPrefsGroup = | 433 | KPrefsWidRadios *syncPrefsGroup = |
429 | addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame); | 434 | addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame); |
430 | syncPrefsGroup->addRadio(i18n("English")); | 435 | syncPrefsGroup->addRadio(i18n("English")); |
431 | syncPrefsGroup->addRadio(i18n("German")); | 436 | syncPrefsGroup->addRadio(i18n("German")); |
432 | syncPrefsGroup->addRadio(i18n("French")); | 437 | syncPrefsGroup->addRadio(i18n("French")); |
433 | syncPrefsGroup->addRadio(i18n("Italian")); | 438 | syncPrefsGroup->addRadio(i18n("Italian")); |
434 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 439 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
435 | if ( QApplication::desktop()->width() < 300 ) { | 440 | if ( QApplication::desktop()->width() < 300 ) { |
436 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); | 441 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); |
437 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); | 442 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); |
438 | } | 443 | } |
439 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); | 444 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); |
440 | ++iii; | 445 | ++iii; |
441 | 446 | ||
442 | 447 | ||
443 | tabWidget->addTab( topFrame, i18n( "Language" ) ); | 448 | tabWidget->addTab( topFrame, i18n( "Language" ) ); |
444 | topFrame = new QWidget( this ); | 449 | topFrame = new QWidget( this ); |
445 | topLayout = new QGridLayout(topFrame,4,2); | 450 | topLayout = new Q3GridLayout(topFrame,4,2); |
446 | 451 | ||
447 | topLayout->setSpacing(KDialog::spacingHint()); | 452 | topLayout->setSpacing(KDialog::spacingHint()); |
448 | topLayout->setMargin(KDialog::marginHint()); | 453 | topLayout->setMargin(KDialog::marginHint()); |
449 | iii = 0; | 454 | iii = 0; |
450 | syncPrefsGroup = | 455 | syncPrefsGroup = |
451 | addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame); | 456 | addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame); |
452 | if ( QApplication::desktop()->width() > 300 ) | 457 | if ( QApplication::desktop()->width() > 300 ) |
453 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); | 458 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); |
454 | syncPrefsGroup->addRadio(i18n("24:00")); | 459 | syncPrefsGroup->addRadio(i18n("24:00")); |
455 | syncPrefsGroup->addRadio(i18n("12:00am")); | 460 | syncPrefsGroup->addRadio(i18n("12:00am")); |
456 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); | 461 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); |
457 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 462 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
458 | ++iii; | 463 | ++iii; |
459 | 464 | ||
460 | KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"), | 465 | KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"), |
461 | &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame); | 466 | &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame); |
462 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | 467 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); |
463 | ++iii; | 468 | ++iii; |
464 | 469 | ||
465 | 470 | ||
466 | tabWidget->addTab( topFrame, i18n( "Time Format" ) ); | 471 | tabWidget->addTab( topFrame, i18n( "Time Format" ) ); |
467 | 472 | ||
468 | } | 473 | } |
469 | 474 | ||
470 | 475 | ||
471 | void KDEPIMConfigWidget::setupTimeZoneTab() | 476 | void KDEPIMConfigWidget::setupTimeZoneTab() |
472 | { | 477 | { |
473 | QWidget *topFrame; | 478 | QWidget *topFrame; |
474 | QGridLayout *topLayout ; | 479 | Q3GridLayout *topLayout ; |
475 | 480 | ||
476 | 481 | ||
477 | 482 | ||
478 | 483 | ||
479 | 484 | ||
480 | 485 | ||
481 | topFrame = new QWidget( this ); | 486 | topFrame = new QWidget( this ); |
482 | topLayout = new QGridLayout( topFrame, 5, 2); | 487 | topLayout = new Q3GridLayout( topFrame, 5, 2); |
483 | topLayout->setSpacing(KDialog::spacingHintSmall()); | 488 | topLayout->setSpacing(KDialog::spacingHintSmall()); |
484 | topLayout->setMargin(KDialog::marginHintSmall()); | 489 | topLayout->setMargin(KDialog::marginHintSmall()); |
485 | 490 | ||
486 | QHBox *timeZoneBox = new QHBox( topFrame ); | 491 | Q3HBox *timeZoneBox = new Q3HBox( topFrame ); |
487 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); | 492 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); |
488 | 493 | ||
489 | new QLabel( i18n("Timezone:"), timeZoneBox ); | 494 | new QLabel( i18n("Timezone:"), timeZoneBox ); |
490 | mTimeZoneCombo = new QComboBox( timeZoneBox ); | 495 | mTimeZoneCombo = new QComboBox( timeZoneBox ); |
491 | if ( QApplication::desktop()->width() < 300 ) { | 496 | if ( QApplication::desktop()->width() < 300 ) { |
492 | mTimeZoneCombo->setMaximumWidth(150); | 497 | mTimeZoneCombo->setMaximumWidth(150); |
493 | } | 498 | } |
494 | 499 | ||
495 | QStringList list; | 500 | QStringList list; |
496 | list = KGlobal::locale()->timeZoneList(); | 501 | list = KGlobal::locale()->timeZoneList(); |
497 | mTimeZoneCombo->insertStringList(list); | 502 | mTimeZoneCombo->insertStringList(list); |
498 | 503 | ||
499 | // find the currently set time zone and select it | 504 | // find the currently set time zone and select it |
500 | QString sCurrentlySet = KPimGlobalPrefs::instance()->mTimeZoneId; | 505 | QString sCurrentlySet = KPimGlobalPrefs::instance()->mTimeZoneId; |
501 | int nCurrentlySet = 11; | 506 | int nCurrentlySet = 11; |
502 | for (int i = 0; i < mTimeZoneCombo->count(); i++) | 507 | for (int i = 0; i < mTimeZoneCombo->count(); i++) |
503 | { | 508 | { |
504 | if (mTimeZoneCombo->text(i) == sCurrentlySet) | 509 | if (mTimeZoneCombo->text(i) == sCurrentlySet) |
505 | { | 510 | { |
506 | nCurrentlySet = i; | 511 | nCurrentlySet = i; |
507 | break; | 512 | break; |
508 | } | 513 | } |
509 | } | 514 | } |
510 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); | 515 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); |
511 | int iii = 1; | 516 | int iii = 1; |
512 | KPrefsWidBool *sb = | 517 | KPrefsWidBool *sb = |
513 | addWidBool(i18n("Add 30 min to selected Timezone"), | 518 | addWidBool(i18n("Add 30 min to selected Timezone"), |
514 | &(KPimGlobalPrefs::instance()->mTimeZoneAdd30min),topFrame); | 519 | &(KPimGlobalPrefs::instance()->mTimeZoneAdd30min),topFrame); |
515 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | 520 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); |
516 | ++iii; | 521 | ++iii; |
517 | sb = | 522 | sb = |
518 | addWidBool(i18n("Timezone has daylight saving"), | 523 | addWidBool(i18n("Timezone has daylight saving"), |
519 | &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); | 524 | &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); |
520 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | 525 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); |
521 | ++iii; | 526 | ++iii; |
522 | QLabel* lab; | 527 | QLabel* lab; |
523 | 528 | ||
524 | lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); | 529 | lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); |
525 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 530 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
526 | ++iii; | 531 | ++iii; |
527 | 532 | ||
528 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); | 533 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); |
529 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 534 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
530 | ++iii; | 535 | ++iii; |
531 | lab = new QLabel( i18n("Daylight start:"), topFrame ); | 536 | lab = new QLabel( i18n("Daylight start:"), topFrame ); |
532 | topLayout->addWidget(lab, iii,0); | 537 | topLayout->addWidget(lab, iii,0); |
533 | mStartDateSavingEdit = new KDateEdit(topFrame); | 538 | mStartDateSavingEdit = new KDateEdit(topFrame); |
534 | topLayout->addWidget(mStartDateSavingEdit, iii,1); | 539 | topLayout->addWidget(mStartDateSavingEdit, iii,1); |
535 | ++iii; | 540 | ++iii; |
536 | 541 | ||
537 | lab = new QLabel( i18n("Daylight end:"), topFrame ); | 542 | lab = new QLabel( i18n("Daylight end:"), topFrame ); |
538 | topLayout->addWidget(lab, iii,0); | 543 | topLayout->addWidget(lab, iii,0); |
539 | mEndDateSavingEdit = new KDateEdit(topFrame); | 544 | mEndDateSavingEdit = new KDateEdit(topFrame); |
540 | topLayout->addWidget(mEndDateSavingEdit, iii,1); | 545 | topLayout->addWidget(mEndDateSavingEdit, iii,1); |
541 | ++iii; | 546 | ++iii; |
542 | QDate current ( 2001, 1,1); | 547 | QDate current ( 2001, 1,1); |
543 | mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1)); | 548 | mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1)); |
544 | mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1)); | 549 | mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1)); |
545 | 550 | ||
546 | connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); | 551 | connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); |
547 | connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); | 552 | connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); |
548 | connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) ); | 553 | connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) ); |
549 | tabWidget->addTab( topFrame, i18n( "Time Zone" ) ); | 554 | tabWidget->addTab( topFrame, i18n( "Time Zone" ) ); |
550 | 555 | ||
551 | 556 | ||
552 | topFrame = new QWidget( this ); | 557 | topFrame = new QWidget( this ); |
553 | topLayout = new QGridLayout( topFrame, 3, 2); | 558 | topLayout = new Q3GridLayout( topFrame, 3, 2); |
554 | topLayout->setSpacing(KDialog::spacingHintSmall()); | 559 | topLayout->setSpacing(KDialog::spacingHintSmall()); |
555 | topLayout->setMargin(KDialog::marginHintSmall()); | 560 | topLayout->setMargin(KDialog::marginHintSmall()); |
556 | tabWidget->addTab( topFrame, i18n( "Fonts" ) ); | 561 | tabWidget->addTab( topFrame, i18n( "Fonts" ) ); |
557 | 562 | ||
558 | QLabel* labb = new QLabel( i18n("Global application font for all apps:"), topFrame ); | 563 | QLabel* labb = new QLabel( i18n("Global application font for all apps:"), topFrame ); |
559 | topLayout->addMultiCellWidget(labb,0,0,0,2); | 564 | topLayout->addMultiCellWidget(labb,0,0,0,2); |
560 | int i = 1; | 565 | int i = 1; |
561 | KPrefsWidFont *timeLabelsFont = | 566 | KPrefsWidFont *timeLabelsFont = |
562 | addWidFont(i18n("Kx/Pi"),i18n("Application Font"), | 567 | addWidFont(i18n("Kx/Pi"),i18n("Application Font"), |
563 | &(KPimGlobalPrefs::instance()->mApplicationFont),topFrame); | 568 | &(KPimGlobalPrefs::instance()->mApplicationFont),topFrame); |
564 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 569 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
565 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 570 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
566 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 571 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
567 | } | 572 | } |
568 | 573 | ||
569 | void KDEPIMConfigWidget::externalapp_changed( int newApp ) | 574 | void KDEPIMConfigWidget::externalapp_changed( int newApp ) |
570 | { | 575 | { |
571 | // first store the current data | 576 | // first store the current data |
572 | saveEditFieldSettings(); | 577 | saveEditFieldSettings(); |
573 | 578 | ||
574 | // set mCurrentApp | 579 | // set mCurrentApp |
575 | mCurrentApp = (ExternalAppHandler::Types)newApp; | 580 | mCurrentApp = (ExternalAppHandler::Types)newApp; |
576 | 581 | ||
577 | // set mCurrentClient | 582 | // set mCurrentClient |
578 | switch(mCurrentApp) | 583 | switch(mCurrentApp) |
579 | { | 584 | { |
580 | case(ExternalAppHandler::EMAIL): | 585 | case(ExternalAppHandler::EMAIL): |
581 | mCurrentClient = mEmailClient; | 586 | mCurrentClient = mEmailClient; |
582 | break; | 587 | break; |
583 | case(ExternalAppHandler::PHONE): | 588 | case(ExternalAppHandler::PHONE): |
584 | mCurrentClient = mPhoneClient; | 589 | mCurrentClient = mPhoneClient; |
585 | break; | 590 | break; |
586 | case(ExternalAppHandler::SMS): | 591 | case(ExternalAppHandler::SMS): |
587 | mCurrentClient = mSMSClient; | 592 | mCurrentClient = mSMSClient; |
588 | break; | 593 | break; |
589 | case(ExternalAppHandler::FAX): | 594 | case(ExternalAppHandler::FAX): |
590 | mCurrentClient = mFaxClient; | 595 | mCurrentClient = mFaxClient; |
591 | break; | 596 | break; |
592 | case(ExternalAppHandler::PAGER): | 597 | case(ExternalAppHandler::PAGER): |
593 | mCurrentClient = mPagerClient; | 598 | mCurrentClient = mPagerClient; |
594 | break; | 599 | break; |
595 | case(ExternalAppHandler::SIP): | 600 | case(ExternalAppHandler::SIP): |
596 | mCurrentClient = mSipClient; | 601 | mCurrentClient = mSipClient; |
597 | break; | 602 | break; |
598 | default: | 603 | default: |
599 | return; | 604 | return; |
600 | } | 605 | } |
601 | 606 | ||
602 | // and at last update the widgets | 607 | // and at last update the widgets |
603 | updateClientWidgets(); | 608 | updateClientWidgets(); |
604 | } | 609 | } |
605 | 610 | ||
606 | 611 | ||
607 | 612 | ||
608 | void KDEPIMConfigWidget::client_changed( int newClient ) | 613 | void KDEPIMConfigWidget::client_changed( int newClient ) |
609 | { | 614 | { |
610 | if (newClient == mCurrentClient) | 615 | if (newClient == mCurrentClient) |
611 | return; | 616 | return; |
612 | 617 | ||
613 | // first store the current data | 618 | // first store the current data |
614 | saveEditFieldSettings(); | 619 | saveEditFieldSettings(); |
615 | 620 | ||
616 | 621 | ||
617 | //then reset the clientvariable | 622 | //then reset the clientvariable |
618 | mCurrentClient = newClient; | 623 | mCurrentClient = newClient; |
619 | 624 | ||
620 | // and at last update the widgets | 625 | // and at last update the widgets |
621 | updateClientWidgets(); | 626 | updateClientWidgets(); |
622 | 627 | ||
623 | KPrefsWidget::modified(); | 628 | KPrefsWidget::modified(); |
624 | } | 629 | } |
625 | 630 | ||
626 | void KDEPIMConfigWidget::saveEditFieldSettings() | 631 | void KDEPIMConfigWidget::saveEditFieldSettings() |
627 | { | 632 | { |
628 | 633 | ||
629 | switch(mCurrentApp) | 634 | switch(mCurrentApp) |
630 | { | 635 | { |
631 | case(ExternalAppHandler::EMAIL): | 636 | case(ExternalAppHandler::EMAIL): |
632 | mEmailClient = mClient->currentItem(); | 637 | mEmailClient = mClient->currentItem(); |
633 | break; | 638 | break; |
634 | case(ExternalAppHandler::PHONE): | 639 | case(ExternalAppHandler::PHONE): |
635 | mPhoneClient= mClient->currentItem(); | 640 | mPhoneClient= mClient->currentItem(); |
636 | break; | 641 | break; |
637 | case(ExternalAppHandler::SMS): | 642 | case(ExternalAppHandler::SMS): |
638 | mSMSClient = mClient->currentItem(); | 643 | mSMSClient = mClient->currentItem(); |
639 | break; | 644 | break; |
640 | case(ExternalAppHandler::FAX): | 645 | case(ExternalAppHandler::FAX): |
641 | mFaxClient = mClient->currentItem(); | 646 | mFaxClient = mClient->currentItem(); |
642 | break; | 647 | break; |
643 | case(ExternalAppHandler::PAGER): | 648 | case(ExternalAppHandler::PAGER): |
644 | mPagerClient = mClient->currentItem(); | 649 | mPagerClient = mClient->currentItem(); |
645 | break; | 650 | break; |
646 | case(ExternalAppHandler::SIP): | 651 | case(ExternalAppHandler::SIP): |
647 | mSipClient = mClient->currentItem(); | 652 | mSipClient = mClient->currentItem(); |
648 | break; | 653 | break; |
649 | default: | 654 | default: |
650 | return; | 655 | return; |
651 | } | 656 | } |
652 | 657 | ||
653 | //store the current data back to the apropriate membervariables if we had set it to "other" | 658 | //store the current data back to the apropriate membervariables if we had set it to "other" |
654 | if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) | 659 | if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) |
655 | { | 660 | { |
656 | mEmailOtherChannel = mChannel->text(); | 661 | mEmailOtherChannel = mChannel->text(); |
657 | mEmailOtherMessage = mMessage->text(); | 662 | mEmailOtherMessage = mMessage->text(); |
658 | mEmailOtherMessageParameters = mParameters->text(); | 663 | mEmailOtherMessageParameters = mParameters->text(); |
659 | if ( mMessage2 ) | 664 | if ( mMessage2 ) |
660 | mEmailOtherMessage2 = mMessage2->text(); | 665 | mEmailOtherMessage2 = mMessage2->text(); |
661 | if ( mParameters2 ) | 666 | if ( mParameters2 ) |
662 | mEmailOtherMessageParameters2 = mParameters2->text(); | 667 | mEmailOtherMessageParameters2 = mParameters2->text(); |
663 | } | 668 | } |
664 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) | 669 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) |
665 | { | 670 | { |
666 | mPhoneOtherChannel = mChannel->text(); | 671 | mPhoneOtherChannel = mChannel->text(); |
667 | mPhoneOtherMessage = mMessage->text(); | 672 | mPhoneOtherMessage = mMessage->text(); |
668 | mPhoneOtherMessageParameters = mParameters->text(); | 673 | mPhoneOtherMessageParameters = mParameters->text(); |
669 | } | 674 | } |
670 | else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) | 675 | else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) |
671 | { | 676 | { |
672 | mSMSOtherChannel = mChannel->text(); | 677 | mSMSOtherChannel = mChannel->text(); |
673 | mSMSOtherMessage = mMessage->text(); | 678 | mSMSOtherMessage = mMessage->text(); |
674 | mSMSOtherMessageParameters = mParameters->text(); | 679 | mSMSOtherMessageParameters = mParameters->text(); |
675 | } | 680 | } |
676 | else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) | 681 | else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) |
677 | { | 682 | { |
678 | mFaxOtherChannel = mChannel->text(); | 683 | mFaxOtherChannel = mChannel->text(); |
679 | mFaxOtherMessage = mMessage->text(); | 684 | mFaxOtherMessage = mMessage->text(); |
680 | mFaxOtherMessageParameters = mParameters->text(); | 685 | mFaxOtherMessageParameters = mParameters->text(); |
681 | } | 686 | } |
682 | else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) | 687 | else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) |
683 | { | 688 | { |
684 | mPagerOtherChannel = mChannel->text(); | 689 | mPagerOtherChannel = mChannel->text(); |
685 | mPagerOtherMessage = mMessage->text(); | 690 | mPagerOtherMessage = mMessage->text(); |
686 | mPagerOtherMessageParameters = mParameters->text(); | 691 | mPagerOtherMessageParameters = mParameters->text(); |
687 | } | 692 | } |
688 | else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) | 693 | else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) |
689 | { | 694 | { |
690 | mSipOtherChannel = mChannel->text(); | 695 | mSipOtherChannel = mChannel->text(); |
691 | mSipOtherMessage = mMessage->text(); | 696 | mSipOtherMessage = mMessage->text(); |
692 | mSipOtherMessageParameters = mParameters->text(); | 697 | mSipOtherMessageParameters = mParameters->text(); |
693 | } | 698 | } |
694 | 699 | ||
695 | 700 | ||
696 | } | 701 | } |
697 | 702 | ||
698 | void KDEPIMConfigWidget::updateClientWidgets() | 703 | void KDEPIMConfigWidget::updateClientWidgets() |
699 | { | 704 | { |
700 | bool blocked = signalsBlocked(); | 705 | bool blocked = signalsBlocked(); |
701 | blockSignals( true ); | 706 | blockSignals( true ); |
702 | 707 | ||
703 | // at this point we assume, that mCurrentApp and mCurrentClient are set to the values that we want to display | 708 | // at this point we assume, that mCurrentApp and mCurrentClient are set to the values that we want to display |
704 | QMap<ExternalAppHandler::Types, QString>::Iterator it = mExternalAppsMap.find ( mCurrentApp ); | 709 | QMap<ExternalAppHandler::Types, QString>::Iterator it = mExternalAppsMap.find ( mCurrentApp ); |
705 | if (it == mExternalAppsMap.end()) | 710 | if (it == mExternalAppsMap.end()) |
706 | return; | 711 | return; |
707 | 712 | ||
708 | // update group box | 713 | // update group box |
709 | mExternalAppGroupBox->setTitle(i18n( "Used %1 Client" ).arg(it.data())); | 714 | mExternalAppGroupBox->setTitle(i18n( "Used %1 Client" ).arg(it.data())); |
710 | 715 | ||
711 | //update the entries in the client combobox | 716 | //update the entries in the client combobox |
712 | mClient->clear(); | 717 | mClient->clear(); |
713 | 718 | ||
714 | QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); | 719 | Q3PtrList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); |
715 | DefaultAppItem* dai; | 720 | DefaultAppItem* dai; |
716 | for ( dai=items.first(); dai != 0; dai=items.next() ) | 721 | for ( dai=items.first(); dai != 0; dai=items.next() ) |
717 | { | 722 | { |
718 | mClient->insertItem( i18n(dai->_label), dai->_id ); | 723 | mClient->insertItem( i18n(dai->_label), dai->_id ); |
719 | 724 | ||
720 | if (dai->_id == mCurrentClient) | 725 | if (dai->_id == mCurrentClient) |
721 | { | 726 | { |
722 | //restore the edit fields with the data of the local membervariables if we had set it to "other". | 727 | //restore the edit fields with the data of the local membervariables if we had set it to "other". |
723 | //Otherwise take the default data from externalapphandler. | 728 | //Otherwise take the default data from externalapphandler. |
724 | mChannel->setText(dai->_channel); | 729 | mChannel->setText(dai->_channel); |
725 | mMessage->setText(dai->_message); | 730 | mMessage->setText(dai->_message); |
726 | mParameters->setText(dai->_parameters); | 731 | mParameters->setText(dai->_parameters); |
727 | if ( mMessage2 ) | 732 | if ( mMessage2 ) |
728 | mMessage2->setText(dai->_message2); | 733 | mMessage2->setText(dai->_message2); |
729 | if ( mParameters2 ) | 734 | if ( mParameters2 ) |
730 | mParameters2->setText(dai->_parameters2); | 735 | mParameters2->setText(dai->_parameters2); |
731 | 736 | ||
732 | 737 | ||
733 | if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) | 738 | if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) |
734 | { | 739 | { |
735 | mChannel->setText(mEmailOtherChannel); | 740 | mChannel->setText(mEmailOtherChannel); |
736 | mMessage->setText(mEmailOtherMessage); | 741 | mMessage->setText(mEmailOtherMessage); |
737 | mParameters->setText(mEmailOtherMessageParameters); | 742 | mParameters->setText(mEmailOtherMessageParameters); |
738 | if ( mMessage2 ) | 743 | if ( mMessage2 ) |
739 | mMessage2->setText(mEmailOtherMessage2); | 744 | mMessage2->setText(mEmailOtherMessage2); |
740 | if ( mParameters2 ) | 745 | if ( mParameters2 ) |
741 | mParameters2->setText(mEmailOtherMessageParameters2); | 746 | mParameters2->setText(mEmailOtherMessageParameters2); |
742 | } | 747 | } |
743 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) | 748 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) |
744 | { | 749 | { |
745 | mChannel->setText(mPhoneOtherChannel); | 750 | mChannel->setText(mPhoneOtherChannel); |
746 | mMessage->setText(mPhoneOtherMessage); | 751 | mMessage->setText(mPhoneOtherMessage); |
747 | mParameters->setText(mPhoneOtherMessageParameters); | 752 | mParameters->setText(mPhoneOtherMessageParameters); |
748 | } | 753 | } |
749 | else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) | 754 | else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) |
750 | { | 755 | { |
751 | mChannel->setText(mSMSOtherChannel); | 756 | mChannel->setText(mSMSOtherChannel); |
752 | mMessage->setText(mSMSOtherMessage); | 757 | mMessage->setText(mSMSOtherMessage); |
753 | mParameters->setText(mSMSOtherMessageParameters); | 758 | mParameters->setText(mSMSOtherMessageParameters); |
754 | } | 759 | } |
755 | else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) | 760 | else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) |
756 | { | 761 | { |
757 | mChannel->setText(mFaxOtherChannel); | 762 | mChannel->setText(mFaxOtherChannel); |
758 | mMessage->setText(mFaxOtherMessage); | 763 | mMessage->setText(mFaxOtherMessage); |
759 | mParameters->setText(mFaxOtherMessageParameters); | 764 | mParameters->setText(mFaxOtherMessageParameters); |
760 | } | 765 | } |
761 | else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) | 766 | else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) |
762 | { | 767 | { |
763 | mChannel->setText(mPagerOtherChannel); | 768 | mChannel->setText(mPagerOtherChannel); |
764 | mMessage->setText(mPagerOtherMessage); | 769 | mMessage->setText(mPagerOtherMessage); |
765 | mParameters->setText(mPagerOtherMessageParameters); | 770 | mParameters->setText(mPagerOtherMessageParameters); |
766 | } | 771 | } |
767 | else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) | 772 | else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) |
768 | { | 773 | { |
769 | mChannel->setText(mSipOtherChannel); | 774 | mChannel->setText(mSipOtherChannel); |
770 | mMessage->setText(mSipOtherMessage); | 775 | mMessage->setText(mSipOtherMessage); |
771 | mParameters->setText(mSipOtherMessageParameters); | 776 | mParameters->setText(mSipOtherMessageParameters); |
772 | } | 777 | } |
773 | } | 778 | } |
774 | 779 | ||
775 | } | 780 | } |
776 | 781 | ||
777 | bool readonly; | 782 | bool readonly; |
778 | bool enabled; | 783 | bool enabled; |
779 | if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) | 784 | if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) |
780 | ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) | 785 | ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) |
781 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) | 786 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) |
782 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) | 787 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) |
783 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) | 788 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) |
784 | ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))) | 789 | ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))) |
785 | { | 790 | { |
786 | readonly = false; | 791 | readonly = false; |
787 | } | 792 | } |
788 | else | 793 | else |
789 | { | 794 | { |
790 | readonly = true; | 795 | readonly = true; |
791 | } | 796 | } |
792 | 797 | ||
793 | if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::NONE_EMC)) | 798 | if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::NONE_EMC)) |
794 | ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::NONE_PHC)) | 799 | ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::NONE_PHC)) |
795 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::NONE_SMC)) | 800 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::NONE_SMC)) |
796 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::NONE_FAC)) | 801 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::NONE_FAC)) |
797 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::NONE_PAC)) | 802 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::NONE_PAC)) |
798 | ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::NONE_SIC))) | 803 | ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::NONE_SIC))) |
799 | { | 804 | { |
800 | enabled = false; | 805 | enabled = false; |
801 | } | 806 | } |
802 | else | 807 | else |
803 | { | 808 | { |
804 | enabled = true; | 809 | enabled = true; |
805 | } | 810 | } |
806 | 811 | ||
807 | 812 | ||
808 | mChannel->setReadOnly(readonly); | 813 | mChannel->setReadOnly(readonly); |
809 | mMessage->setReadOnly(readonly); | 814 | mMessage->setReadOnly(readonly); |
810 | mParameters->setReadOnly(readonly); | 815 | mParameters->setReadOnly(readonly); |
811 | if ( mMessage2 ) | 816 | if ( mMessage2 ) |
812 | mMessage2->setReadOnly(readonly); | 817 | mMessage2->setReadOnly(readonly); |
813 | if ( mParameters2 ) | 818 | if ( mParameters2 ) |
814 | mParameters2->setReadOnly(readonly); | 819 | mParameters2->setReadOnly(readonly); |
815 | 820 | ||
816 | mChannel->setEnabled(enabled); | 821 | mChannel->setEnabled(enabled); |
817 | mMessage->setEnabled(enabled); | 822 | mMessage->setEnabled(enabled); |
818 | mParameters->setEnabled(enabled); | 823 | mParameters->setEnabled(enabled); |
819 | if ( mMessage2 ) | 824 | if ( mMessage2 ) |
820 | mMessage2->setEnabled(enabled); | 825 | mMessage2->setEnabled(enabled); |
821 | if ( mParameters2 ) | 826 | if ( mParameters2 ) |
822 | mParameters2->setEnabled(enabled); | 827 | mParameters2->setEnabled(enabled); |
823 | 828 | ||
824 | 829 | ||
825 | 830 | ||
826 | mClient->setCurrentItem(mCurrentClient); | 831 | mClient->setCurrentItem(mCurrentClient); |
827 | 832 | ||
828 | 833 | ||
829 | // enable/disable the extra message/parameter field | 834 | // enable/disable the extra message/parameter field |
830 | if (mCurrentApp == ExternalAppHandler::EMAIL) | 835 | if (mCurrentApp == ExternalAppHandler::EMAIL) |
831 | { | 836 | { |
832 | } | 837 | } |
833 | else | 838 | else |
834 | { | 839 | { |
835 | if ( mMessage2 ) | 840 | if ( mMessage2 ) |
836 | mMessage2->setText( "" ); | 841 | mMessage2->setText( "" ); |
837 | if ( mParameters2 ) | 842 | if ( mParameters2 ) |
838 | mParameters2->setText( "" ); | 843 | mParameters2->setText( "" ); |
839 | } | 844 | } |
840 | 845 | ||
841 | if (enabled == true) { | 846 | if (enabled == true) { |
842 | if ( mMessage2 ) | 847 | if ( mMessage2 ) |
843 | mMessage2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); | 848 | mMessage2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); |
844 | if ( mParameters2 ) | 849 | if ( mParameters2 ) |
845 | mParameters2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); | 850 | mParameters2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); |
846 | } | 851 | } |
847 | 852 | ||
848 | 853 | ||
849 | blockSignals( blocked ); | 854 | blockSignals( blocked ); |
850 | 855 | ||
851 | } | 856 | } |
852 | 857 | ||
853 | void KDEPIMConfigWidget::usrReadConfig() | 858 | void KDEPIMConfigWidget::usrReadConfig() |
854 | { | 859 | { |
855 | KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); | 860 | KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); |
856 | 861 | ||
857 | bool blocked = signalsBlocked(); | 862 | bool blocked = signalsBlocked(); |
858 | blockSignals( true ); | 863 | blockSignals( true ); |
859 | 864 | ||
860 | if (KPimGlobalPrefs::instance()->mBackupUseDefaultDir ) | 865 | if (KPimGlobalPrefs::instance()->mBackupUseDefaultDir ) |
861 | mBackupUrl->setURL( KGlobalSettings::backupDataDir() ); | 866 | mBackupUrl->setURL( KGlobalSettings::backupDataDir() ); |
862 | else { | 867 | else { |
863 | mBackupUrl->setURL(prefs->mBackupDatadir); | 868 | mBackupUrl->setURL(prefs->mBackupDatadir); |
864 | 869 | ||
865 | } | 870 | } |
866 | mBackupNumbersSpin->setValue( prefs->mBackupNumbers ); | 871 | mBackupNumbersSpin->setValue( prefs->mBackupNumbers ); |
867 | mBackupDayCountSpin->setValue( prefs->mBackupDayCount); | 872 | mBackupDayCountSpin->setValue( prefs->mBackupDayCount); |
868 | 873 | ||
869 | QString dummy = prefs->mUserDateFormatLong; | 874 | QString dummy = prefs->mUserDateFormatLong; |
870 | mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); | 875 | mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); |
871 | dummy = prefs->mUserDateFormatShort; | 876 | dummy = prefs->mUserDateFormatShort; |
872 | mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); | 877 | mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); |
873 | 878 | ||
874 | QDate current ( 2001, 1,1); | 879 | QDate current ( 2001, 1,1); |
875 | mStartDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingStart-1)); | 880 | mStartDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingStart-1)); |
876 | mEndDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingEnd-1)); | 881 | mEndDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingEnd-1)); |
877 | setCombo(mTimeZoneCombo,i18n(prefs->mTimeZoneId)); | 882 | setCombo(mTimeZoneCombo,i18n(prefs->mTimeZoneId)); |
878 | 883 | ||
879 | mEmailClient = prefs->mEmailClient; | 884 | mEmailClient = prefs->mEmailClient; |
880 | mEmailOtherChannel = prefs->mEmailOtherChannel; | 885 | mEmailOtherChannel = prefs->mEmailOtherChannel; |
881 | mEmailOtherMessage = prefs->mEmailOtherMessage; | 886 | mEmailOtherMessage = prefs->mEmailOtherMessage; |
882 | mEmailOtherMessageParameters = prefs->mEmailOtherMessageParameters; | 887 | mEmailOtherMessageParameters = prefs->mEmailOtherMessageParameters; |
883 | mEmailOtherMessage2 = prefs->mEmailOtherMessage2; | 888 | mEmailOtherMessage2 = prefs->mEmailOtherMessage2; |
884 | mEmailOtherMessageParameters2 = prefs->mEmailOtherMessageParameters2; | 889 | mEmailOtherMessageParameters2 = prefs->mEmailOtherMessageParameters2; |
885 | 890 | ||
886 | mPhoneClient = prefs->mPhoneClient; | 891 | mPhoneClient = prefs->mPhoneClient; |
887 | mPhoneOtherChannel = prefs->mPhoneOtherChannel; | 892 | mPhoneOtherChannel = prefs->mPhoneOtherChannel; |
888 | mPhoneOtherMessage = prefs->mPhoneOtherMessage; | 893 | mPhoneOtherMessage = prefs->mPhoneOtherMessage; |
889 | mPhoneOtherMessageParameters = prefs->mPhoneOtherMessageParameters; | 894 | mPhoneOtherMessageParameters = prefs->mPhoneOtherMessageParameters; |
890 | 895 | ||
891 | mFaxClient = prefs->mFaxClient; | 896 | mFaxClient = prefs->mFaxClient; |
892 | mFaxOtherChannel = prefs->mFaxOtherChannel; | 897 | mFaxOtherChannel = prefs->mFaxOtherChannel; |
893 | mFaxOtherMessage = prefs->mFaxOtherMessage; | 898 | mFaxOtherMessage = prefs->mFaxOtherMessage; |
894 | mFaxOtherMessageParameters = prefs->mFaxOtherMessageParameters; | 899 | mFaxOtherMessageParameters = prefs->mFaxOtherMessageParameters; |
895 | 900 | ||
896 | mSMSClient = prefs->mSMSClient; | 901 | mSMSClient = prefs->mSMSClient; |
897 | mSMSOtherChannel = prefs->mSMSOtherChannel; | 902 | mSMSOtherChannel = prefs->mSMSOtherChannel; |
898 | mSMSOtherMessage = prefs->mSMSOtherMessage; | 903 | mSMSOtherMessage = prefs->mSMSOtherMessage; |
899 | mSMSOtherMessageParameters = prefs->mSMSOtherMessageParameters; | 904 | mSMSOtherMessageParameters = prefs->mSMSOtherMessageParameters; |
900 | 905 | ||
901 | mPagerClient = prefs->mPagerClient; | 906 | mPagerClient = prefs->mPagerClient; |
902 | mPagerOtherChannel = prefs->mPagerOtherChannel; | 907 | mPagerOtherChannel = prefs->mPagerOtherChannel; |
903 | mPagerOtherMessage = prefs->mPagerOtherMessage; | 908 | mPagerOtherMessage = prefs->mPagerOtherMessage; |
904 | mPagerOtherMessageParameters = prefs->mPagerOtherMessageParameters; | 909 | mPagerOtherMessageParameters = prefs->mPagerOtherMessageParameters; |
905 | 910 | ||
906 | mSipClient = prefs->mSipClient; | 911 | mSipClient = prefs->mSipClient; |
907 | mSipOtherChannel = prefs->mSipOtherChannel; | 912 | mSipOtherChannel = prefs->mSipOtherChannel; |
908 | mSipOtherMessage = prefs->mSipOtherMessage; | 913 | mSipOtherMessage = prefs->mSipOtherMessage; |
909 | mSipOtherMessageParameters = prefs->mSipOtherMessageParameters; | 914 | mSipOtherMessageParameters = prefs->mSipOtherMessageParameters; |
910 | 915 | ||
911 | mCurrentApp = ExternalAppHandler::EMAIL; | 916 | mCurrentApp = ExternalAppHandler::EMAIL; |
912 | mCurrentClient = mEmailClient; | 917 | mCurrentClient = mEmailClient; |
913 | 918 | ||
914 | updateClientWidgets(); | 919 | updateClientWidgets(); |
915 | 920 | ||
916 | blockSignals( blocked ); | 921 | blockSignals( blocked ); |
917 | 922 | ||
918 | } | 923 | } |
919 | 924 | ||
920 | void KDEPIMConfigWidget::usrWriteConfig() | 925 | void KDEPIMConfigWidget::usrWriteConfig() |
921 | { | 926 | { |
922 | KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); | 927 | KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); |
923 | 928 | ||
924 | saveEditFieldSettings(); | 929 | saveEditFieldSettings(); |
925 | 930 | ||
926 | prefs->mBackupNumbers = mBackupNumbersSpin->value(); | 931 | prefs->mBackupNumbers = mBackupNumbersSpin->value(); |
927 | prefs->mBackupDayCount = mBackupDayCountSpin->value(); | 932 | prefs->mBackupDayCount = mBackupDayCountSpin->value(); |
928 | QString bup_url = mBackupUrl->url(); | 933 | QString bup_url = mBackupUrl->url(); |
929 | if ( bup_url.right(1) != "/" && bup_url.right(1) != "\\" ) | 934 | if ( bup_url.right(1) != "/" && bup_url.right(1) != "\\" ) |
930 | bup_url += "/"; | 935 | bup_url += "/"; |
931 | 936 | ||
932 | prefs->mBackupDatadir = bup_url; | 937 | prefs->mBackupDatadir = bup_url; |
933 | 938 | ||
934 | prefs->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); | 939 | prefs->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); |
935 | prefs->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); | 940 | prefs->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); |
936 | 941 | ||
937 | prefs->mTimeZoneId = mTimeZoneCombo->currentText(); | 942 | prefs->mTimeZoneId = mTimeZoneCombo->currentText(); |
938 | QDate date; | 943 | QDate date; |
939 | date = mStartDateSavingEdit->date(); | 944 | date = mStartDateSavingEdit->date(); |
940 | int sub = 0; | 945 | int sub = 0; |
941 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 946 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
942 | sub = 1; | 947 | sub = 1; |
943 | prefs->mDaylightsavingStart = date.dayOfYear()-sub; | 948 | prefs->mDaylightsavingStart = date.dayOfYear()-sub; |
944 | date = mEndDateSavingEdit->date(); | 949 | date = mEndDateSavingEdit->date(); |
945 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 950 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
946 | sub = 1; | 951 | sub = 1; |
947 | else | 952 | else |
948 | sub = 0; | 953 | sub = 0; |
949 | prefs->mDaylightsavingEnd = date.dayOfYear()-sub; | 954 | prefs->mDaylightsavingEnd = date.dayOfYear()-sub; |
950 | 955 | ||
951 | 956 | ||
952 | prefs->mEmailClient = mEmailClient; | 957 | prefs->mEmailClient = mEmailClient; |
953 | prefs->mEmailOtherChannel = mEmailOtherChannel; | 958 | prefs->mEmailOtherChannel = mEmailOtherChannel; |
954 | prefs->mEmailOtherMessage = mEmailOtherMessage; | 959 | prefs->mEmailOtherMessage = mEmailOtherMessage; |
955 | prefs->mEmailOtherMessageParameters = mEmailOtherMessageParameters; | 960 | prefs->mEmailOtherMessageParameters = mEmailOtherMessageParameters; |
956 | prefs->mEmailOtherMessage2 = mEmailOtherMessage2; | 961 | prefs->mEmailOtherMessage2 = mEmailOtherMessage2; |
957 | prefs->mEmailOtherMessageParameters2 = mEmailOtherMessageParameters2; | 962 | prefs->mEmailOtherMessageParameters2 = mEmailOtherMessageParameters2; |
958 | 963 | ||
959 | prefs->mPhoneClient = mPhoneClient; | 964 | prefs->mPhoneClient = mPhoneClient; |
960 | prefs->mPhoneOtherChannel = mPhoneOtherChannel; | 965 | prefs->mPhoneOtherChannel = mPhoneOtherChannel; |
961 | prefs->mPhoneOtherMessage = mPhoneOtherMessage; | 966 | prefs->mPhoneOtherMessage = mPhoneOtherMessage; |
962 | prefs->mPhoneOtherMessageParameters = mPhoneOtherMessageParameters; | 967 | prefs->mPhoneOtherMessageParameters = mPhoneOtherMessageParameters; |
963 | 968 | ||
964 | prefs->mFaxClient = mFaxClient; | 969 | prefs->mFaxClient = mFaxClient; |
965 | prefs->mFaxOtherChannel = mFaxOtherChannel; | 970 | prefs->mFaxOtherChannel = mFaxOtherChannel; |
966 | prefs->mFaxOtherMessage = mFaxOtherMessage; | 971 | prefs->mFaxOtherMessage = mFaxOtherMessage; |
967 | prefs->mFaxOtherMessageParameters = mFaxOtherMessageParameters; | 972 | prefs->mFaxOtherMessageParameters = mFaxOtherMessageParameters; |
968 | 973 | ||
969 | prefs->mSMSClient = mSMSClient; | 974 | prefs->mSMSClient = mSMSClient; |
970 | prefs->mSMSOtherChannel = mSMSOtherChannel; | 975 | prefs->mSMSOtherChannel = mSMSOtherChannel; |
971 | prefs->mSMSOtherMessage = mSMSOtherMessage; | 976 | prefs->mSMSOtherMessage = mSMSOtherMessage; |
972 | prefs->mSMSOtherMessageParameters = mSMSOtherMessageParameters; | 977 | prefs->mSMSOtherMessageParameters = mSMSOtherMessageParameters; |
973 | 978 | ||
974 | prefs->mPagerClient = mPagerClient; | 979 | prefs->mPagerClient = mPagerClient; |
975 | prefs->mPagerOtherChannel = mPagerOtherChannel; | 980 | prefs->mPagerOtherChannel = mPagerOtherChannel; |
976 | prefs->mPagerOtherMessage = mPagerOtherMessage; | 981 | prefs->mPagerOtherMessage = mPagerOtherMessage; |
977 | prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters; | 982 | prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters; |
978 | 983 | ||
979 | 984 | ||
980 | prefs->mSipClient = mSipClient; | 985 | prefs->mSipClient = mSipClient; |
981 | prefs->mSipOtherChannel = mSipOtherChannel; | 986 | prefs->mSipOtherChannel = mSipOtherChannel; |
982 | prefs->mSipOtherMessage = mSipOtherMessage; | 987 | prefs->mSipOtherMessage = mSipOtherMessage; |
983 | prefs->mSipOtherMessageParameters = mSipOtherMessageParameters; | 988 | prefs->mSipOtherMessageParameters = mSipOtherMessageParameters; |
984 | 989 | ||
985 | //release the cache that other views can access the changed values instantanious | 990 | //release the cache that other views can access the changed values instantanious |
986 | ExternalAppHandler::instance()->loadConfig(); | 991 | ExternalAppHandler::instance()->loadConfig(); |
987 | KPimGlobalPrefs::instance()->setGlobalConfig(); | 992 | KPimGlobalPrefs::instance()->setGlobalConfig(); |
988 | } | 993 | } |
989 | 994 | ||
990 | 995 | ||
991 | void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text, | 996 | void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text, |
992 | const QStringList *tags) | 997 | const QStringList *tags) |
993 | { | 998 | { |
994 | if (tags) { | 999 | if (tags) { |
995 | int i = tags->findIndex(text); | 1000 | int i = tags->findIndex(text); |
996 | if (i > 0) combo->setCurrentItem(i); | 1001 | if (i > 0) combo->setCurrentItem(i); |
997 | } else { | 1002 | } else { |
998 | for(int i=0;i<combo->count();++i) { | 1003 | for(int i=0;i<combo->count();++i) { |
999 | if (combo->text(i) == text) { | 1004 | if (combo->text(i) == text) { |
1000 | combo->setCurrentItem(i); | 1005 | combo->setCurrentItem(i); |
1001 | break; | 1006 | break; |
1002 | } | 1007 | } |
1003 | } | 1008 | } |
1004 | } | 1009 | } |
1005 | } | 1010 | } |
1006 | 1011 | ||
1007 | 1012 | ||
1008 | void KDEPIMConfigWidget::textChanged( const QString& text ) | 1013 | void KDEPIMConfigWidget::textChanged( const QString& text ) |
1009 | { | 1014 | { |
1010 | emit changed( true ); | 1015 | emit changed( true ); |
1011 | } | 1016 | } |
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.h b/libkdepim/kcmconfigs/kdepimconfigwidget.h index 824ef79..d693015 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.h +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.h | |||
@@ -1,163 +1,165 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KDEPim/Pi. | 2 | This file is part of KDEPim/Pi. |
3 | Copyright (c) 2004 Ulf Schenk | 3 | Copyright (c) 2004 Ulf Schenk |
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 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef KDEPIMCONFIGWIDGET_H | 31 | #ifndef KDEPIMCONFIGWIDGET_H |
32 | #define KDEPIMCONFIGWIDGET_H | 32 | #define KDEPIMCONFIGWIDGET_H |
33 | 33 | ||
34 | #include <kprefswidget.h> | 34 | #include <kprefswidget.h> |
35 | #include <kio/kfile/kurlrequester.h> | 35 | #include <kio/kfile/kurlrequester.h> |
36 | #include <qmap.h> | 36 | #include <qmap.h> |
37 | //Added by qt3to4: | ||
38 | #include <QLabel> | ||
37 | 39 | ||
38 | #include "externalapphandler.h" | 40 | #include "externalapphandler.h" |
39 | 41 | ||
40 | 42 | ||
41 | class QComboBox; | 43 | class QComboBox; |
42 | class QLineEdit; | 44 | class QLineEdit; |
43 | class KPimGlobalPrefs; | 45 | class KPimGlobalPrefs; |
44 | class QGroupBox; | 46 | class Q3GroupBox; |
45 | class QTabWidget; | 47 | class QTabWidget; |
46 | class KDateEdit; | 48 | class KDateEdit; |
47 | 49 | ||
48 | class KDEPIMConfigWidget : public KPrefsWidget | 50 | class KDEPIMConfigWidget : public KPrefsWidget |
49 | { | 51 | { |
50 | Q_OBJECT | 52 | Q_OBJECT |
51 | 53 | ||
52 | public: | 54 | public: |
53 | KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name = 0 ); | 55 | KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name = 0 ); |
54 | 56 | ||
55 | public slots: | 57 | public slots: |
56 | void textChanged( const QString& text ); | 58 | void textChanged( const QString& text ); |
57 | void showTimeZoneTab(); | 59 | void showTimeZoneTab(); |
58 | 60 | ||
59 | protected: | 61 | protected: |
60 | /** Implement this to read custom configuration widgets. */ | 62 | /** Implement this to read custom configuration widgets. */ |
61 | virtual void usrReadConfig(); | 63 | virtual void usrReadConfig(); |
62 | /** Implement this to write custom configuration widgets. */ | 64 | /** Implement this to write custom configuration widgets. */ |
63 | virtual void usrWriteConfig(); | 65 | virtual void usrWriteConfig(); |
64 | 66 | ||
65 | 67 | ||
66 | private slots: | 68 | private slots: |
67 | // void configureExtension(); | 69 | // void configureExtension(); |
68 | // void selectionChanged( QListViewItem* ); | 70 | // void selectionChanged( QListViewItem* ); |
69 | // void itemClicked( QListViewItem* ); | 71 | // void itemClicked( QListViewItem* ); |
70 | void client_changed( int newClient ); | 72 | void client_changed( int newClient ); |
71 | void externalapp_changed( int newApp ); | 73 | void externalapp_changed( int newApp ); |
72 | void saveStoreSettings(); | 74 | void saveStoreSettings(); |
73 | void setStandardStore(); | 75 | void setStandardStore(); |
74 | void setLocalStore(); | 76 | void setLocalStore(); |
75 | 77 | ||
76 | private: | 78 | private: |
77 | void setupExternalAppTab(); | 79 | void setupExternalAppTab(); |
78 | void setupLocaleDateTab(); | 80 | void setupLocaleDateTab(); |
79 | void setupLocaleTab(); | 81 | void setupLocaleTab(); |
80 | void setupTimeZoneTab(); | 82 | void setupTimeZoneTab(); |
81 | void setupStoreTab(); | 83 | void setupStoreTab(); |
82 | void setupBackupTab(); | 84 | void setupBackupTab(); |
83 | KURLRequester* mStoreUrl; | 85 | KURLRequester* mStoreUrl; |
84 | 86 | ||
85 | void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0); | 87 | void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0); |
86 | 88 | ||
87 | 89 | ||
88 | void saveEditFieldSettings(); | 90 | void saveEditFieldSettings(); |
89 | void updateClientWidgets(); | 91 | void updateClientWidgets(); |
90 | 92 | ||
91 | QTabWidget *tabWidget; | 93 | QTabWidget *tabWidget; |
92 | 94 | ||
93 | 95 | ||
94 | QLineEdit* mUserDateFormatShort; | 96 | QLineEdit* mUserDateFormatShort; |
95 | QLineEdit* mUserDateFormatLong; | 97 | QLineEdit* mUserDateFormatLong; |
96 | QComboBox* mTimeZoneCombo; | 98 | QComboBox* mTimeZoneCombo; |
97 | KDateEdit* mStartDateSavingEdit; | 99 | KDateEdit* mStartDateSavingEdit; |
98 | KDateEdit* mEndDateSavingEdit; | 100 | KDateEdit* mEndDateSavingEdit; |
99 | 101 | ||
100 | // void restoreExtensionSettings(); | 102 | // void restoreExtensionSettings(); |
101 | // void saveExtensionSettings(); | 103 | // void saveExtensionSettings(); |
102 | 104 | ||
103 | // KListView *mExtensionView; | 105 | // KListView *mExtensionView; |
104 | 106 | ||
105 | // QCheckBox *mNameParsing; | 107 | // QCheckBox *mNameParsing; |
106 | // QCheckBox *mViewsSingleClickBox; | 108 | // QCheckBox *mViewsSingleClickBox; |
107 | // QPushButton *mConfigureButton; | 109 | // QPushButton *mConfigureButton; |
108 | QComboBox* mExternalApps; | 110 | QComboBox* mExternalApps; |
109 | QGroupBox* mExternalAppGroupBox; | 111 | Q3GroupBox* mExternalAppGroupBox; |
110 | 112 | ||
111 | 113 | ||
112 | QComboBox* mClient; | 114 | QComboBox* mClient; |
113 | QLineEdit* mChannel; | 115 | QLineEdit* mChannel; |
114 | QLineEdit* mMessage; | 116 | QLineEdit* mMessage; |
115 | QLineEdit* mParameters; | 117 | QLineEdit* mParameters; |
116 | QLineEdit* mMessage2; | 118 | QLineEdit* mMessage2; |
117 | QLineEdit* mParameters2; | 119 | QLineEdit* mParameters2; |
118 | 120 | ||
119 | ExternalAppHandler::Types mCurrentApp; | 121 | ExternalAppHandler::Types mCurrentApp; |
120 | int mCurrentClient; | 122 | int mCurrentClient; |
121 | 123 | ||
122 | 124 | ||
123 | int mEmailClient; | 125 | int mEmailClient; |
124 | QString mEmailOtherChannel; | 126 | QString mEmailOtherChannel; |
125 | QString mEmailOtherMessage; | 127 | QString mEmailOtherMessage; |
126 | QString mEmailOtherMessageParameters; | 128 | QString mEmailOtherMessageParameters; |
127 | QString mEmailOtherMessage2; | 129 | QString mEmailOtherMessage2; |
128 | QString mEmailOtherMessageParameters2; | 130 | QString mEmailOtherMessageParameters2; |
129 | 131 | ||
130 | int mPhoneClient; | 132 | int mPhoneClient; |
131 | QString mPhoneOtherChannel; | 133 | QString mPhoneOtherChannel; |
132 | QString mPhoneOtherMessage; | 134 | QString mPhoneOtherMessage; |
133 | QString mPhoneOtherMessageParameters; | 135 | QString mPhoneOtherMessageParameters; |
134 | 136 | ||
135 | int mFaxClient; | 137 | int mFaxClient; |
136 | QString mFaxOtherChannel; | 138 | QString mFaxOtherChannel; |
137 | QString mFaxOtherMessage; | 139 | QString mFaxOtherMessage; |
138 | QString mFaxOtherMessageParameters; | 140 | QString mFaxOtherMessageParameters; |
139 | 141 | ||
140 | int mSMSClient; | 142 | int mSMSClient; |
141 | QString mSMSOtherChannel; | 143 | QString mSMSOtherChannel; |
142 | QString mSMSOtherMessage; | 144 | QString mSMSOtherMessage; |
143 | QString mSMSOtherMessageParameters; | 145 | QString mSMSOtherMessageParameters; |
144 | 146 | ||
145 | int mPagerClient; | 147 | int mPagerClient; |
146 | QString mPagerOtherChannel; | 148 | QString mPagerOtherChannel; |
147 | QString mPagerOtherMessage; | 149 | QString mPagerOtherMessage; |
148 | QString mPagerOtherMessageParameters; | 150 | QString mPagerOtherMessageParameters; |
149 | 151 | ||
150 | int mSipClient; | 152 | int mSipClient; |
151 | QString mSipOtherChannel; | 153 | QString mSipOtherChannel; |
152 | QString mSipOtherMessage; | 154 | QString mSipOtherMessage; |
153 | QString mSipOtherMessageParameters; | 155 | QString mSipOtherMessageParameters; |
154 | 156 | ||
155 | QLabel* mDataStoragePath; | 157 | QLabel* mDataStoragePath; |
156 | KURLRequester* mBackupUrl; | 158 | KURLRequester* mBackupUrl; |
157 | QSpinBox* mBackupDayCountSpin, *mBackupNumbersSpin ; | 159 | QSpinBox* mBackupDayCountSpin, *mBackupNumbersSpin ; |
158 | QMap<ExternalAppHandler::Types, QString> mExternalAppsMap; | 160 | QMap<ExternalAppHandler::Types, QString> mExternalAppsMap; |
159 | 161 | ||
160 | // AddresseeWidget *mAddresseeWidget; | 162 | // AddresseeWidget *mAddresseeWidget; |
161 | }; | 163 | }; |
162 | 164 | ||
163 | #endif | 165 | #endif |