summaryrefslogtreecommitdiffabout
path: root/libkdepim
authorzautrix <zautrix>2005-01-18 12:06:27 (UTC)
committer zautrix <zautrix>2005-01-18 12:06:27 (UTC)
commit4b82a36d1b2479dd2e6f00aef45af848f6793099 (patch) (unidiff)
tree21e5077956085c33f57c4cb54c2b25d5d9a4dc20 /libkdepim
parentfbc1ca53388337b66017973896725d51416aae1a (diff)
downloadkdepimpi-4b82a36d1b2479dd2e6f00aef45af848f6793099.zip
kdepimpi-4b82a36d1b2479dd2e6f00aef45af848f6793099.tar.gz
kdepimpi-4b82a36d1b2479dd2e6f00aef45af848f6793099.tar.bz2
data dir
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp38
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.h5
2 files changed, 43 insertions, 0 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index 20594c6..d097078 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -1,239 +1,277 @@
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#include <qvbox.h>
40#include <qdir.h>
39#include <qregexp.h> 41#include <qregexp.h>
40 42
41#include <kdialog.h> 43#include <kdialog.h>
42#include <klocale.h> 44#include <klocale.h>
43#include <kdateedit.h> 45#include <kdateedit.h>
44#include <kglobal.h> 46#include <kglobal.h>
45#include <stdlib.h> 47#include <stdlib.h>
46 48
47/*US 49/*US
48#include <qcheckbox.h> 50#include <qcheckbox.h>
49#include <qframe.h> 51#include <qframe.h>
50#include <qpushbutton.h> 52#include <qpushbutton.h>
51#include <qcombobox.h> 53#include <qcombobox.h>
52#include <qlineedit.h> 54#include <qlineedit.h>
53#include <qlabel.h> 55#include <qlabel.h>
54#include <qfile.h> 56#include <qfile.h>
55 57
56#include <kconfig.h> 58#include <kconfig.h>
57#include <kdebug.h> 59#include <kdebug.h>
58#include <kdialog.h> 60#include <kdialog.h>
59#include <klistview.h> 61#include <klistview.h>
60#include <klocale.h> 62#include <klocale.h>
61#include <kglobal.h> 63#include <kglobal.h>
62#include <kmessagebox.h> 64#include <kmessagebox.h>
63#include <kstandarddirs.h> 65#include <kstandarddirs.h>
64 66
65#ifndef KAB_EMBEDDED 67#ifndef KAB_EMBEDDED
66#include <ktrader.h> 68#include <ktrader.h>
67#else // KAB_EMBEDDED 69#else // KAB_EMBEDDED
68#include <mergewidget.h> 70#include <mergewidget.h>
69#include <distributionlistwidget.h> 71#include <distributionlistwidget.h>
70#endif // KAB_EMBEDDED 72#endif // KAB_EMBEDDED
71 73
72#include "addresseewidget.h" 74#include "addresseewidget.h"
73#include "extensionconfigdialog.h" 75#include "extensionconfigdialog.h"
74#include "extensionwidget.h" 76#include "extensionwidget.h"
75*/ 77*/
76 78
77#include "qapplication.h" 79#include "qapplication.h"
78 80
79#include "kpimglobalprefs.h" 81#include "kpimglobalprefs.h"
80 82
81#include "kdepimconfigwidget.h" 83#include "kdepimconfigwidget.h"
82 84
83 85
84KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name ) 86KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name )
85 : KPrefsWidget(prefs, parent, name ) 87 : KPrefsWidget(prefs, parent, name )
86{ 88{
87 mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email")); 89 mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email"));
88 mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone")); 90 mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone"));
89 mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS")); 91 mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS"));
90 mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax")); 92 mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax"));
91 mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); 93 mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager"));
92 mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); 94 mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP"));
93 95
94 96
95 QVBoxLayout *topLayout = new QVBoxLayout( this, 0, 97 QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
96 KDialog::spacingHint() ); 98 KDialog::spacingHint() );
97 99
98 tabWidget = new QTabWidget( this ); 100 tabWidget = new QTabWidget( this );
99 topLayout->addWidget( tabWidget ); 101 topLayout->addWidget( tabWidget );
100 102
101 103
102 setupLocaleTab(); 104 setupLocaleTab();
103 setupLocaleDateTab(); 105 setupLocaleDateTab();
104 setupTimeZoneTab(); 106 setupTimeZoneTab();
105 setupExternalAppTab(); 107 setupExternalAppTab();
108 setupStoreTab();
106 109
107} 110}
108void KDEPIMConfigWidget::showTimeZoneTab() 111void KDEPIMConfigWidget::showTimeZoneTab()
109{ 112{
110 tabWidget->setCurrentPage ( 3 ) ; 113 tabWidget->setCurrentPage ( 3 ) ;
111} 114}
115void KDEPIMConfigWidget::setupStoreTab()
116{
117 QVBox *storePage = new QVBox( this );
118 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 );
119 new QLabel( i18n("<b>Set new data storage dir:</b>"), storePage );
120 mStoreUrl = new KURLRequester( storePage );
121 mStoreUrl->setURL( KGlobal::dirs()->localkdedir() );
122 new QLabel( i18n("Not existing dirs are created automatically"), storePage );
123 QHBox *bb = new QHBox( storePage );
124 QPushButton * pb = new QPushButton ( i18n("Save settings"), bb );
125 connect(pb, SIGNAL( clicked() ), this, SLOT ( saveStoreSettings() ) );
126 pb = new QPushButton ( i18n("Save standard"), bb );
127 connect(pb, SIGNAL( clicked() ), this, SLOT ( setStandardStore() ) );
128 new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage );
129 new QLabel( i18n("The settings of the storage\ndir is saved in the file\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage );
130 tabWidget->addTab( storePage, i18n( "Data storage path" ) );
131}
132void KDEPIMConfigWidget::setStandardStore()
133{
134 mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" );
135 saveStoreSettings();
136}
137void KDEPIMConfigWidget::saveStoreSettings()
138{
139 if ( !mStoreUrl->url().isEmpty() ) {
140 KConfig cfg ( QDir::homeDirPath() + "/.microkdehome" );
141 cfg.setGroup("Global");
142 cfg.writeEntry( "MICROKDEHOME", mStoreUrl->url() );
143 qDebug("cfg.writeEntry( MICROKDEHOME, mStoreUrl->url() ); ");
144 cfg.sync();
145 } else {
146 mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" );
147 saveStoreSettings();
148 }
149}
112void KDEPIMConfigWidget::setupExternalAppTab() 150void KDEPIMConfigWidget::setupExternalAppTab()
113{ 151{
114 QWidget *externalAppsPage = new QWidget( this ); 152 QWidget *externalAppsPage = new QWidget( this );
115 QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), 153 QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(),
116 KDialog::spacingHintSmall() ); 154 KDialog::spacingHintSmall() );
117 155
118 mExternalApps = new QComboBox( externalAppsPage ); 156 mExternalApps = new QComboBox( externalAppsPage );
119 157
120 QMap<ExternalAppHandler::Types, QString>::Iterator it; 158 QMap<ExternalAppHandler::Types, QString>::Iterator it;
121 for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) 159 for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it )
122 mExternalApps->insertItem( it.data(), it.key() ); 160 mExternalApps->insertItem( it.data(), it.key() );
123 161
124 layout->addWidget( mExternalApps ); 162 layout->addWidget( mExternalApps );
125 163
126 connect( mExternalApps, SIGNAL( activated( int ) ), 164 connect( mExternalApps, SIGNAL( activated( int ) ),
127 this, SLOT (externalapp_changed( int ) ) ); 165 this, SLOT (externalapp_changed( int ) ) );
128 166
129 167
130 mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); 168 mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage );
131 QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); 169 QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" );
132 mExternalAppGroupBox->layout()->setMargin(5); 170 mExternalAppGroupBox->layout()->setMargin(5);
133 171
134 mClient = new QComboBox( mExternalAppGroupBox ); 172 mClient = new QComboBox( mExternalAppGroupBox );
135 boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); 173 boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 );
136 174
137 connect( mClient, SIGNAL( activated( int ) ), 175 connect( mClient, SIGNAL( activated( int ) ),
138 this, SLOT (client_changed( int ) ) ); 176 this, SLOT (client_changed( int ) ) );
139 177
140 QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox); 178 QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox);
141 boxLayout->addWidget( lab, 1, 0 ); 179 boxLayout->addWidget( lab, 1, 0 );
142 mChannel = new QLineEdit(mExternalAppGroupBox); 180 mChannel = new QLineEdit(mExternalAppGroupBox);
143 mChannel->setReadOnly(true); 181 mChannel->setReadOnly(true);
144 boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 ); 182 boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 );
145 183
146 lab = new QLabel( i18n("Message:"), mExternalAppGroupBox); 184 lab = new QLabel( i18n("Message:"), mExternalAppGroupBox);
147 boxLayout->addWidget( lab, 3, 0 ); 185 boxLayout->addWidget( lab, 3, 0 );
148 mMessage = new QLineEdit(mExternalAppGroupBox); 186 mMessage = new QLineEdit(mExternalAppGroupBox);
149 mMessage->setReadOnly(true); 187 mMessage->setReadOnly(true);
150 boxLayout->addWidget( mMessage , 4, 0); 188 boxLayout->addWidget( mMessage , 4, 0);
151 189
152 lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox); 190 lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox);
153 boxLayout->addWidget( lab, 3, 1 ); 191 boxLayout->addWidget( lab, 3, 1 );
154 mParameters = new QLineEdit(mExternalAppGroupBox); 192 mParameters = new QLineEdit(mExternalAppGroupBox);
155 mParameters->setReadOnly(true); 193 mParameters->setReadOnly(true);
156 boxLayout->addWidget( mParameters, 4, 1 ); 194 boxLayout->addWidget( mParameters, 4, 1 );
157 195
158 lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); 196 lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox);
159 boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); 197 boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 );
160 198
161 199
162 lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); 200 lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox);
163 boxLayout->addWidget( lab, 6, 0 ); 201 boxLayout->addWidget( lab, 6, 0 );
164 mMessage2 = new QLineEdit(mExternalAppGroupBox); 202 mMessage2 = new QLineEdit(mExternalAppGroupBox);
165 mMessage2->setReadOnly(true); 203 mMessage2->setReadOnly(true);
166 boxLayout->addWidget( mMessage2 , 7, 0); 204 boxLayout->addWidget( mMessage2 , 7, 0);
167 205
168 lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); 206 lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox);
169 boxLayout->addWidget( lab, 6, 1 ); 207 boxLayout->addWidget( lab, 6, 1 );
170 mParameters2 = new QLineEdit(mExternalAppGroupBox); 208 mParameters2 = new QLineEdit(mExternalAppGroupBox);
171 mParameters2->setReadOnly(true); 209 mParameters2->setReadOnly(true);
172 boxLayout->addWidget( mParameters2, 7, 1 ); 210 boxLayout->addWidget( mParameters2, 7, 1 );
173 211
174 lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); 212 lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox);
175 boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); 213 boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 );
176 214
177 215
178 connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 216 connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
179 connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 217 connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
180 connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 218 connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
181 connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 219 connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
182 connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); 220 connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) );
183 221
184 222
185 layout->addWidget( mExternalAppGroupBox ); 223 layout->addWidget( mExternalAppGroupBox );
186 tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) ); 224 tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) );
187 225
188} 226}
189 227
190 228
191void KDEPIMConfigWidget::setupLocaleDateTab() 229void KDEPIMConfigWidget::setupLocaleDateTab()
192{ 230{
193 QWidget *topFrame = new QWidget( this ); 231 QWidget *topFrame = new QWidget( this );
194 QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); 232 QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2);
195 233
196 topLayout->setSpacing(KDialog::spacingHintSmall()); 234 topLayout->setSpacing(KDialog::spacingHintSmall());
197 topLayout->setMargin(KDialog::marginHintSmall()); 235 topLayout->setMargin(KDialog::marginHintSmall());
198 int iii = 0; 236 int iii = 0;
199 237
200 238
201 KPrefsWidRadios *syncPrefsGroup = 239 KPrefsWidRadios *syncPrefsGroup =
202 addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame); 240 addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame);
203 QString format; 241 QString format;
204 if ( QApplication::desktop()->width() < 480 ) 242 if ( QApplication::desktop()->width() < 480 )
205 format = "(%d.%m.%Y)"; 243 format = "(%d.%m.%Y)";
206 else 244 else
207 format = "(%d.%m.%Y|%A %d %B %Y)"; 245 format = "(%d.%m.%Y|%A %d %B %Y)";
208 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); 246 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
209 if ( QApplication::desktop()->width() < 480 ) 247 if ( QApplication::desktop()->width() < 480 )
210 format = "(%m.%d.%Y)"; 248 format = "(%m.%d.%Y)";
211 else 249 else
212 format = "(%m.%d.%Y|%A %B %d %Y)"; 250 format = "(%m.%d.%Y|%A %B %d %Y)";
213 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); 251 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format));
214 if ( QApplication::desktop()->width() < 480 ) 252 if ( QApplication::desktop()->width() < 480 )
215 format = "(%Y-%m-%d)"; 253 format = "(%Y-%m-%d)";
216 else 254 else
217 format = "(%Y-%m-%d|%A %Y %B %d)"; 255 format = "(%Y-%m-%d|%A %Y %B %d)";
218 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); 256 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format));
219 syncPrefsGroup->addRadio(i18n("User defined")); 257 syncPrefsGroup->addRadio(i18n("User defined"));
220 if ( QApplication::desktop()->width() < 480 ) { 258 if ( QApplication::desktop()->width() < 480 ) {
221 syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); 259 syncPrefsGroup->groupBox()->layout()->setMargin( 5 );
222 syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); 260 syncPrefsGroup->groupBox()->layout()->setSpacing( 0 );
223 } 261 }
224 topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); 262 topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1);
225 ++iii; 263 ++iii;
226 ++iii; 264 ++iii;
227 QLabel * lab; 265 QLabel * lab;
228 mUserDateFormatLong = new QLineEdit(topFrame); 266 mUserDateFormatLong = new QLineEdit(topFrame);
229 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); 267 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame);
230 topLayout->addWidget(lab ,iii,0); 268 topLayout->addWidget(lab ,iii,0);
231 topLayout->addWidget(mUserDateFormatLong,iii,1); 269 topLayout->addWidget(mUserDateFormatLong,iii,1);
232 ++iii; 270 ++iii;
233 mUserDateFormatShort = new QLineEdit(topFrame); 271 mUserDateFormatShort = new QLineEdit(topFrame);
234 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); 272 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame);
235 topLayout->addWidget(lab ,iii,0); 273 topLayout->addWidget(lab ,iii,0);
236 topLayout->addWidget(mUserDateFormatShort,iii,1); 274 topLayout->addWidget(mUserDateFormatShort,iii,1);
237 ++iii; 275 ++iii;
238 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); 276 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame);
239 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 277 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.h b/libkdepim/kcmconfigs/kdepimconfigwidget.h
index 619f3d7..c545207 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.h
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.h
@@ -1,155 +1,160 @@
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 <kio/kfile/kurlrequester.h>
35#include <qmap.h> 36#include <qmap.h>
36 37
37#include "externalapphandler.h" 38#include "externalapphandler.h"
38 39
39 40
40class QComboBox; 41class QComboBox;
41class QLineEdit; 42class QLineEdit;
42class KPimGlobalPrefs; 43class KPimGlobalPrefs;
43class QGroupBox; 44class QGroupBox;
44class QTabWidget; 45class QTabWidget;
45class KDateEdit; 46class KDateEdit;
46 47
47class KDEPIMConfigWidget : public KPrefsWidget 48class KDEPIMConfigWidget : public KPrefsWidget
48{ 49{
49 Q_OBJECT 50 Q_OBJECT
50 51
51 public: 52 public:
52 KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name = 0 ); 53 KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name = 0 );
53 54
54 public slots: 55 public slots:
55 void textChanged( const QString& text ); 56 void textChanged( const QString& text );
56 void showTimeZoneTab(); 57 void showTimeZoneTab();
57 58
58 protected: 59 protected:
59 /** Implement this to read custom configuration widgets. */ 60 /** Implement this to read custom configuration widgets. */
60 virtual void usrReadConfig(); 61 virtual void usrReadConfig();
61 /** Implement this to write custom configuration widgets. */ 62 /** Implement this to write custom configuration widgets. */
62 virtual void usrWriteConfig(); 63 virtual void usrWriteConfig();
63 64
64 65
65 private slots: 66 private slots:
66// void configureExtension(); 67// void configureExtension();
67// void selectionChanged( QListViewItem* ); 68// void selectionChanged( QListViewItem* );
68// void itemClicked( QListViewItem* ); 69// void itemClicked( QListViewItem* );
69 void client_changed( int newClient ); 70 void client_changed( int newClient );
70 void externalapp_changed( int newApp ); 71 void externalapp_changed( int newApp );
72 void saveStoreSettings();
73 void setStandardStore();
71 74
72 private: 75 private:
73 void setupExternalAppTab(); 76 void setupExternalAppTab();
74 void setupLocaleDateTab(); 77 void setupLocaleDateTab();
75 void setupLocaleTab(); 78 void setupLocaleTab();
76 void setupTimeZoneTab(); 79 void setupTimeZoneTab();
80 void setupStoreTab();
81 KURLRequester* mStoreUrl;
77 82
78 void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0); 83 void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0);
79 84
80 85
81 void saveEditFieldSettings(); 86 void saveEditFieldSettings();
82 void updateClientWidgets(); 87 void updateClientWidgets();
83 88
84 QTabWidget *tabWidget; 89 QTabWidget *tabWidget;
85 90
86 91
87 QLineEdit* mUserDateFormatShort; 92 QLineEdit* mUserDateFormatShort;
88 QLineEdit* mUserDateFormatLong; 93 QLineEdit* mUserDateFormatLong;
89 QComboBox* mTimeZoneCombo; 94 QComboBox* mTimeZoneCombo;
90 KDateEdit* mStartDateSavingEdit; 95 KDateEdit* mStartDateSavingEdit;
91 KDateEdit* mEndDateSavingEdit; 96 KDateEdit* mEndDateSavingEdit;
92 97
93// void restoreExtensionSettings(); 98// void restoreExtensionSettings();
94// void saveExtensionSettings(); 99// void saveExtensionSettings();
95 100
96// KListView *mExtensionView; 101// KListView *mExtensionView;
97 102
98// QCheckBox *mNameParsing; 103// QCheckBox *mNameParsing;
99// QCheckBox *mViewsSingleClickBox; 104// QCheckBox *mViewsSingleClickBox;
100// QPushButton *mConfigureButton; 105// QPushButton *mConfigureButton;
101 QComboBox* mExternalApps; 106 QComboBox* mExternalApps;
102 QGroupBox* mExternalAppGroupBox; 107 QGroupBox* mExternalAppGroupBox;
103 108
104 109
105 QComboBox* mClient; 110 QComboBox* mClient;
106 QLineEdit* mChannel; 111 QLineEdit* mChannel;
107 QLineEdit* mMessage; 112 QLineEdit* mMessage;
108 QLineEdit* mParameters; 113 QLineEdit* mParameters;
109 QLineEdit* mMessage2; 114 QLineEdit* mMessage2;
110 QLineEdit* mParameters2; 115 QLineEdit* mParameters2;
111 116
112 ExternalAppHandler::Types mCurrentApp; 117 ExternalAppHandler::Types mCurrentApp;
113 int mCurrentClient; 118 int mCurrentClient;
114 119
115 120
116 int mEmailClient; 121 int mEmailClient;
117 QString mEmailOtherChannel; 122 QString mEmailOtherChannel;
118 QString mEmailOtherMessage; 123 QString mEmailOtherMessage;
119 QString mEmailOtherMessageParameters; 124 QString mEmailOtherMessageParameters;
120 QString mEmailOtherMessage2; 125 QString mEmailOtherMessage2;
121 QString mEmailOtherMessageParameters2; 126 QString mEmailOtherMessageParameters2;
122 127
123 int mPhoneClient; 128 int mPhoneClient;
124 QString mPhoneOtherChannel; 129 QString mPhoneOtherChannel;
125 QString mPhoneOtherMessage; 130 QString mPhoneOtherMessage;
126 QString mPhoneOtherMessageParameters; 131 QString mPhoneOtherMessageParameters;
127 132
128 int mFaxClient; 133 int mFaxClient;
129 QString mFaxOtherChannel; 134 QString mFaxOtherChannel;
130 QString mFaxOtherMessage; 135 QString mFaxOtherMessage;
131 QString mFaxOtherMessageParameters; 136 QString mFaxOtherMessageParameters;
132 137
133 int mSMSClient; 138 int mSMSClient;
134 QString mSMSOtherChannel; 139 QString mSMSOtherChannel;
135 QString mSMSOtherMessage; 140 QString mSMSOtherMessage;
136 QString mSMSOtherMessageParameters; 141 QString mSMSOtherMessageParameters;
137 142
138 int mPagerClient; 143 int mPagerClient;
139 QString mPagerOtherChannel; 144 QString mPagerOtherChannel;
140 QString mPagerOtherMessage; 145 QString mPagerOtherMessage;
141 QString mPagerOtherMessageParameters; 146 QString mPagerOtherMessageParameters;
142 147
143 int mSipClient; 148 int mSipClient;
144 QString mSipOtherChannel; 149 QString mSipOtherChannel;
145 QString mSipOtherMessage; 150 QString mSipOtherMessage;
146 QString mSipOtherMessageParameters; 151 QString mSipOtherMessageParameters;
147 152
148 153
149 154
150 QMap<ExternalAppHandler::Types, QString> mExternalAppsMap; 155 QMap<ExternalAppHandler::Types, QString> mExternalAppsMap;
151 156
152// AddresseeWidget *mAddresseeWidget; 157// AddresseeWidget *mAddresseeWidget;
153}; 158};
154 159
155#endif 160#endif