summaryrefslogtreecommitdiffabout
path: root/libkdepim/kcmconfigs
authorzautrix <zautrix>2004-09-22 04:05:36 (UTC)
committer zautrix <zautrix>2004-09-22 04:05:36 (UTC)
commita56783aace3496c8b40008d0dec4c42437165e54 (patch) (unidiff)
tree7c3c070c3346d67356508d586327212d97b457cb /libkdepim/kcmconfigs
parentd63eac7a612a9724705bc58ad98c65c6ac052d07 (diff)
downloadkdepimpi-a56783aace3496c8b40008d0dec4c42437165e54.zip
kdepimpi-a56783aace3496c8b40008d0dec4c42437165e54.tar.gz
kdepimpi-a56783aace3496c8b40008d0dec4c42437165e54.tar.bz2
Fix for startup question for timezone
Diffstat (limited to 'libkdepim/kcmconfigs') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp5
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index 2819ab1..073ab74 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -1,771 +1,774 @@
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/*
25Enhanced Version of the file for platform independent KDE tools. 25Enhanced Version of the file for platform independent KDE tools.
26Copyright (c) 2004 Ulf Schenk 26Copyright (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 <qgroupbox.h>
35#include <qlabel.h> 35#include <qlabel.h>
36#include <qlineedit.h> 36#include <qlineedit.h>
37#include <qbuttongroup.h> 37#include <qbuttongroup.h>
38#include <qfile.h> 38#include <qfile.h>
39 39
40#include <kdialog.h> 40#include <kdialog.h>
41#include <klocale.h> 41#include <klocale.h>
42#include <kdateedit.h> 42#include <kdateedit.h>
43#include <kglobal.h> 43#include <kglobal.h>
44#include <stdlib.h> 44#include <stdlib.h>
45 45
46/*US 46/*US
47#include <qcheckbox.h> 47#include <qcheckbox.h>
48#include <qframe.h> 48#include <qframe.h>
49#include <qpushbutton.h> 49#include <qpushbutton.h>
50#include <qcombobox.h> 50#include <qcombobox.h>
51#include <qlineedit.h> 51#include <qlineedit.h>
52#include <qlabel.h> 52#include <qlabel.h>
53#include <qfile.h> 53#include <qfile.h>
54 54
55#include <kconfig.h> 55#include <kconfig.h>
56#include <kdebug.h> 56#include <kdebug.h>
57#include <kdialog.h> 57#include <kdialog.h>
58#include <klistview.h> 58#include <klistview.h>
59#include <klocale.h> 59#include <klocale.h>
60#include <kglobal.h> 60#include <kglobal.h>
61#include <kmessagebox.h> 61#include <kmessagebox.h>
62#include <kstandarddirs.h> 62#include <kstandarddirs.h>
63 63
64#ifndef KAB_EMBEDDED 64#ifndef KAB_EMBEDDED
65#include <ktrader.h> 65#include <ktrader.h>
66#else // KAB_EMBEDDED 66#else // KAB_EMBEDDED
67#include <mergewidget.h> 67#include <mergewidget.h>
68#include <distributionlistwidget.h> 68#include <distributionlistwidget.h>
69#endif // KAB_EMBEDDED 69#endif // KAB_EMBEDDED
70 70
71#include "addresseewidget.h" 71#include "addresseewidget.h"
72#include "extensionconfigdialog.h" 72#include "extensionconfigdialog.h"
73#include "extensionwidget.h" 73#include "extensionwidget.h"
74*/ 74*/
75 75
76#include "qapplication.h" 76#include "qapplication.h"
77 77
78#include "kpimglobalprefs.h" 78#include "kpimglobalprefs.h"
79 79
80#include "kdepimconfigwidget.h" 80#include "kdepimconfigwidget.h"
81 81
82 82
83KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name ) 83KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name )
84 : KPrefsWidget(prefs, parent, name ) 84 : KPrefsWidget(prefs, parent, name )
85{ 85{
86 mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email")); 86 mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email"));
87 mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone")); 87 mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone"));
88 mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS")); 88 mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS"));
89 mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax")); 89 mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax"));
90 mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); 90 mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager"));
91 mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); 91 mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP"));
92 92
93 93
94 QVBoxLayout *topLayout = new QVBoxLayout( this, 0, 94 QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
95 KDialog::spacingHint() ); 95 KDialog::spacingHint() );
96 96
97 tabWidget = new QTabWidget( this ); 97 tabWidget = new QTabWidget( this );
98 topLayout->addWidget( tabWidget ); 98 topLayout->addWidget( tabWidget );
99 99
100 100
101 setupLocaleTab(); 101 setupLocaleTab();
102 setupLocaleDateTab(); 102 setupLocaleDateTab();
103 setupTimeZoneTab(); 103 setupTimeZoneTab();
104 setupExternalAppTab(); 104 setupExternalAppTab();
105 105
106} 106}
107 107void KDEPIMConfigWidget::showTimeZoneTab()
108{
109 tabWidget->setCurrentPage ( 2 ) ;
110}
108void KDEPIMConfigWidget::setupExternalAppTab() 111void KDEPIMConfigWidget::setupExternalAppTab()
109{ 112{
110 QWidget *externalAppsPage = new QWidget( this ); 113 QWidget *externalAppsPage = new QWidget( this );
111 QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), 114 QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(),
112 KDialog::spacingHintSmall() ); 115 KDialog::spacingHintSmall() );
113 116
114 mExternalApps = new QComboBox( externalAppsPage ); 117 mExternalApps = new QComboBox( externalAppsPage );
115 118
116 QMap<ExternalAppHandler::Types, QString>::Iterator it; 119 QMap<ExternalAppHandler::Types, QString>::Iterator it;
117 for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) 120 for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it )
118 mExternalApps->insertItem( it.data(), it.key() ); 121 mExternalApps->insertItem( it.data(), it.key() );
119 122
120 layout->addWidget( mExternalApps ); 123 layout->addWidget( mExternalApps );
121 124
122 connect( mExternalApps, SIGNAL( activated( int ) ), 125 connect( mExternalApps, SIGNAL( activated( int ) ),
123 this, SLOT (externalapp_changed( int ) ) ); 126 this, SLOT (externalapp_changed( int ) ) );
124 127
125 128
126 mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); 129 mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage );
127 QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); 130 QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" );
128 131
129 132
130 mClient = new QComboBox( mExternalAppGroupBox ); 133 mClient = new QComboBox( mExternalAppGroupBox );
131 boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); 134 boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 );
132 135
133 connect( mClient, SIGNAL( activated( int ) ), 136 connect( mClient, SIGNAL( activated( int ) ),
134 this, SLOT (client_changed( int ) ) ); 137 this, SLOT (client_changed( int ) ) );
135 138
136 QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox); 139 QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox);
137 boxLayout->addWidget( lab, 1, 0 ); 140 boxLayout->addWidget( lab, 1, 0 );
138 mChannel = new QLineEdit(mExternalAppGroupBox); 141 mChannel = new QLineEdit(mExternalAppGroupBox);
139 mChannel->setReadOnly(true); 142 mChannel->setReadOnly(true);
140 boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 ); 143 boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 );
141 144
142 lab = new QLabel( i18n("Message:"), mExternalAppGroupBox); 145 lab = new QLabel( i18n("Message:"), mExternalAppGroupBox);
143 boxLayout->addWidget( lab, 3, 0 ); 146 boxLayout->addWidget( lab, 3, 0 );
144 mMessage = new QLineEdit(mExternalAppGroupBox); 147 mMessage = new QLineEdit(mExternalAppGroupBox);
145 mMessage->setReadOnly(true); 148 mMessage->setReadOnly(true);
146 boxLayout->addWidget( mMessage , 4, 0); 149 boxLayout->addWidget( mMessage , 4, 0);
147 150
148 lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox); 151 lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox);
149 boxLayout->addWidget( lab, 3, 1 ); 152 boxLayout->addWidget( lab, 3, 1 );
150 mParameters = new QLineEdit(mExternalAppGroupBox); 153 mParameters = new QLineEdit(mExternalAppGroupBox);
151 mParameters->setReadOnly(true); 154 mParameters->setReadOnly(true);
152 boxLayout->addWidget( mParameters, 4, 1 ); 155 boxLayout->addWidget( mParameters, 4, 1 );
153 156
154 lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); 157 lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox);
155 boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); 158 boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 );
156 159
157 lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); 160 lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox);
158 boxLayout->addWidget( lab, 6, 0 ); 161 boxLayout->addWidget( lab, 6, 0 );
159 mMessage2 = new QLineEdit(mExternalAppGroupBox); 162 mMessage2 = new QLineEdit(mExternalAppGroupBox);
160 mMessage2->setReadOnly(true); 163 mMessage2->setReadOnly(true);
161 boxLayout->addWidget( mMessage2 , 7, 0); 164 boxLayout->addWidget( mMessage2 , 7, 0);
162 165
163 lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); 166 lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox);
164 boxLayout->addWidget( lab, 6, 1 ); 167 boxLayout->addWidget( lab, 6, 1 );
165 mParameters2 = new QLineEdit(mExternalAppGroupBox); 168 mParameters2 = new QLineEdit(mExternalAppGroupBox);
166 mParameters2->setReadOnly(true); 169 mParameters2->setReadOnly(true);
167 boxLayout->addWidget( mParameters2, 7, 1 ); 170 boxLayout->addWidget( mParameters2, 7, 1 );
168 171
169 lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); 172 lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox);
170 boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); 173 boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 );
171 174
172 175
173 connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 176 connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
174 connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 177 connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
175 connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 178 connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
176 connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 179 connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
177 connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 180 connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
178 181
179 182
180 layout->addWidget( mExternalAppGroupBox ); 183 layout->addWidget( mExternalAppGroupBox );
181 tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) ); 184 tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) );
182 185
183} 186}
184 187
185 188
186void KDEPIMConfigWidget::setupLocaleDateTab() 189void KDEPIMConfigWidget::setupLocaleDateTab()
187{ 190{
188 QWidget *topFrame = new QWidget( this ); 191 QWidget *topFrame = new QWidget( this );
189 QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); 192 QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2);
190 193
191 topLayout->setSpacing(KDialog::spacingHint()); 194 topLayout->setSpacing(KDialog::spacingHint());
192 topLayout->setMargin(KDialog::marginHint()); 195 topLayout->setMargin(KDialog::marginHint());
193 int iii = 0; 196 int iii = 0;
194 197
195 198
196 KPrefsWidRadios *syncPrefsGroup = 199 KPrefsWidRadios *syncPrefsGroup =
197 addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame); 200 addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame);
198 QString format; 201 QString format;
199 if ( QApplication::desktop()->width() < 480 ) 202 if ( QApplication::desktop()->width() < 480 )
200 format = "(%d.%m.%Y)"; 203 format = "(%d.%m.%Y)";
201 else 204 else
202 format = "(%d.%m.%Y|%A %d %B %Y)"; 205 format = "(%d.%m.%Y|%A %d %B %Y)";
203 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); 206 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
204 if ( QApplication::desktop()->width() < 480 ) 207 if ( QApplication::desktop()->width() < 480 )
205 format = "(%m.%d.%Y)"; 208 format = "(%m.%d.%Y)";
206 else 209 else
207 format = "(%m.%d.%Y|%A %B %d %Y)"; 210 format = "(%m.%d.%Y|%A %B %d %Y)";
208 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); 211 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format));
209 if ( QApplication::desktop()->width() < 480 ) 212 if ( QApplication::desktop()->width() < 480 )
210 format = "(%Y-%m-%d)"; 213 format = "(%Y-%m-%d)";
211 else 214 else
212 format = "(%Y-%m-%d|%A %Y %B %d)"; 215 format = "(%Y-%m-%d|%A %Y %B %d)";
213 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); 216 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format));
214 syncPrefsGroup->addRadio(i18n("User defined")); 217 syncPrefsGroup->addRadio(i18n("User defined"));
215 topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); 218 topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1);
216 ++iii; 219 ++iii;
217 ++iii; 220 ++iii;
218 QLabel * lab; 221 QLabel * lab;
219 mUserDateFormatLong = new QLineEdit(topFrame); 222 mUserDateFormatLong = new QLineEdit(topFrame);
220 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); 223 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame);
221 topLayout->addWidget(lab ,iii,0); 224 topLayout->addWidget(lab ,iii,0);
222 topLayout->addWidget(mUserDateFormatLong,iii,1); 225 topLayout->addWidget(mUserDateFormatLong,iii,1);
223 ++iii; 226 ++iii;
224 mUserDateFormatShort = new QLineEdit(topFrame); 227 mUserDateFormatShort = new QLineEdit(topFrame);
225 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); 228 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame);
226 topLayout->addWidget(lab ,iii,0); 229 topLayout->addWidget(lab ,iii,0);
227 topLayout->addWidget(mUserDateFormatShort,iii,1); 230 topLayout->addWidget(mUserDateFormatShort,iii,1);
228 ++iii; 231 ++iii;
229 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); 232 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame);
230 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 233 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
231 ++iii; 234 ++iii;
232 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); 235 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame);
233 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 236 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
234 ++iii; 237 ++iii;
235 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); 238 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame);
236 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 239 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
237 ++iii; 240 ++iii;
238 241
239 connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 242 connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
240 connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 243 connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
241 244
242 245
243 tabWidget->addTab( topFrame, i18n( "Date Format" ) ); 246 tabWidget->addTab( topFrame, i18n( "Date Format" ) );
244} 247}
245 248
246void KDEPIMConfigWidget::setupLocaleTab() 249void KDEPIMConfigWidget::setupLocaleTab()
247{ 250{
248 251
249 QWidget *topFrame = new QWidget( this ); 252 QWidget *topFrame = new QWidget( this );
250 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 253 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
251 254
252 topLayout->setSpacing(KDialog::spacingHint()); 255 topLayout->setSpacing(KDialog::spacingHint());
253 topLayout->setMargin(KDialog::marginHint()); 256 topLayout->setMargin(KDialog::marginHint());
254 int iii = 0; 257 int iii = 0;
255 KPrefsWidRadios *syncPrefsGroup = 258 KPrefsWidRadios *syncPrefsGroup =
256 addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame); 259 addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame);
257 syncPrefsGroup->addRadio(i18n("English")); 260 syncPrefsGroup->addRadio(i18n("English"));
258 syncPrefsGroup->addRadio(i18n("German")); 261 syncPrefsGroup->addRadio(i18n("German"));
259 syncPrefsGroup->addRadio(i18n("French")); 262 syncPrefsGroup->addRadio(i18n("French"));
260 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); 263 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)"));
261 if ( QApplication::desktop()->width() < 300 ) 264 if ( QApplication::desktop()->width() < 300 )
262 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 265 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
263 topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); 266 topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1);
264 ++iii; 267 ++iii;
265 268
266 syncPrefsGroup = 269 syncPrefsGroup =
267 addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame); 270 addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame);
268 if ( QApplication::desktop()->width() > 300 ) 271 if ( QApplication::desktop()->width() > 300 )
269 syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); 272 syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical);
270 syncPrefsGroup->addRadio(i18n("24:00")); 273 syncPrefsGroup->addRadio(i18n("24:00"));
271 syncPrefsGroup->addRadio(i18n("12:00am")); 274 syncPrefsGroup->addRadio(i18n("12:00am"));
272 syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); 275 syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical);
273 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 276 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
274 ++iii; 277 ++iii;
275 278
276 KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"), 279 KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"),
277 &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame); 280 &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame);
278 topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); 281 topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1);
279 ++iii; 282 ++iii;
280 283
281 284
282 tabWidget->addTab( topFrame, i18n( "Locale" ) ); 285 tabWidget->addTab( topFrame, i18n( "Locale" ) );
283 286
284} 287}
285 288
286 289
287void KDEPIMConfigWidget::setupTimeZoneTab() 290void KDEPIMConfigWidget::setupTimeZoneTab()
288{ 291{
289 QWidget *topFrame = new QWidget( this ); 292 QWidget *topFrame = new QWidget( this );
290 QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2); 293 QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2);
291 topLayout->setSpacing(KDialog::spacingHint()); 294 topLayout->setSpacing(KDialog::spacingHint());
292 topLayout->setMargin(KDialog::marginHint()); 295 topLayout->setMargin(KDialog::marginHint());
293 296
294 QHBox *timeZoneBox = new QHBox( topFrame ); 297 QHBox *timeZoneBox = new QHBox( topFrame );
295 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); 298 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
296 299
297 new QLabel( i18n("Timezone:"), timeZoneBox ); 300 new QLabel( i18n("Timezone:"), timeZoneBox );
298 mTimeZoneCombo = new QComboBox( timeZoneBox ); 301 mTimeZoneCombo = new QComboBox( timeZoneBox );
299 if ( QApplication::desktop()->width() < 300 ) { 302 if ( QApplication::desktop()->width() < 300 ) {
300 mTimeZoneCombo->setMaximumWidth(150); 303 mTimeZoneCombo->setMaximumWidth(150);
301 } 304 }
302 305
303 QStringList list; 306 QStringList list;
304 list = KGlobal::locale()->timeZoneList(); 307 list = KGlobal::locale()->timeZoneList();
305 mTimeZoneCombo->insertStringList(list); 308 mTimeZoneCombo->insertStringList(list);
306 309
307 // find the currently set time zone and select it 310 // find the currently set time zone and select it
308 QString sCurrentlySet = KPimGlobalPrefs::instance()->mTimeZoneId; 311 QString sCurrentlySet = KPimGlobalPrefs::instance()->mTimeZoneId;
309 int nCurrentlySet = 11; 312 int nCurrentlySet = 11;
310 for (int i = 0; i < mTimeZoneCombo->count(); i++) 313 for (int i = 0; i < mTimeZoneCombo->count(); i++)
311 { 314 {
312 if (mTimeZoneCombo->text(i) == sCurrentlySet) 315 if (mTimeZoneCombo->text(i) == sCurrentlySet)
313 { 316 {
314 nCurrentlySet = i; 317 nCurrentlySet = i;
315 break; 318 break;
316 } 319 }
317 } 320 }
318 mTimeZoneCombo->setCurrentItem(nCurrentlySet); 321 mTimeZoneCombo->setCurrentItem(nCurrentlySet);
319 int iii = 1; 322 int iii = 1;
320 KPrefsWidBool *sb = 323 KPrefsWidBool *sb =
321 addWidBool(i18n("Timezone has daylight saving"), 324 addWidBool(i18n("Timezone has daylight saving"),
322 &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); 325 &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame);
323 topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); 326 topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1);
324 ++iii; 327 ++iii;
325 QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); 328 QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame );
326 topLayout->addMultiCellWidget(lab, iii,iii,0,1); 329 topLayout->addMultiCellWidget(lab, iii,iii,0,1);
327 ++iii; 330 ++iii;
328 lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); 331 lab = new QLabel( i18n("The year in the date is ignored."), topFrame );
329 topLayout->addMultiCellWidget(lab, iii,iii,0,1); 332 topLayout->addMultiCellWidget(lab, iii,iii,0,1);
330 ++iii; 333 ++iii;
331 lab = new QLabel( i18n("Daylight start:"), topFrame ); 334 lab = new QLabel( i18n("Daylight start:"), topFrame );
332 topLayout->addWidget(lab, iii,0); 335 topLayout->addWidget(lab, iii,0);
333 mStartDateSavingEdit = new KDateEdit(topFrame); 336 mStartDateSavingEdit = new KDateEdit(topFrame);
334 topLayout->addWidget(mStartDateSavingEdit, iii,1); 337 topLayout->addWidget(mStartDateSavingEdit, iii,1);
335 ++iii; 338 ++iii;
336 339
337 lab = new QLabel( i18n("Daylight end:"), topFrame ); 340 lab = new QLabel( i18n("Daylight end:"), topFrame );
338 topLayout->addWidget(lab, iii,0); 341 topLayout->addWidget(lab, iii,0);
339 mEndDateSavingEdit = new KDateEdit(topFrame); 342 mEndDateSavingEdit = new KDateEdit(topFrame);
340 topLayout->addWidget(mEndDateSavingEdit, iii,1); 343 topLayout->addWidget(mEndDateSavingEdit, iii,1);
341 ++iii; 344 ++iii;
342 QDate current ( 2001, 1,1); 345 QDate current ( 2001, 1,1);
343 mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1)); 346 mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1));
344 mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1)); 347 mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1));
345 348
346 connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); 349 connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) );
347 connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); 350 connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) );
348 connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) ); 351 connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) );
349 352
350 353
351 354
352 tabWidget->addTab( topFrame, i18n( "Time Zone" ) ); 355 tabWidget->addTab( topFrame, i18n( "Time Zone" ) );
353 356
354} 357}
355 358
356void KDEPIMConfigWidget::externalapp_changed( int newApp ) 359void KDEPIMConfigWidget::externalapp_changed( int newApp )
357{ 360{
358 // first store the current data 361 // first store the current data
359 saveEditFieldSettings(); 362 saveEditFieldSettings();
360 363
361 // set mCurrentApp 364 // set mCurrentApp
362 mCurrentApp = (ExternalAppHandler::Types)newApp; 365 mCurrentApp = (ExternalAppHandler::Types)newApp;
363 366
364 // set mCurrentClient 367 // set mCurrentClient
365 switch(mCurrentApp) 368 switch(mCurrentApp)
366 { 369 {
367 case(ExternalAppHandler::EMAIL): 370 case(ExternalAppHandler::EMAIL):
368 mCurrentClient = mEmailClient; 371 mCurrentClient = mEmailClient;
369 break; 372 break;
370 case(ExternalAppHandler::PHONE): 373 case(ExternalAppHandler::PHONE):
371 mCurrentClient = mPhoneClient; 374 mCurrentClient = mPhoneClient;
372 break; 375 break;
373 case(ExternalAppHandler::SMS): 376 case(ExternalAppHandler::SMS):
374 mCurrentClient = mSMSClient; 377 mCurrentClient = mSMSClient;
375 break; 378 break;
376 case(ExternalAppHandler::FAX): 379 case(ExternalAppHandler::FAX):
377 mCurrentClient = mFaxClient; 380 mCurrentClient = mFaxClient;
378 break; 381 break;
379 case(ExternalAppHandler::PAGER): 382 case(ExternalAppHandler::PAGER):
380 mCurrentClient = mPagerClient; 383 mCurrentClient = mPagerClient;
381 break; 384 break;
382 case(ExternalAppHandler::SIP): 385 case(ExternalAppHandler::SIP):
383 mCurrentClient = mSipClient; 386 mCurrentClient = mSipClient;
384 break; 387 break;
385 default: 388 default:
386 return; 389 return;
387 } 390 }
388 391
389 // and at last update the widgets 392 // and at last update the widgets
390 updateClientWidgets(); 393 updateClientWidgets();
391} 394}
392 395
393 396
394 397
395void KDEPIMConfigWidget::client_changed( int newClient ) 398void KDEPIMConfigWidget::client_changed( int newClient )
396{ 399{
397 if (newClient == mCurrentClient) 400 if (newClient == mCurrentClient)
398 return; 401 return;
399 402
400 // first store the current data 403 // first store the current data
401 saveEditFieldSettings(); 404 saveEditFieldSettings();
402 405
403 406
404 //then reset the clientvariable 407 //then reset the clientvariable
405 mCurrentClient = newClient; 408 mCurrentClient = newClient;
406 409
407 // and at last update the widgets 410 // and at last update the widgets
408 updateClientWidgets(); 411 updateClientWidgets();
409 412
410 KPrefsWidget::modified(); 413 KPrefsWidget::modified();
411} 414}
412 415
413void KDEPIMConfigWidget::saveEditFieldSettings() 416void KDEPIMConfigWidget::saveEditFieldSettings()
414{ 417{
415 418
416 switch(mCurrentApp) 419 switch(mCurrentApp)
417 { 420 {
418 case(ExternalAppHandler::EMAIL): 421 case(ExternalAppHandler::EMAIL):
419 mEmailClient = mClient->currentItem(); 422 mEmailClient = mClient->currentItem();
420 break; 423 break;
421 case(ExternalAppHandler::PHONE): 424 case(ExternalAppHandler::PHONE):
422 mPhoneClient= mClient->currentItem(); 425 mPhoneClient= mClient->currentItem();
423 break; 426 break;
424 case(ExternalAppHandler::SMS): 427 case(ExternalAppHandler::SMS):
425 mSMSClient = mClient->currentItem(); 428 mSMSClient = mClient->currentItem();
426 break; 429 break;
427 case(ExternalAppHandler::FAX): 430 case(ExternalAppHandler::FAX):
428 mFaxClient = mClient->currentItem(); 431 mFaxClient = mClient->currentItem();
429 break; 432 break;
430 case(ExternalAppHandler::PAGER): 433 case(ExternalAppHandler::PAGER):
431 mPagerClient = mClient->currentItem(); 434 mPagerClient = mClient->currentItem();
432 break; 435 break;
433 case(ExternalAppHandler::SIP): 436 case(ExternalAppHandler::SIP):
434 mSipClient = mClient->currentItem(); 437 mSipClient = mClient->currentItem();
435 break; 438 break;
436 default: 439 default:
437 return; 440 return;
438 } 441 }
439 442
440 //store the current data back to the apropriate membervariables if we had set it to "other" 443 //store the current data back to the apropriate membervariables if we had set it to "other"
441 if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) 444 if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC))
442 { 445 {
443 mEmailOtherChannel = mChannel->text(); 446 mEmailOtherChannel = mChannel->text();
444 mEmailOtherMessage = mMessage->text(); 447 mEmailOtherMessage = mMessage->text();
445 mEmailOtherMessageParameters = mParameters->text(); 448 mEmailOtherMessageParameters = mParameters->text();
446 mEmailOtherMessage2 = mMessage2->text(); 449 mEmailOtherMessage2 = mMessage2->text();
447 mEmailOtherMessageParameters2 = mParameters2->text(); 450 mEmailOtherMessageParameters2 = mParameters2->text();
448 } 451 }
449 else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) 452 else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC))
450 { 453 {
451 mPhoneOtherChannel = mChannel->text(); 454 mPhoneOtherChannel = mChannel->text();
452 mPhoneOtherMessage = mMessage->text(); 455 mPhoneOtherMessage = mMessage->text();
453 mPhoneOtherMessageParameters = mParameters->text(); 456 mPhoneOtherMessageParameters = mParameters->text();
454 } 457 }
455 else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) 458 else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC))
456 { 459 {
457 mSMSOtherChannel = mChannel->text(); 460 mSMSOtherChannel = mChannel->text();
458 mSMSOtherMessage = mMessage->text(); 461 mSMSOtherMessage = mMessage->text();
459 mSMSOtherMessageParameters = mParameters->text(); 462 mSMSOtherMessageParameters = mParameters->text();
460 } 463 }
461 else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) 464 else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC))
462 { 465 {
463 mFaxOtherChannel = mChannel->text(); 466 mFaxOtherChannel = mChannel->text();
464 mFaxOtherMessage = mMessage->text(); 467 mFaxOtherMessage = mMessage->text();
465 mFaxOtherMessageParameters = mParameters->text(); 468 mFaxOtherMessageParameters = mParameters->text();
466 } 469 }
467 else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) 470 else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC))
468 { 471 {
469 mPagerOtherChannel = mChannel->text(); 472 mPagerOtherChannel = mChannel->text();
470 mPagerOtherMessage = mMessage->text(); 473 mPagerOtherMessage = mMessage->text();
471 mPagerOtherMessageParameters = mParameters->text(); 474 mPagerOtherMessageParameters = mParameters->text();
472 } 475 }
473 else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) 476 else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))
474 { 477 {
475 mSipOtherChannel = mChannel->text(); 478 mSipOtherChannel = mChannel->text();
476 mSipOtherMessage = mMessage->text(); 479 mSipOtherMessage = mMessage->text();
477 mSipOtherMessageParameters = mParameters->text(); 480 mSipOtherMessageParameters = mParameters->text();
478 } 481 }
479 482
480 483
481} 484}
482 485
483void KDEPIMConfigWidget::updateClientWidgets() 486void KDEPIMConfigWidget::updateClientWidgets()
484{ 487{
485 bool blocked = signalsBlocked(); 488 bool blocked = signalsBlocked();
486 blockSignals( true ); 489 blockSignals( true );
487 490
488 // at this point we assume, that mCurrentApp and mCurrentClient are set to the values that we want to display 491 // at this point we assume, that mCurrentApp and mCurrentClient are set to the values that we want to display
489 QMap<ExternalAppHandler::Types, QString>::Iterator it = mExternalAppsMap.find ( mCurrentApp ); 492 QMap<ExternalAppHandler::Types, QString>::Iterator it = mExternalAppsMap.find ( mCurrentApp );
490 if (it == mExternalAppsMap.end()) 493 if (it == mExternalAppsMap.end())
491 return; 494 return;
492 495
493 // update group box 496 // update group box
494 mExternalAppGroupBox->setTitle(i18n( "Used %1 Client" ).arg(it.data())); 497 mExternalAppGroupBox->setTitle(i18n( "Used %1 Client" ).arg(it.data()));
495 498
496 //update the entries in the client combobox 499 //update the entries in the client combobox
497 mClient->clear(); 500 mClient->clear();
498 501
499 QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); 502 QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp);
500 DefaultAppItem* dai; 503 DefaultAppItem* dai;
501 for ( dai=items.first(); dai != 0; dai=items.next() ) 504 for ( dai=items.first(); dai != 0; dai=items.next() )
502 { 505 {
503 mClient->insertItem( i18n(dai->_label), dai->_id ); 506 mClient->insertItem( i18n(dai->_label), dai->_id );
504 507
505 if (dai->_id == mCurrentClient) 508 if (dai->_id == mCurrentClient)
506 { 509 {
507 //restore the edit fields with the data of the local membervariables if we had set it to "other". 510 //restore the edit fields with the data of the local membervariables if we had set it to "other".
508 //Otherwise take the default data from externalapphandler. 511 //Otherwise take the default data from externalapphandler.
509 mChannel->setText(dai->_channel); 512 mChannel->setText(dai->_channel);
510 mMessage->setText(dai->_message); 513 mMessage->setText(dai->_message);
511 mParameters->setText(dai->_parameters); 514 mParameters->setText(dai->_parameters);
512 mMessage2->setText(dai->_message2); 515 mMessage2->setText(dai->_message2);
513 mParameters2->setText(dai->_parameters2); 516 mParameters2->setText(dai->_parameters2);
514 517
515 518
516 if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) 519 if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC))
517 { 520 {
518 mChannel->setText(mEmailOtherChannel); 521 mChannel->setText(mEmailOtherChannel);
519 mMessage->setText(mEmailOtherMessage); 522 mMessage->setText(mEmailOtherMessage);
520 mParameters->setText(mEmailOtherMessageParameters); 523 mParameters->setText(mEmailOtherMessageParameters);
521 mMessage2->setText(mEmailOtherMessage2); 524 mMessage2->setText(mEmailOtherMessage2);
522 mParameters2->setText(mEmailOtherMessageParameters2); 525 mParameters2->setText(mEmailOtherMessageParameters2);
523 } 526 }
524 else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) 527 else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC))
525 { 528 {
526 mChannel->setText(mPhoneOtherChannel); 529 mChannel->setText(mPhoneOtherChannel);
527 mMessage->setText(mPhoneOtherMessage); 530 mMessage->setText(mPhoneOtherMessage);
528 mParameters->setText(mPhoneOtherMessageParameters); 531 mParameters->setText(mPhoneOtherMessageParameters);
529 } 532 }
530 else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) 533 else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC))
531 { 534 {
532 mChannel->setText(mSMSOtherChannel); 535 mChannel->setText(mSMSOtherChannel);
533 mMessage->setText(mSMSOtherMessage); 536 mMessage->setText(mSMSOtherMessage);
534 mParameters->setText(mSMSOtherMessageParameters); 537 mParameters->setText(mSMSOtherMessageParameters);
535 } 538 }
536 else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) 539 else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC))
537 { 540 {
538 mChannel->setText(mFaxOtherChannel); 541 mChannel->setText(mFaxOtherChannel);
539 mMessage->setText(mFaxOtherMessage); 542 mMessage->setText(mFaxOtherMessage);
540 mParameters->setText(mFaxOtherMessageParameters); 543 mParameters->setText(mFaxOtherMessageParameters);
541 } 544 }
542 else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) 545 else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC))
543 { 546 {
544 mChannel->setText(mPagerOtherChannel); 547 mChannel->setText(mPagerOtherChannel);
545 mMessage->setText(mPagerOtherMessage); 548 mMessage->setText(mPagerOtherMessage);
546 mParameters->setText(mPagerOtherMessageParameters); 549 mParameters->setText(mPagerOtherMessageParameters);
547 } 550 }
548 else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) 551 else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))
549 { 552 {
550 mChannel->setText(mSipOtherChannel); 553 mChannel->setText(mSipOtherChannel);
551 mMessage->setText(mSipOtherMessage); 554 mMessage->setText(mSipOtherMessage);
552 mParameters->setText(mSipOtherMessageParameters); 555 mParameters->setText(mSipOtherMessageParameters);
553 } 556 }
554 } 557 }
555 558
556 } 559 }
557 560
558 bool readonly; 561 bool readonly;
559 bool enabled; 562 bool enabled;
560 if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) 563 if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC))
561 ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) 564 ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC))
562 ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) 565 ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC))
563 ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) 566 ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC))
564 ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) 567 ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC))
565 ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))) 568 ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)))
566 { 569 {
567 readonly = false; 570 readonly = false;
568 } 571 }
569 else 572 else
570 { 573 {
571 readonly = true; 574 readonly = true;
572 } 575 }
573 576
574 if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::NONE_EMC)) 577 if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::NONE_EMC))
575 ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::NONE_PHC)) 578 ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::NONE_PHC))
576 ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::NONE_SMC)) 579 ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::NONE_SMC))
577 ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::NONE_FAC)) 580 ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::NONE_FAC))
578 ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::NONE_PAC)) 581 ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::NONE_PAC))
579 ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::NONE_SIC))) 582 ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::NONE_SIC)))
580 { 583 {
581 enabled = false; 584 enabled = false;
582 } 585 }
583 else 586 else
584 { 587 {
585 enabled = true; 588 enabled = true;
586 } 589 }
587 590
588 591
589 mChannel->setReadOnly(readonly); 592 mChannel->setReadOnly(readonly);
590 mMessage->setReadOnly(readonly); 593 mMessage->setReadOnly(readonly);
591 mParameters->setReadOnly(readonly); 594 mParameters->setReadOnly(readonly);
592 mMessage2->setReadOnly(readonly); 595 mMessage2->setReadOnly(readonly);
593 mParameters2->setReadOnly(readonly); 596 mParameters2->setReadOnly(readonly);
594 597
595 mChannel->setEnabled(enabled); 598 mChannel->setEnabled(enabled);
596 mMessage->setEnabled(enabled); 599 mMessage->setEnabled(enabled);
597 mParameters->setEnabled(enabled); 600 mParameters->setEnabled(enabled);
598 mMessage2->setEnabled(enabled); 601 mMessage2->setEnabled(enabled);
599 mParameters2->setEnabled(enabled); 602 mParameters2->setEnabled(enabled);
600 603
601 604
602 605
603 mClient->setCurrentItem(mCurrentClient); 606 mClient->setCurrentItem(mCurrentClient);
604 607
605 608
606 // enable/disable the extra message/parameter field 609 // enable/disable the extra message/parameter field
607 if (mCurrentApp == ExternalAppHandler::EMAIL) 610 if (mCurrentApp == ExternalAppHandler::EMAIL)
608 { 611 {
609 } 612 }
610 else 613 else
611 { 614 {
612 mMessage2->setText( "" ); 615 mMessage2->setText( "" );
613 mParameters2->setText( "" ); 616 mParameters2->setText( "" );
614 } 617 }
615 618
616 if (enabled == true) { 619 if (enabled == true) {
617 mMessage2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); 620 mMessage2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL);
618 mParameters2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); 621 mParameters2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL);
619 } 622 }
620 623
621 624
622 blockSignals( blocked ); 625 blockSignals( blocked );
623 626
624} 627}
625 628
626void KDEPIMConfigWidget::usrReadConfig() 629void KDEPIMConfigWidget::usrReadConfig()
627{ 630{
628 KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); 631 KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance();
629 632
630 bool blocked = signalsBlocked(); 633 bool blocked = signalsBlocked();
631 blockSignals( true ); 634 blockSignals( true );
632 635
633 QString dummy = prefs->mUserDateFormatLong; 636 QString dummy = prefs->mUserDateFormatLong;
634 mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); 637 mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") ));
635 dummy = prefs->mUserDateFormatShort; 638 dummy = prefs->mUserDateFormatShort;
636 mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); 639 mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") ));
637 640
638 QDate current ( 2001, 1,1); 641 QDate current ( 2001, 1,1);
639 mStartDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingStart-1)); 642 mStartDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingStart-1));
640 mEndDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingEnd-1)); 643 mEndDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingEnd-1));
641 setCombo(mTimeZoneCombo,i18n(prefs->mTimeZoneId)); 644 setCombo(mTimeZoneCombo,i18n(prefs->mTimeZoneId));
642 645
643 646
644 647
645 648
646 mEmailClient = prefs->mEmailClient; 649 mEmailClient = prefs->mEmailClient;
647 mEmailOtherChannel = prefs->mEmailOtherChannel; 650 mEmailOtherChannel = prefs->mEmailOtherChannel;
648 mEmailOtherMessage = prefs->mEmailOtherMessage; 651 mEmailOtherMessage = prefs->mEmailOtherMessage;
649 mEmailOtherMessageParameters = prefs->mEmailOtherMessageParameters; 652 mEmailOtherMessageParameters = prefs->mEmailOtherMessageParameters;
650 mEmailOtherMessage2 = prefs->mEmailOtherMessage2; 653 mEmailOtherMessage2 = prefs->mEmailOtherMessage2;
651 mEmailOtherMessageParameters2 = prefs->mEmailOtherMessageParameters2; 654 mEmailOtherMessageParameters2 = prefs->mEmailOtherMessageParameters2;
652 655
653 mPhoneClient = prefs->mPhoneClient; 656 mPhoneClient = prefs->mPhoneClient;
654 mPhoneOtherChannel = prefs->mPhoneOtherChannel; 657 mPhoneOtherChannel = prefs->mPhoneOtherChannel;
655 mPhoneOtherMessage = prefs->mPhoneOtherMessage; 658 mPhoneOtherMessage = prefs->mPhoneOtherMessage;
656 mPhoneOtherMessageParameters = prefs->mPhoneOtherMessageParameters; 659 mPhoneOtherMessageParameters = prefs->mPhoneOtherMessageParameters;
657 660
658 mFaxClient = prefs->mFaxClient; 661 mFaxClient = prefs->mFaxClient;
659 mFaxOtherChannel = prefs->mFaxOtherChannel; 662 mFaxOtherChannel = prefs->mFaxOtherChannel;
660 mFaxOtherMessage = prefs->mFaxOtherMessage; 663 mFaxOtherMessage = prefs->mFaxOtherMessage;
661 mFaxOtherMessageParameters = prefs->mFaxOtherMessageParameters; 664 mFaxOtherMessageParameters = prefs->mFaxOtherMessageParameters;
662 665
663 mSMSClient = prefs->mSMSClient; 666 mSMSClient = prefs->mSMSClient;
664 mSMSOtherChannel = prefs->mSMSOtherChannel; 667 mSMSOtherChannel = prefs->mSMSOtherChannel;
665 mSMSOtherMessage = prefs->mSMSOtherMessage; 668 mSMSOtherMessage = prefs->mSMSOtherMessage;
666 mSMSOtherMessageParameters = prefs->mSMSOtherMessageParameters; 669 mSMSOtherMessageParameters = prefs->mSMSOtherMessageParameters;
667 670
668 mPagerClient = prefs->mPagerClient; 671 mPagerClient = prefs->mPagerClient;
669 mPagerOtherChannel = prefs->mPagerOtherChannel; 672 mPagerOtherChannel = prefs->mPagerOtherChannel;
670 mPagerOtherMessage = prefs->mPagerOtherMessage; 673 mPagerOtherMessage = prefs->mPagerOtherMessage;
671 mPagerOtherMessageParameters = prefs->mPagerOtherMessageParameters; 674 mPagerOtherMessageParameters = prefs->mPagerOtherMessageParameters;
672 675
673 mSipClient = prefs->mPagerClient; 676 mSipClient = prefs->mPagerClient;
674 mSipOtherChannel = prefs->mSipOtherChannel; 677 mSipOtherChannel = prefs->mSipOtherChannel;
675 mSipOtherMessage = prefs->mSipOtherMessage; 678 mSipOtherMessage = prefs->mSipOtherMessage;
676 mSipOtherMessageParameters = prefs->mSipOtherMessageParameters; 679 mSipOtherMessageParameters = prefs->mSipOtherMessageParameters;
677 680
678 mCurrentApp = ExternalAppHandler::EMAIL; 681 mCurrentApp = ExternalAppHandler::EMAIL;
679 mCurrentClient = mEmailClient; 682 mCurrentClient = mEmailClient;
680 683
681 updateClientWidgets(); 684 updateClientWidgets();
682 685
683 blockSignals( blocked ); 686 blockSignals( blocked );
684 687
685} 688}
686 689
687void KDEPIMConfigWidget::usrWriteConfig() 690void KDEPIMConfigWidget::usrWriteConfig()
688{ 691{
689 KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); 692 KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance();
690 693
691 saveEditFieldSettings(); 694 saveEditFieldSettings();
692 695
693 696
694 prefs->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); 697 prefs->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") );
695 prefs->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); 698 prefs->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") );
696 699
697 prefs->mTimeZoneId = mTimeZoneCombo->currentText(); 700 prefs->mTimeZoneId = mTimeZoneCombo->currentText();
698 QDate date; 701 QDate date;
699 date = mStartDateSavingEdit->date(); 702 date = mStartDateSavingEdit->date();
700 int sub = 0; 703 int sub = 0;
701 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 704 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
702 sub = 1; 705 sub = 1;
703 prefs->mDaylightsavingStart = date.dayOfYear()-sub; 706 prefs->mDaylightsavingStart = date.dayOfYear()-sub;
704 date = mEndDateSavingEdit->date(); 707 date = mEndDateSavingEdit->date();
705 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 708 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
706 sub = 1; 709 sub = 1;
707 else 710 else
708 sub = 0; 711 sub = 0;
709 prefs->mDaylightsavingEnd = date.dayOfYear()-sub; 712 prefs->mDaylightsavingEnd = date.dayOfYear()-sub;
710 713
711 714
712 prefs->mEmailClient = mEmailClient; 715 prefs->mEmailClient = mEmailClient;
713 prefs->mEmailOtherChannel = mEmailOtherChannel; 716 prefs->mEmailOtherChannel = mEmailOtherChannel;
714 prefs->mEmailOtherMessage = mEmailOtherMessage; 717 prefs->mEmailOtherMessage = mEmailOtherMessage;
715 prefs->mEmailOtherMessageParameters = mEmailOtherMessageParameters; 718 prefs->mEmailOtherMessageParameters = mEmailOtherMessageParameters;
716 prefs->mEmailOtherMessage2 = mEmailOtherMessage2; 719 prefs->mEmailOtherMessage2 = mEmailOtherMessage2;
717 prefs->mEmailOtherMessageParameters2 = mEmailOtherMessageParameters2; 720 prefs->mEmailOtherMessageParameters2 = mEmailOtherMessageParameters2;
718 721
719 prefs->mPhoneClient = mPhoneClient; 722 prefs->mPhoneClient = mPhoneClient;
720 prefs->mPhoneOtherChannel = mPhoneOtherChannel; 723 prefs->mPhoneOtherChannel = mPhoneOtherChannel;
721 prefs->mPhoneOtherMessage = mPhoneOtherMessage; 724 prefs->mPhoneOtherMessage = mPhoneOtherMessage;
722 prefs->mPhoneOtherMessageParameters = mPhoneOtherMessageParameters; 725 prefs->mPhoneOtherMessageParameters = mPhoneOtherMessageParameters;
723 726
724 prefs->mFaxClient = mFaxClient; 727 prefs->mFaxClient = mFaxClient;
725 prefs->mFaxOtherChannel = mFaxOtherChannel; 728 prefs->mFaxOtherChannel = mFaxOtherChannel;
726 prefs->mFaxOtherMessage = mFaxOtherMessage; 729 prefs->mFaxOtherMessage = mFaxOtherMessage;
727 prefs->mFaxOtherMessageParameters = mFaxOtherMessageParameters; 730 prefs->mFaxOtherMessageParameters = mFaxOtherMessageParameters;
728 731
729 prefs->mSMSClient = mSMSClient; 732 prefs->mSMSClient = mSMSClient;
730 prefs->mSMSOtherChannel = mSMSOtherChannel; 733 prefs->mSMSOtherChannel = mSMSOtherChannel;
731 prefs->mSMSOtherMessage = mSMSOtherMessage; 734 prefs->mSMSOtherMessage = mSMSOtherMessage;
732 prefs->mSMSOtherMessageParameters = mSMSOtherMessageParameters; 735 prefs->mSMSOtherMessageParameters = mSMSOtherMessageParameters;
733 736
734 prefs->mPagerClient = mPagerClient; 737 prefs->mPagerClient = mPagerClient;
735 prefs->mPagerOtherChannel = mPagerOtherChannel; 738 prefs->mPagerOtherChannel = mPagerOtherChannel;
736 prefs->mPagerOtherMessage = mPagerOtherMessage; 739 prefs->mPagerOtherMessage = mPagerOtherMessage;
737 prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters; 740 prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters;
738 741
739 742
740 prefs->mSipClient = mSipClient; 743 prefs->mSipClient = mSipClient;
741 prefs->mSipOtherChannel = mSipOtherChannel; 744 prefs->mSipOtherChannel = mSipOtherChannel;
742 prefs->mSipOtherMessage = mSipOtherMessage; 745 prefs->mSipOtherMessage = mSipOtherMessage;
743 prefs->mSipOtherMessageParameters = mSipOtherMessageParameters; 746 prefs->mSipOtherMessageParameters = mSipOtherMessageParameters;
744 747
745 //release the cache that other views can access the changed values instantanious 748 //release the cache that other views can access the changed values instantanious
746 ExternalAppHandler::instance()->loadConfig(); 749 ExternalAppHandler::instance()->loadConfig();
747 KPimGlobalPrefs::instance()->setGlobalConfig(); 750 KPimGlobalPrefs::instance()->setGlobalConfig();
748} 751}
749 752
750 753
751void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text, 754void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text,
752 const QStringList *tags) 755 const QStringList *tags)
753{ 756{
754 if (tags) { 757 if (tags) {
755 int i = tags->findIndex(text); 758 int i = tags->findIndex(text);
756 if (i > 0) combo->setCurrentItem(i); 759 if (i > 0) combo->setCurrentItem(i);
757 } else { 760 } else {
758 for(int i=0;i<combo->count();++i) { 761 for(int i=0;i<combo->count();++i) {
759 if (combo->text(i) == text) { 762 if (combo->text(i) == text) {
760 combo->setCurrentItem(i); 763 combo->setCurrentItem(i);
761 break; 764 break;
762 } 765 }
763 } 766 }
764 } 767 }
765} 768}
766 769
767 770
768void KDEPIMConfigWidget::textChanged( const QString& text ) 771void KDEPIMConfigWidget::textChanged( const QString& text )
769{ 772{
770 emit changed( true ); 773 emit changed( true );
771} 774}
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.h b/libkdepim/kcmconfigs/kdepimconfigwidget.h
index 6f26513..619f3d7 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.h
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.h
@@ -1,154 +1,155 @@
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/*
25Enhanced Version of the file for platform independent KDE tools. 25Enhanced Version of the file for platform independent KDE tools.
26Copyright (c) 2004 Ulf Schenk 26Copyright (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 <qmap.h> 35#include <qmap.h>
36 36
37#include "externalapphandler.h" 37#include "externalapphandler.h"
38 38
39 39
40class QComboBox; 40class QComboBox;
41class QLineEdit; 41class QLineEdit;
42class KPimGlobalPrefs; 42class KPimGlobalPrefs;
43class QGroupBox; 43class QGroupBox;
44class QTabWidget; 44class QTabWidget;
45class KDateEdit; 45class KDateEdit;
46 46
47class KDEPIMConfigWidget : public KPrefsWidget 47class KDEPIMConfigWidget : public KPrefsWidget
48{ 48{
49 Q_OBJECT 49 Q_OBJECT
50 50
51 public: 51 public:
52 KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name = 0 ); 52 KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name = 0 );
53 53
54 public slots: 54 public slots:
55 void textChanged( const QString& text ); 55 void textChanged( const QString& text );
56 void showTimeZoneTab();
56 57
57 protected: 58 protected:
58 /** Implement this to read custom configuration widgets. */ 59 /** Implement this to read custom configuration widgets. */
59 virtual void usrReadConfig(); 60 virtual void usrReadConfig();
60 /** Implement this to write custom configuration widgets. */ 61 /** Implement this to write custom configuration widgets. */
61 virtual void usrWriteConfig(); 62 virtual void usrWriteConfig();
62 63
63 64
64 private slots: 65 private slots:
65// void configureExtension(); 66// void configureExtension();
66// void selectionChanged( QListViewItem* ); 67// void selectionChanged( QListViewItem* );
67// void itemClicked( QListViewItem* ); 68// void itemClicked( QListViewItem* );
68 void client_changed( int newClient ); 69 void client_changed( int newClient );
69 void externalapp_changed( int newApp ); 70 void externalapp_changed( int newApp );
70 71
71 private: 72 private:
72 void setupExternalAppTab(); 73 void setupExternalAppTab();
73 void setupLocaleDateTab(); 74 void setupLocaleDateTab();
74 void setupLocaleTab(); 75 void setupLocaleTab();
75 void setupTimeZoneTab(); 76 void setupTimeZoneTab();
76 77
77 void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0); 78 void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0);
78 79
79 80
80 void saveEditFieldSettings(); 81 void saveEditFieldSettings();
81 void updateClientWidgets(); 82 void updateClientWidgets();
82 83
83 QTabWidget *tabWidget; 84 QTabWidget *tabWidget;
84 85
85 86
86 QLineEdit* mUserDateFormatShort; 87 QLineEdit* mUserDateFormatShort;
87 QLineEdit* mUserDateFormatLong; 88 QLineEdit* mUserDateFormatLong;
88 QComboBox* mTimeZoneCombo; 89 QComboBox* mTimeZoneCombo;
89 KDateEdit* mStartDateSavingEdit; 90 KDateEdit* mStartDateSavingEdit;
90 KDateEdit* mEndDateSavingEdit; 91 KDateEdit* mEndDateSavingEdit;
91 92
92// void restoreExtensionSettings(); 93// void restoreExtensionSettings();
93// void saveExtensionSettings(); 94// void saveExtensionSettings();
94 95
95// KListView *mExtensionView; 96// KListView *mExtensionView;
96 97
97// QCheckBox *mNameParsing; 98// QCheckBox *mNameParsing;
98// QCheckBox *mViewsSingleClickBox; 99// QCheckBox *mViewsSingleClickBox;
99// QPushButton *mConfigureButton; 100// QPushButton *mConfigureButton;
100 QComboBox* mExternalApps; 101 QComboBox* mExternalApps;
101 QGroupBox* mExternalAppGroupBox; 102 QGroupBox* mExternalAppGroupBox;
102 103
103 104
104 QComboBox* mClient; 105 QComboBox* mClient;
105 QLineEdit* mChannel; 106 QLineEdit* mChannel;
106 QLineEdit* mMessage; 107 QLineEdit* mMessage;
107 QLineEdit* mParameters; 108 QLineEdit* mParameters;
108 QLineEdit* mMessage2; 109 QLineEdit* mMessage2;
109 QLineEdit* mParameters2; 110 QLineEdit* mParameters2;
110 111
111 ExternalAppHandler::Types mCurrentApp; 112 ExternalAppHandler::Types mCurrentApp;
112 int mCurrentClient; 113 int mCurrentClient;
113 114
114 115
115 int mEmailClient; 116 int mEmailClient;
116 QString mEmailOtherChannel; 117 QString mEmailOtherChannel;
117 QString mEmailOtherMessage; 118 QString mEmailOtherMessage;
118 QString mEmailOtherMessageParameters; 119 QString mEmailOtherMessageParameters;
119 QString mEmailOtherMessage2; 120 QString mEmailOtherMessage2;
120 QString mEmailOtherMessageParameters2; 121 QString mEmailOtherMessageParameters2;
121 122
122 int mPhoneClient; 123 int mPhoneClient;
123 QString mPhoneOtherChannel; 124 QString mPhoneOtherChannel;
124 QString mPhoneOtherMessage; 125 QString mPhoneOtherMessage;
125 QString mPhoneOtherMessageParameters; 126 QString mPhoneOtherMessageParameters;
126 127
127 int mFaxClient; 128 int mFaxClient;
128 QString mFaxOtherChannel; 129 QString mFaxOtherChannel;
129 QString mFaxOtherMessage; 130 QString mFaxOtherMessage;
130 QString mFaxOtherMessageParameters; 131 QString mFaxOtherMessageParameters;
131 132
132 int mSMSClient; 133 int mSMSClient;
133 QString mSMSOtherChannel; 134 QString mSMSOtherChannel;
134 QString mSMSOtherMessage; 135 QString mSMSOtherMessage;
135 QString mSMSOtherMessageParameters; 136 QString mSMSOtherMessageParameters;
136 137
137 int mPagerClient; 138 int mPagerClient;
138 QString mPagerOtherChannel; 139 QString mPagerOtherChannel;
139 QString mPagerOtherMessage; 140 QString mPagerOtherMessage;
140 QString mPagerOtherMessageParameters; 141 QString mPagerOtherMessageParameters;
141 142
142 int mSipClient; 143 int mSipClient;
143 QString mSipOtherChannel; 144 QString mSipOtherChannel;
144 QString mSipOtherMessage; 145 QString mSipOtherMessage;
145 QString mSipOtherMessageParameters; 146 QString mSipOtherMessageParameters;
146 147
147 148
148 149
149 QMap<ExternalAppHandler::Types, QString> mExternalAppsMap; 150 QMap<ExternalAppHandler::Types, QString> mExternalAppsMap;
150 151
151// AddresseeWidget *mAddresseeWidget; 152// AddresseeWidget *mAddresseeWidget;
152}; 153};
153 154
154#endif 155#endif