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