-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 26 | ||||
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.h | 1 |
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,871 +1,897 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KdePim/Pi. | 2 | This file is part of KdePim/Pi. |
3 | Copyright (c) 2004 Ulf Schenk | 3 | Copyright (c) 2004 Ulf Schenk |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | #include <qtabwidget.h> | 32 | #include <qtabwidget.h> |
33 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
34 | #include <qgroupbox.h> | 34 | #include <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 | ||
88 | KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name ) | 89 | KDEPIMConfigWidget::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 | } |
113 | void KDEPIMConfigWidget::showTimeZoneTab() | 114 | void KDEPIMConfigWidget::showTimeZoneTab() |
114 | { | 115 | { |
115 | tabWidget->setCurrentPage ( 3 ) ; | 116 | tabWidget->setCurrentPage ( 3 ) ; |
116 | } | 117 | } |
117 | void KDEPIMConfigWidget::setupStoreTab() | 118 | void 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 | } |
157 | void 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 | } | ||
138 | void KDEPIMConfigWidget::setStandardStore() | 164 | void KDEPIMConfigWidget::setStandardStore() |
139 | { | 165 | { |
140 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); | 166 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); |
141 | saveStoreSettings(); | 167 | saveStoreSettings(); |
142 | } | 168 | } |
143 | void KDEPIMConfigWidget::saveStoreSettings() | 169 | void 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 | } |
163 | void KDEPIMConfigWidget::setupExternalAppTab() | 189 | void 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 | ||
242 | void KDEPIMConfigWidget::setupLocaleDateTab() | 268 | void 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 ) |
266 | format = "(%Y-%m-%d)"; | 292 | format = "(%Y-%m-%d)"; |
267 | else | 293 | else |
268 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 294 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
269 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 295 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
270 | syncPrefsGroup->addRadio(i18n("User defined")); | 296 | syncPrefsGroup->addRadio(i18n("User defined")); |
271 | if ( QApplication::desktop()->width() < 480 ) { | 297 | if ( QApplication::desktop()->width() < 480 ) { |
272 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); | 298 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); |
273 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); | 299 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); |
274 | } | 300 | } |
275 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); | 301 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); |
276 | ++iii; | 302 | ++iii; |
277 | ++iii; | 303 | ++iii; |
278 | QLabel * lab; | 304 | QLabel * lab; |
279 | mUserDateFormatLong = new QLineEdit(topFrame); | 305 | mUserDateFormatLong = new QLineEdit(topFrame); |
280 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 306 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
281 | topLayout->addWidget(lab ,iii,0); | 307 | topLayout->addWidget(lab ,iii,0); |
282 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 308 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
283 | ++iii; | 309 | ++iii; |
284 | mUserDateFormatShort = new QLineEdit(topFrame); | 310 | mUserDateFormatShort = new QLineEdit(topFrame); |
285 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 311 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
286 | topLayout->addWidget(lab ,iii,0); | 312 | topLayout->addWidget(lab ,iii,0); |
287 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 313 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
288 | ++iii; | 314 | ++iii; |
289 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 315 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
290 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 316 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
291 | ++iii; | 317 | ++iii; |
292 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 318 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
293 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 319 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
294 | ++iii; | 320 | ++iii; |
295 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 321 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
296 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 322 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
297 | ++iii; | 323 | ++iii; |
298 | 324 | ||
299 | connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 325 | connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
300 | connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 326 | connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
301 | 327 | ||
302 | 328 | ||
303 | tabWidget->addTab( topFrame, i18n( "Date Format" ) ); | 329 | tabWidget->addTab( topFrame, i18n( "Date Format" ) ); |
304 | } | 330 | } |
305 | 331 | ||
306 | void KDEPIMConfigWidget::setupLocaleTab() | 332 | void KDEPIMConfigWidget::setupLocaleTab() |
307 | { | 333 | { |
308 | 334 | ||
309 | QWidget *topFrame = new QWidget( this ); | 335 | QWidget *topFrame = new QWidget( this ); |
310 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 336 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
311 | 337 | ||
312 | topLayout->setSpacing(KDialog::spacingHint()); | 338 | topLayout->setSpacing(KDialog::spacingHint()); |
313 | topLayout->setMargin(KDialog::marginHint()); | 339 | topLayout->setMargin(KDialog::marginHint()); |
314 | int iii = 0; | 340 | int iii = 0; |
315 | KPrefsWidRadios *syncPrefsGroup = | 341 | KPrefsWidRadios *syncPrefsGroup = |
316 | addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame); | 342 | addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame); |
317 | syncPrefsGroup->addRadio(i18n("English")); | 343 | syncPrefsGroup->addRadio(i18n("English")); |
318 | syncPrefsGroup->addRadio(i18n("German")); | 344 | syncPrefsGroup->addRadio(i18n("German")); |
319 | syncPrefsGroup->addRadio(i18n("French")); | 345 | syncPrefsGroup->addRadio(i18n("French")); |
320 | syncPrefsGroup->addRadio(i18n("Italian")); | 346 | syncPrefsGroup->addRadio(i18n("Italian")); |
321 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 347 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
322 | if ( QApplication::desktop()->width() < 300 ) { | 348 | if ( QApplication::desktop()->width() < 300 ) { |
323 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); | 349 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); |
324 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); | 350 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); |
325 | } | 351 | } |
326 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); | 352 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); |
327 | ++iii; | 353 | ++iii; |
328 | 354 | ||
329 | 355 | ||
330 | tabWidget->addTab( topFrame, i18n( "Language" ) ); | 356 | tabWidget->addTab( topFrame, i18n( "Language" ) ); |
331 | topFrame = new QWidget( this ); | 357 | topFrame = new QWidget( this ); |
332 | topLayout = new QGridLayout(topFrame,4,2); | 358 | topLayout = new QGridLayout(topFrame,4,2); |
333 | 359 | ||
334 | topLayout->setSpacing(KDialog::spacingHint()); | 360 | topLayout->setSpacing(KDialog::spacingHint()); |
335 | topLayout->setMargin(KDialog::marginHint()); | 361 | topLayout->setMargin(KDialog::marginHint()); |
336 | iii = 0; | 362 | iii = 0; |
337 | syncPrefsGroup = | 363 | syncPrefsGroup = |
338 | addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame); | 364 | addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame); |
339 | if ( QApplication::desktop()->width() > 300 ) | 365 | if ( QApplication::desktop()->width() > 300 ) |
340 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); | 366 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); |
341 | syncPrefsGroup->addRadio(i18n("24:00")); | 367 | syncPrefsGroup->addRadio(i18n("24:00")); |
342 | syncPrefsGroup->addRadio(i18n("12:00am")); | 368 | syncPrefsGroup->addRadio(i18n("12:00am")); |
343 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); | 369 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); |
344 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 370 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
345 | ++iii; | 371 | ++iii; |
346 | 372 | ||
347 | KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"), | 373 | KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"), |
348 | &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame); | 374 | &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame); |
349 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | 375 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); |
350 | ++iii; | 376 | ++iii; |
351 | 377 | ||
352 | 378 | ||
353 | tabWidget->addTab( topFrame, i18n( "Time Format" ) ); | 379 | tabWidget->addTab( topFrame, i18n( "Time Format" ) ); |
354 | 380 | ||
355 | } | 381 | } |
356 | 382 | ||
357 | 383 | ||
358 | void KDEPIMConfigWidget::setupTimeZoneTab() | 384 | void KDEPIMConfigWidget::setupTimeZoneTab() |
359 | { | 385 | { |
360 | QWidget *topFrame; | 386 | QWidget *topFrame; |
361 | QGridLayout *topLayout ; | 387 | QGridLayout *topLayout ; |
362 | 388 | ||
363 | 389 | ||
364 | 390 | ||
365 | 391 | ||
366 | 392 | ||
367 | 393 | ||
368 | topFrame = new QWidget( this ); | 394 | topFrame = new QWidget( this ); |
369 | topLayout = new QGridLayout( topFrame, 5, 2); | 395 | topLayout = new QGridLayout( topFrame, 5, 2); |
370 | topLayout->setSpacing(KDialog::spacingHintSmall()); | 396 | topLayout->setSpacing(KDialog::spacingHintSmall()); |
371 | topLayout->setMargin(KDialog::marginHintSmall()); | 397 | topLayout->setMargin(KDialog::marginHintSmall()); |
372 | 398 | ||
373 | QHBox *timeZoneBox = new QHBox( topFrame ); | 399 | QHBox *timeZoneBox = new QHBox( topFrame ); |
374 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); | 400 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); |
375 | 401 | ||
376 | new QLabel( i18n("Timezone:"), timeZoneBox ); | 402 | new QLabel( i18n("Timezone:"), timeZoneBox ); |
377 | mTimeZoneCombo = new QComboBox( timeZoneBox ); | 403 | mTimeZoneCombo = new QComboBox( timeZoneBox ); |
378 | if ( QApplication::desktop()->width() < 300 ) { | 404 | if ( QApplication::desktop()->width() < 300 ) { |
379 | mTimeZoneCombo->setMaximumWidth(150); | 405 | mTimeZoneCombo->setMaximumWidth(150); |
380 | } | 406 | } |
381 | 407 | ||
382 | QStringList list; | 408 | QStringList list; |
383 | list = KGlobal::locale()->timeZoneList(); | 409 | list = KGlobal::locale()->timeZoneList(); |
384 | mTimeZoneCombo->insertStringList(list); | 410 | mTimeZoneCombo->insertStringList(list); |
385 | 411 | ||
386 | // find the currently set time zone and select it | 412 | // find the currently set time zone and select it |
387 | QString sCurrentlySet = KPimGlobalPrefs::instance()->mTimeZoneId; | 413 | QString sCurrentlySet = KPimGlobalPrefs::instance()->mTimeZoneId; |
388 | int nCurrentlySet = 11; | 414 | int nCurrentlySet = 11; |
389 | for (int i = 0; i < mTimeZoneCombo->count(); i++) | 415 | for (int i = 0; i < mTimeZoneCombo->count(); i++) |
390 | { | 416 | { |
391 | if (mTimeZoneCombo->text(i) == sCurrentlySet) | 417 | if (mTimeZoneCombo->text(i) == sCurrentlySet) |
392 | { | 418 | { |
393 | nCurrentlySet = i; | 419 | nCurrentlySet = i; |
394 | break; | 420 | break; |
395 | } | 421 | } |
396 | } | 422 | } |
397 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); | 423 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); |
398 | int iii = 1; | 424 | int iii = 1; |
399 | KPrefsWidBool *sb = | 425 | KPrefsWidBool *sb = |
400 | addWidBool(i18n("Add 30 min to selected Timezone"), | 426 | addWidBool(i18n("Add 30 min to selected Timezone"), |
401 | &(KPimGlobalPrefs::instance()->mTimeZoneAdd30min),topFrame); | 427 | &(KPimGlobalPrefs::instance()->mTimeZoneAdd30min),topFrame); |
402 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | 428 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); |
403 | ++iii; | 429 | ++iii; |
404 | sb = | 430 | sb = |
405 | addWidBool(i18n("Timezone has daylight saving"), | 431 | addWidBool(i18n("Timezone has daylight saving"), |
406 | &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); | 432 | &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); |
407 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | 433 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); |
408 | ++iii; | 434 | ++iii; |
409 | QLabel* lab; | 435 | QLabel* lab; |
410 | 436 | ||
411 | lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); | 437 | lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); |
412 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 438 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
413 | ++iii; | 439 | ++iii; |
414 | 440 | ||
415 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); | 441 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); |
416 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 442 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
417 | ++iii; | 443 | ++iii; |
418 | lab = new QLabel( i18n("Daylight start:"), topFrame ); | 444 | lab = new QLabel( i18n("Daylight start:"), topFrame ); |
419 | topLayout->addWidget(lab, iii,0); | 445 | topLayout->addWidget(lab, iii,0); |
420 | mStartDateSavingEdit = new KDateEdit(topFrame); | 446 | mStartDateSavingEdit = new KDateEdit(topFrame); |
421 | topLayout->addWidget(mStartDateSavingEdit, iii,1); | 447 | topLayout->addWidget(mStartDateSavingEdit, iii,1); |
422 | ++iii; | 448 | ++iii; |
423 | 449 | ||
424 | lab = new QLabel( i18n("Daylight end:"), topFrame ); | 450 | lab = new QLabel( i18n("Daylight end:"), topFrame ); |
425 | topLayout->addWidget(lab, iii,0); | 451 | topLayout->addWidget(lab, iii,0); |
426 | mEndDateSavingEdit = new KDateEdit(topFrame); | 452 | mEndDateSavingEdit = new KDateEdit(topFrame); |
427 | topLayout->addWidget(mEndDateSavingEdit, iii,1); | 453 | topLayout->addWidget(mEndDateSavingEdit, iii,1); |
428 | ++iii; | 454 | ++iii; |
429 | QDate current ( 2001, 1,1); | 455 | QDate current ( 2001, 1,1); |
430 | mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1)); | 456 | mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1)); |
431 | mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1)); | 457 | mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1)); |
432 | 458 | ||
433 | connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); | 459 | connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); |
434 | connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); | 460 | connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); |
435 | connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) ); | 461 | connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) ); |
436 | tabWidget->addTab( topFrame, i18n( "Time Zone" ) ); | 462 | tabWidget->addTab( topFrame, i18n( "Time Zone" ) ); |
437 | 463 | ||
438 | 464 | ||
439 | topFrame = new QWidget( this ); | 465 | topFrame = new QWidget( this ); |
440 | topLayout = new QGridLayout( topFrame, 3, 2); | 466 | topLayout = new QGridLayout( topFrame, 3, 2); |
441 | topLayout->setSpacing(KDialog::spacingHintSmall()); | 467 | topLayout->setSpacing(KDialog::spacingHintSmall()); |
442 | topLayout->setMargin(KDialog::marginHintSmall()); | 468 | topLayout->setMargin(KDialog::marginHintSmall()); |
443 | tabWidget->addTab( topFrame, i18n( "Fonts" ) ); | 469 | tabWidget->addTab( topFrame, i18n( "Fonts" ) ); |
444 | 470 | ||
445 | QLabel* labb = new QLabel( i18n("Global application font for all apps:"), topFrame ); | 471 | QLabel* labb = new QLabel( i18n("Global application font for all apps:"), topFrame ); |
446 | topLayout->addMultiCellWidget(labb,0,0,0,2); | 472 | topLayout->addMultiCellWidget(labb,0,0,0,2); |
447 | int i = 1; | 473 | int i = 1; |
448 | KPrefsWidFont *timeLabelsFont = | 474 | KPrefsWidFont *timeLabelsFont = |
449 | addWidFont(i18n("Kx/Pi"),i18n("Application Font"), | 475 | addWidFont(i18n("Kx/Pi"),i18n("Application Font"), |
450 | &(KPimGlobalPrefs::instance()->mApplicationFont),topFrame); | 476 | &(KPimGlobalPrefs::instance()->mApplicationFont),topFrame); |
451 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 477 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
452 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 478 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
453 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 479 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
454 | } | 480 | } |
455 | 481 | ||
456 | void KDEPIMConfigWidget::externalapp_changed( int newApp ) | 482 | void KDEPIMConfigWidget::externalapp_changed( int newApp ) |
457 | { | 483 | { |
458 | // first store the current data | 484 | // first store the current data |
459 | saveEditFieldSettings(); | 485 | saveEditFieldSettings(); |
460 | 486 | ||
461 | // set mCurrentApp | 487 | // set mCurrentApp |
462 | mCurrentApp = (ExternalAppHandler::Types)newApp; | 488 | mCurrentApp = (ExternalAppHandler::Types)newApp; |
463 | 489 | ||
464 | // set mCurrentClient | 490 | // set mCurrentClient |
465 | switch(mCurrentApp) | 491 | switch(mCurrentApp) |
466 | { | 492 | { |
467 | case(ExternalAppHandler::EMAIL): | 493 | case(ExternalAppHandler::EMAIL): |
468 | mCurrentClient = mEmailClient; | 494 | mCurrentClient = mEmailClient; |
469 | break; | 495 | break; |
470 | case(ExternalAppHandler::PHONE): | 496 | case(ExternalAppHandler::PHONE): |
471 | mCurrentClient = mPhoneClient; | 497 | mCurrentClient = mPhoneClient; |
472 | break; | 498 | break; |
473 | case(ExternalAppHandler::SMS): | 499 | case(ExternalAppHandler::SMS): |
474 | mCurrentClient = mSMSClient; | 500 | mCurrentClient = mSMSClient; |
475 | break; | 501 | break; |
476 | case(ExternalAppHandler::FAX): | 502 | case(ExternalAppHandler::FAX): |
477 | mCurrentClient = mFaxClient; | 503 | mCurrentClient = mFaxClient; |
478 | break; | 504 | break; |
479 | case(ExternalAppHandler::PAGER): | 505 | case(ExternalAppHandler::PAGER): |
480 | mCurrentClient = mPagerClient; | 506 | mCurrentClient = mPagerClient; |
481 | break; | 507 | break; |
482 | case(ExternalAppHandler::SIP): | 508 | case(ExternalAppHandler::SIP): |
483 | mCurrentClient = mSipClient; | 509 | mCurrentClient = mSipClient; |
484 | break; | 510 | break; |
485 | default: | 511 | default: |
486 | return; | 512 | return; |
487 | } | 513 | } |
488 | 514 | ||
489 | // and at last update the widgets | 515 | // and at last update the widgets |
490 | updateClientWidgets(); | 516 | updateClientWidgets(); |
491 | } | 517 | } |
492 | 518 | ||
493 | 519 | ||
494 | 520 | ||
495 | void KDEPIMConfigWidget::client_changed( int newClient ) | 521 | void KDEPIMConfigWidget::client_changed( int newClient ) |
496 | { | 522 | { |
497 | if (newClient == mCurrentClient) | 523 | if (newClient == mCurrentClient) |
498 | return; | 524 | return; |
499 | 525 | ||
500 | // first store the current data | 526 | // first store the current data |
501 | saveEditFieldSettings(); | 527 | saveEditFieldSettings(); |
502 | 528 | ||
503 | 529 | ||
504 | //then reset the clientvariable | 530 | //then reset the clientvariable |
505 | mCurrentClient = newClient; | 531 | mCurrentClient = newClient; |
506 | 532 | ||
507 | // and at last update the widgets | 533 | // and at last update the widgets |
508 | updateClientWidgets(); | 534 | updateClientWidgets(); |
509 | 535 | ||
510 | KPrefsWidget::modified(); | 536 | KPrefsWidget::modified(); |
511 | } | 537 | } |
512 | 538 | ||
513 | void KDEPIMConfigWidget::saveEditFieldSettings() | 539 | void KDEPIMConfigWidget::saveEditFieldSettings() |
514 | { | 540 | { |
515 | 541 | ||
516 | switch(mCurrentApp) | 542 | switch(mCurrentApp) |
517 | { | 543 | { |
518 | case(ExternalAppHandler::EMAIL): | 544 | case(ExternalAppHandler::EMAIL): |
519 | mEmailClient = mClient->currentItem(); | 545 | mEmailClient = mClient->currentItem(); |
520 | break; | 546 | break; |
521 | case(ExternalAppHandler::PHONE): | 547 | case(ExternalAppHandler::PHONE): |
522 | mPhoneClient= mClient->currentItem(); | 548 | mPhoneClient= mClient->currentItem(); |
523 | break; | 549 | break; |
524 | case(ExternalAppHandler::SMS): | 550 | case(ExternalAppHandler::SMS): |
525 | mSMSClient = mClient->currentItem(); | 551 | mSMSClient = mClient->currentItem(); |
526 | break; | 552 | break; |
527 | case(ExternalAppHandler::FAX): | 553 | case(ExternalAppHandler::FAX): |
528 | mFaxClient = mClient->currentItem(); | 554 | mFaxClient = mClient->currentItem(); |
529 | break; | 555 | break; |
530 | case(ExternalAppHandler::PAGER): | 556 | case(ExternalAppHandler::PAGER): |
531 | mPagerClient = mClient->currentItem(); | 557 | mPagerClient = mClient->currentItem(); |
532 | break; | 558 | break; |
533 | case(ExternalAppHandler::SIP): | 559 | case(ExternalAppHandler::SIP): |
534 | mSipClient = mClient->currentItem(); | 560 | mSipClient = mClient->currentItem(); |
535 | break; | 561 | break; |
536 | default: | 562 | default: |
537 | return; | 563 | return; |
538 | } | 564 | } |
539 | 565 | ||
540 | //store the current data back to the apropriate membervariables if we had set it to "other" | 566 | //store the current data back to the apropriate membervariables if we had set it to "other" |
541 | if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) | 567 | if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) |
542 | { | 568 | { |
543 | mEmailOtherChannel = mChannel->text(); | 569 | mEmailOtherChannel = mChannel->text(); |
544 | mEmailOtherMessage = mMessage->text(); | 570 | mEmailOtherMessage = mMessage->text(); |
545 | mEmailOtherMessageParameters = mParameters->text(); | 571 | mEmailOtherMessageParameters = mParameters->text(); |
546 | mEmailOtherMessage2 = mMessage2->text(); | 572 | mEmailOtherMessage2 = mMessage2->text(); |
547 | mEmailOtherMessageParameters2 = mParameters2->text(); | 573 | mEmailOtherMessageParameters2 = mParameters2->text(); |
548 | } | 574 | } |
549 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) | 575 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) |
550 | { | 576 | { |
551 | mPhoneOtherChannel = mChannel->text(); | 577 | mPhoneOtherChannel = mChannel->text(); |
552 | mPhoneOtherMessage = mMessage->text(); | 578 | mPhoneOtherMessage = mMessage->text(); |
553 | mPhoneOtherMessageParameters = mParameters->text(); | 579 | mPhoneOtherMessageParameters = mParameters->text(); |
554 | } | 580 | } |
555 | else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) | 581 | else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) |
556 | { | 582 | { |
557 | mSMSOtherChannel = mChannel->text(); | 583 | mSMSOtherChannel = mChannel->text(); |
558 | mSMSOtherMessage = mMessage->text(); | 584 | mSMSOtherMessage = mMessage->text(); |
559 | mSMSOtherMessageParameters = mParameters->text(); | 585 | mSMSOtherMessageParameters = mParameters->text(); |
560 | } | 586 | } |
561 | else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) | 587 | else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) |
562 | { | 588 | { |
563 | mFaxOtherChannel = mChannel->text(); | 589 | mFaxOtherChannel = mChannel->text(); |
564 | mFaxOtherMessage = mMessage->text(); | 590 | mFaxOtherMessage = mMessage->text(); |
565 | mFaxOtherMessageParameters = mParameters->text(); | 591 | mFaxOtherMessageParameters = mParameters->text(); |
566 | } | 592 | } |
567 | else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) | 593 | else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) |
568 | { | 594 | { |
569 | mPagerOtherChannel = mChannel->text(); | 595 | mPagerOtherChannel = mChannel->text(); |
570 | mPagerOtherMessage = mMessage->text(); | 596 | mPagerOtherMessage = mMessage->text(); |
571 | mPagerOtherMessageParameters = mParameters->text(); | 597 | mPagerOtherMessageParameters = mParameters->text(); |
572 | } | 598 | } |
573 | else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) | 599 | else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) |
574 | { | 600 | { |
575 | mSipOtherChannel = mChannel->text(); | 601 | mSipOtherChannel = mChannel->text(); |
576 | mSipOtherMessage = mMessage->text(); | 602 | mSipOtherMessage = mMessage->text(); |
577 | mSipOtherMessageParameters = mParameters->text(); | 603 | mSipOtherMessageParameters = mParameters->text(); |
578 | } | 604 | } |
579 | 605 | ||
580 | 606 | ||
581 | } | 607 | } |
582 | 608 | ||
583 | void KDEPIMConfigWidget::updateClientWidgets() | 609 | void KDEPIMConfigWidget::updateClientWidgets() |
584 | { | 610 | { |
585 | bool blocked = signalsBlocked(); | 611 | bool blocked = signalsBlocked(); |
586 | blockSignals( true ); | 612 | blockSignals( true ); |
587 | 613 | ||
588 | // at this point we assume, that mCurrentApp and mCurrentClient are set to the values that we want to display | 614 | // at this point we assume, that mCurrentApp and mCurrentClient are set to the values that we want to display |
589 | QMap<ExternalAppHandler::Types, QString>::Iterator it = mExternalAppsMap.find ( mCurrentApp ); | 615 | QMap<ExternalAppHandler::Types, QString>::Iterator it = mExternalAppsMap.find ( mCurrentApp ); |
590 | if (it == mExternalAppsMap.end()) | 616 | if (it == mExternalAppsMap.end()) |
591 | return; | 617 | return; |
592 | 618 | ||
593 | // update group box | 619 | // update group box |
594 | mExternalAppGroupBox->setTitle(i18n( "Used %1 Client" ).arg(it.data())); | 620 | mExternalAppGroupBox->setTitle(i18n( "Used %1 Client" ).arg(it.data())); |
595 | 621 | ||
596 | //update the entries in the client combobox | 622 | //update the entries in the client combobox |
597 | mClient->clear(); | 623 | mClient->clear(); |
598 | 624 | ||
599 | QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); | 625 | QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); |
600 | DefaultAppItem* dai; | 626 | DefaultAppItem* dai; |
601 | for ( dai=items.first(); dai != 0; dai=items.next() ) | 627 | for ( dai=items.first(); dai != 0; dai=items.next() ) |
602 | { | 628 | { |
603 | mClient->insertItem( i18n(dai->_label), dai->_id ); | 629 | mClient->insertItem( i18n(dai->_label), dai->_id ); |
604 | 630 | ||
605 | if (dai->_id == mCurrentClient) | 631 | if (dai->_id == mCurrentClient) |
606 | { | 632 | { |
607 | //restore the edit fields with the data of the local membervariables if we had set it to "other". | 633 | //restore the edit fields with the data of the local membervariables if we had set it to "other". |
608 | //Otherwise take the default data from externalapphandler. | 634 | //Otherwise take the default data from externalapphandler. |
609 | mChannel->setText(dai->_channel); | 635 | mChannel->setText(dai->_channel); |
610 | mMessage->setText(dai->_message); | 636 | mMessage->setText(dai->_message); |
611 | mParameters->setText(dai->_parameters); | 637 | mParameters->setText(dai->_parameters); |
612 | mMessage2->setText(dai->_message2); | 638 | mMessage2->setText(dai->_message2); |
613 | mParameters2->setText(dai->_parameters2); | 639 | mParameters2->setText(dai->_parameters2); |
614 | 640 | ||
615 | 641 | ||
616 | if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) | 642 | if ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) |
617 | { | 643 | { |
618 | mChannel->setText(mEmailOtherChannel); | 644 | mChannel->setText(mEmailOtherChannel); |
619 | mMessage->setText(mEmailOtherMessage); | 645 | mMessage->setText(mEmailOtherMessage); |
620 | mParameters->setText(mEmailOtherMessageParameters); | 646 | mParameters->setText(mEmailOtherMessageParameters); |
621 | mMessage2->setText(mEmailOtherMessage2); | 647 | mMessage2->setText(mEmailOtherMessage2); |
622 | mParameters2->setText(mEmailOtherMessageParameters2); | 648 | mParameters2->setText(mEmailOtherMessageParameters2); |
623 | } | 649 | } |
624 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) | 650 | else if ((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) |
625 | { | 651 | { |
626 | mChannel->setText(mPhoneOtherChannel); | 652 | mChannel->setText(mPhoneOtherChannel); |
627 | mMessage->setText(mPhoneOtherMessage); | 653 | mMessage->setText(mPhoneOtherMessage); |
628 | mParameters->setText(mPhoneOtherMessageParameters); | 654 | mParameters->setText(mPhoneOtherMessageParameters); |
629 | } | 655 | } |
630 | else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) | 656 | else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) |
631 | { | 657 | { |
632 | mChannel->setText(mSMSOtherChannel); | 658 | mChannel->setText(mSMSOtherChannel); |
633 | mMessage->setText(mSMSOtherMessage); | 659 | mMessage->setText(mSMSOtherMessage); |
634 | mParameters->setText(mSMSOtherMessageParameters); | 660 | mParameters->setText(mSMSOtherMessageParameters); |
635 | } | 661 | } |
636 | else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) | 662 | else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) |
637 | { | 663 | { |
638 | mChannel->setText(mFaxOtherChannel); | 664 | mChannel->setText(mFaxOtherChannel); |
639 | mMessage->setText(mFaxOtherMessage); | 665 | mMessage->setText(mFaxOtherMessage); |
640 | mParameters->setText(mFaxOtherMessageParameters); | 666 | mParameters->setText(mFaxOtherMessageParameters); |
641 | } | 667 | } |
642 | else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) | 668 | else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) |
643 | { | 669 | { |
644 | mChannel->setText(mPagerOtherChannel); | 670 | mChannel->setText(mPagerOtherChannel); |
645 | mMessage->setText(mPagerOtherMessage); | 671 | mMessage->setText(mPagerOtherMessage); |
646 | mParameters->setText(mPagerOtherMessageParameters); | 672 | mParameters->setText(mPagerOtherMessageParameters); |
647 | } | 673 | } |
648 | else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) | 674 | else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)) |
649 | { | 675 | { |
650 | mChannel->setText(mSipOtherChannel); | 676 | mChannel->setText(mSipOtherChannel); |
651 | mMessage->setText(mSipOtherMessage); | 677 | mMessage->setText(mSipOtherMessage); |
652 | mParameters->setText(mSipOtherMessageParameters); | 678 | mParameters->setText(mSipOtherMessageParameters); |
653 | } | 679 | } |
654 | } | 680 | } |
655 | 681 | ||
656 | } | 682 | } |
657 | 683 | ||
658 | bool readonly; | 684 | bool readonly; |
659 | bool enabled; | 685 | bool enabled; |
660 | if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) | 686 | if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::OTHER_EMC)) |
661 | ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) | 687 | ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC)) |
662 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) | 688 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC)) |
663 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) | 689 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC)) |
664 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) | 690 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)) |
665 | ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))) | 691 | ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))) |
666 | { | 692 | { |
667 | readonly = false; | 693 | readonly = false; |
668 | } | 694 | } |
669 | else | 695 | else |
670 | { | 696 | { |
671 | readonly = true; | 697 | readonly = true; |
672 | } | 698 | } |
673 | 699 | ||
674 | if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::NONE_EMC)) | 700 | if ( ((mCurrentApp == ExternalAppHandler::EMAIL) && (mCurrentClient == KPimGlobalPrefs::NONE_EMC)) |
675 | ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::NONE_PHC)) | 701 | ||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::NONE_PHC)) |
676 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::NONE_SMC)) | 702 | ||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::NONE_SMC)) |
677 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::NONE_FAC)) | 703 | ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::NONE_FAC)) |
678 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::NONE_PAC)) | 704 | ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::NONE_PAC)) |
679 | ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::NONE_SIC))) | 705 | ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::NONE_SIC))) |
680 | { | 706 | { |
681 | enabled = false; | 707 | enabled = false; |
682 | } | 708 | } |
683 | else | 709 | else |
684 | { | 710 | { |
685 | enabled = true; | 711 | enabled = true; |
686 | } | 712 | } |
687 | 713 | ||
688 | 714 | ||
689 | mChannel->setReadOnly(readonly); | 715 | mChannel->setReadOnly(readonly); |
690 | mMessage->setReadOnly(readonly); | 716 | mMessage->setReadOnly(readonly); |
691 | mParameters->setReadOnly(readonly); | 717 | mParameters->setReadOnly(readonly); |
692 | mMessage2->setReadOnly(readonly); | 718 | mMessage2->setReadOnly(readonly); |
693 | mParameters2->setReadOnly(readonly); | 719 | mParameters2->setReadOnly(readonly); |
694 | 720 | ||
695 | mChannel->setEnabled(enabled); | 721 | mChannel->setEnabled(enabled); |
696 | mMessage->setEnabled(enabled); | 722 | mMessage->setEnabled(enabled); |
697 | mParameters->setEnabled(enabled); | 723 | mParameters->setEnabled(enabled); |
698 | mMessage2->setEnabled(enabled); | 724 | mMessage2->setEnabled(enabled); |
699 | mParameters2->setEnabled(enabled); | 725 | mParameters2->setEnabled(enabled); |
700 | 726 | ||
701 | 727 | ||
702 | 728 | ||
703 | mClient->setCurrentItem(mCurrentClient); | 729 | mClient->setCurrentItem(mCurrentClient); |
704 | 730 | ||
705 | 731 | ||
706 | // enable/disable the extra message/parameter field | 732 | // enable/disable the extra message/parameter field |
707 | if (mCurrentApp == ExternalAppHandler::EMAIL) | 733 | if (mCurrentApp == ExternalAppHandler::EMAIL) |
708 | { | 734 | { |
709 | } | 735 | } |
710 | else | 736 | else |
711 | { | 737 | { |
712 | mMessage2->setText( "" ); | 738 | mMessage2->setText( "" ); |
713 | mParameters2->setText( "" ); | 739 | mParameters2->setText( "" ); |
714 | } | 740 | } |
715 | 741 | ||
716 | if (enabled == true) { | 742 | if (enabled == true) { |
717 | mMessage2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); | 743 | mMessage2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); |
718 | mParameters2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); | 744 | mParameters2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); |
719 | } | 745 | } |
720 | 746 | ||
721 | 747 | ||
722 | blockSignals( blocked ); | 748 | blockSignals( blocked ); |
723 | 749 | ||
724 | } | 750 | } |
725 | 751 | ||
726 | void KDEPIMConfigWidget::usrReadConfig() | 752 | void KDEPIMConfigWidget::usrReadConfig() |
727 | { | 753 | { |
728 | KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); | 754 | KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); |
729 | 755 | ||
730 | bool blocked = signalsBlocked(); | 756 | bool blocked = signalsBlocked(); |
731 | blockSignals( true ); | 757 | blockSignals( true ); |
732 | 758 | ||
733 | QString dummy = prefs->mUserDateFormatLong; | 759 | QString dummy = prefs->mUserDateFormatLong; |
734 | mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); | 760 | mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); |
735 | dummy = prefs->mUserDateFormatShort; | 761 | dummy = prefs->mUserDateFormatShort; |
736 | mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); | 762 | mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); |
737 | 763 | ||
738 | QDate current ( 2001, 1,1); | 764 | QDate current ( 2001, 1,1); |
739 | mStartDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingStart-1)); | 765 | mStartDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingStart-1)); |
740 | mEndDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingEnd-1)); | 766 | mEndDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingEnd-1)); |
741 | setCombo(mTimeZoneCombo,i18n(prefs->mTimeZoneId)); | 767 | setCombo(mTimeZoneCombo,i18n(prefs->mTimeZoneId)); |
742 | 768 | ||
743 | 769 | ||
744 | 770 | ||
745 | 771 | ||
746 | mEmailClient = prefs->mEmailClient; | 772 | mEmailClient = prefs->mEmailClient; |
747 | mEmailOtherChannel = prefs->mEmailOtherChannel; | 773 | mEmailOtherChannel = prefs->mEmailOtherChannel; |
748 | mEmailOtherMessage = prefs->mEmailOtherMessage; | 774 | mEmailOtherMessage = prefs->mEmailOtherMessage; |
749 | mEmailOtherMessageParameters = prefs->mEmailOtherMessageParameters; | 775 | mEmailOtherMessageParameters = prefs->mEmailOtherMessageParameters; |
750 | mEmailOtherMessage2 = prefs->mEmailOtherMessage2; | 776 | mEmailOtherMessage2 = prefs->mEmailOtherMessage2; |
751 | mEmailOtherMessageParameters2 = prefs->mEmailOtherMessageParameters2; | 777 | mEmailOtherMessageParameters2 = prefs->mEmailOtherMessageParameters2; |
752 | 778 | ||
753 | mPhoneClient = prefs->mPhoneClient; | 779 | mPhoneClient = prefs->mPhoneClient; |
754 | mPhoneOtherChannel = prefs->mPhoneOtherChannel; | 780 | mPhoneOtherChannel = prefs->mPhoneOtherChannel; |
755 | mPhoneOtherMessage = prefs->mPhoneOtherMessage; | 781 | mPhoneOtherMessage = prefs->mPhoneOtherMessage; |
756 | mPhoneOtherMessageParameters = prefs->mPhoneOtherMessageParameters; | 782 | mPhoneOtherMessageParameters = prefs->mPhoneOtherMessageParameters; |
757 | 783 | ||
758 | mFaxClient = prefs->mFaxClient; | 784 | mFaxClient = prefs->mFaxClient; |
759 | mFaxOtherChannel = prefs->mFaxOtherChannel; | 785 | mFaxOtherChannel = prefs->mFaxOtherChannel; |
760 | mFaxOtherMessage = prefs->mFaxOtherMessage; | 786 | mFaxOtherMessage = prefs->mFaxOtherMessage; |
761 | mFaxOtherMessageParameters = prefs->mFaxOtherMessageParameters; | 787 | mFaxOtherMessageParameters = prefs->mFaxOtherMessageParameters; |
762 | 788 | ||
763 | mSMSClient = prefs->mSMSClient; | 789 | mSMSClient = prefs->mSMSClient; |
764 | mSMSOtherChannel = prefs->mSMSOtherChannel; | 790 | mSMSOtherChannel = prefs->mSMSOtherChannel; |
765 | mSMSOtherMessage = prefs->mSMSOtherMessage; | 791 | mSMSOtherMessage = prefs->mSMSOtherMessage; |
766 | mSMSOtherMessageParameters = prefs->mSMSOtherMessageParameters; | 792 | mSMSOtherMessageParameters = prefs->mSMSOtherMessageParameters; |
767 | 793 | ||
768 | mPagerClient = prefs->mPagerClient; | 794 | mPagerClient = prefs->mPagerClient; |
769 | mPagerOtherChannel = prefs->mPagerOtherChannel; | 795 | mPagerOtherChannel = prefs->mPagerOtherChannel; |
770 | mPagerOtherMessage = prefs->mPagerOtherMessage; | 796 | mPagerOtherMessage = prefs->mPagerOtherMessage; |
771 | mPagerOtherMessageParameters = prefs->mPagerOtherMessageParameters; | 797 | mPagerOtherMessageParameters = prefs->mPagerOtherMessageParameters; |
772 | 798 | ||
773 | mSipClient = prefs->mSipClient; | 799 | mSipClient = prefs->mSipClient; |
774 | mSipOtherChannel = prefs->mSipOtherChannel; | 800 | mSipOtherChannel = prefs->mSipOtherChannel; |
775 | mSipOtherMessage = prefs->mSipOtherMessage; | 801 | mSipOtherMessage = prefs->mSipOtherMessage; |
776 | mSipOtherMessageParameters = prefs->mSipOtherMessageParameters; | 802 | mSipOtherMessageParameters = prefs->mSipOtherMessageParameters; |
777 | 803 | ||
778 | mCurrentApp = ExternalAppHandler::EMAIL; | 804 | mCurrentApp = ExternalAppHandler::EMAIL; |
779 | mCurrentClient = mEmailClient; | 805 | mCurrentClient = mEmailClient; |
780 | 806 | ||
781 | updateClientWidgets(); | 807 | updateClientWidgets(); |
782 | 808 | ||
783 | blockSignals( blocked ); | 809 | blockSignals( blocked ); |
784 | 810 | ||
785 | } | 811 | } |
786 | 812 | ||
787 | void KDEPIMConfigWidget::usrWriteConfig() | 813 | void KDEPIMConfigWidget::usrWriteConfig() |
788 | { | 814 | { |
789 | KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); | 815 | KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); |
790 | 816 | ||
791 | saveEditFieldSettings(); | 817 | saveEditFieldSettings(); |
792 | 818 | ||
793 | 819 | ||
794 | prefs->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); | 820 | prefs->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); |
795 | prefs->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); | 821 | prefs->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); |
796 | 822 | ||
797 | prefs->mTimeZoneId = mTimeZoneCombo->currentText(); | 823 | prefs->mTimeZoneId = mTimeZoneCombo->currentText(); |
798 | QDate date; | 824 | QDate date; |
799 | date = mStartDateSavingEdit->date(); | 825 | date = mStartDateSavingEdit->date(); |
800 | int sub = 0; | 826 | int sub = 0; |
801 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 827 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
802 | sub = 1; | 828 | sub = 1; |
803 | prefs->mDaylightsavingStart = date.dayOfYear()-sub; | 829 | prefs->mDaylightsavingStart = date.dayOfYear()-sub; |
804 | date = mEndDateSavingEdit->date(); | 830 | date = mEndDateSavingEdit->date(); |
805 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 831 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
806 | sub = 1; | 832 | sub = 1; |
807 | else | 833 | else |
808 | sub = 0; | 834 | sub = 0; |
809 | prefs->mDaylightsavingEnd = date.dayOfYear()-sub; | 835 | prefs->mDaylightsavingEnd = date.dayOfYear()-sub; |
810 | 836 | ||
811 | 837 | ||
812 | prefs->mEmailClient = mEmailClient; | 838 | prefs->mEmailClient = mEmailClient; |
813 | prefs->mEmailOtherChannel = mEmailOtherChannel; | 839 | prefs->mEmailOtherChannel = mEmailOtherChannel; |
814 | prefs->mEmailOtherMessage = mEmailOtherMessage; | 840 | prefs->mEmailOtherMessage = mEmailOtherMessage; |
815 | prefs->mEmailOtherMessageParameters = mEmailOtherMessageParameters; | 841 | prefs->mEmailOtherMessageParameters = mEmailOtherMessageParameters; |
816 | prefs->mEmailOtherMessage2 = mEmailOtherMessage2; | 842 | prefs->mEmailOtherMessage2 = mEmailOtherMessage2; |
817 | prefs->mEmailOtherMessageParameters2 = mEmailOtherMessageParameters2; | 843 | prefs->mEmailOtherMessageParameters2 = mEmailOtherMessageParameters2; |
818 | 844 | ||
819 | prefs->mPhoneClient = mPhoneClient; | 845 | prefs->mPhoneClient = mPhoneClient; |
820 | prefs->mPhoneOtherChannel = mPhoneOtherChannel; | 846 | prefs->mPhoneOtherChannel = mPhoneOtherChannel; |
821 | prefs->mPhoneOtherMessage = mPhoneOtherMessage; | 847 | prefs->mPhoneOtherMessage = mPhoneOtherMessage; |
822 | prefs->mPhoneOtherMessageParameters = mPhoneOtherMessageParameters; | 848 | prefs->mPhoneOtherMessageParameters = mPhoneOtherMessageParameters; |
823 | 849 | ||
824 | prefs->mFaxClient = mFaxClient; | 850 | prefs->mFaxClient = mFaxClient; |
825 | prefs->mFaxOtherChannel = mFaxOtherChannel; | 851 | prefs->mFaxOtherChannel = mFaxOtherChannel; |
826 | prefs->mFaxOtherMessage = mFaxOtherMessage; | 852 | prefs->mFaxOtherMessage = mFaxOtherMessage; |
827 | prefs->mFaxOtherMessageParameters = mFaxOtherMessageParameters; | 853 | prefs->mFaxOtherMessageParameters = mFaxOtherMessageParameters; |
828 | 854 | ||
829 | prefs->mSMSClient = mSMSClient; | 855 | prefs->mSMSClient = mSMSClient; |
830 | prefs->mSMSOtherChannel = mSMSOtherChannel; | 856 | prefs->mSMSOtherChannel = mSMSOtherChannel; |
831 | prefs->mSMSOtherMessage = mSMSOtherMessage; | 857 | prefs->mSMSOtherMessage = mSMSOtherMessage; |
832 | prefs->mSMSOtherMessageParameters = mSMSOtherMessageParameters; | 858 | prefs->mSMSOtherMessageParameters = mSMSOtherMessageParameters; |
833 | 859 | ||
834 | prefs->mPagerClient = mPagerClient; | 860 | prefs->mPagerClient = mPagerClient; |
835 | prefs->mPagerOtherChannel = mPagerOtherChannel; | 861 | prefs->mPagerOtherChannel = mPagerOtherChannel; |
836 | prefs->mPagerOtherMessage = mPagerOtherMessage; | 862 | prefs->mPagerOtherMessage = mPagerOtherMessage; |
837 | prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters; | 863 | prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters; |
838 | 864 | ||
839 | 865 | ||
840 | prefs->mSipClient = mSipClient; | 866 | prefs->mSipClient = mSipClient; |
841 | prefs->mSipOtherChannel = mSipOtherChannel; | 867 | prefs->mSipOtherChannel = mSipOtherChannel; |
842 | prefs->mSipOtherMessage = mSipOtherMessage; | 868 | prefs->mSipOtherMessage = mSipOtherMessage; |
843 | prefs->mSipOtherMessageParameters = mSipOtherMessageParameters; | 869 | prefs->mSipOtherMessageParameters = mSipOtherMessageParameters; |
844 | 870 | ||
845 | //release the cache that other views can access the changed values instantanious | 871 | //release the cache that other views can access the changed values instantanious |
846 | ExternalAppHandler::instance()->loadConfig(); | 872 | ExternalAppHandler::instance()->loadConfig(); |
847 | KPimGlobalPrefs::instance()->setGlobalConfig(); | 873 | KPimGlobalPrefs::instance()->setGlobalConfig(); |
848 | } | 874 | } |
849 | 875 | ||
850 | 876 | ||
851 | void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text, | 877 | void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text, |
852 | const QStringList *tags) | 878 | const QStringList *tags) |
853 | { | 879 | { |
854 | if (tags) { | 880 | if (tags) { |
855 | int i = tags->findIndex(text); | 881 | int i = tags->findIndex(text); |
856 | if (i > 0) combo->setCurrentItem(i); | 882 | if (i > 0) combo->setCurrentItem(i); |
857 | } else { | 883 | } else { |
858 | for(int i=0;i<combo->count();++i) { | 884 | for(int i=0;i<combo->count();++i) { |
859 | if (combo->text(i) == text) { | 885 | if (combo->text(i) == text) { |
860 | combo->setCurrentItem(i); | 886 | combo->setCurrentItem(i); |
861 | break; | 887 | break; |
862 | } | 888 | } |
863 | } | 889 | } |
864 | } | 890 | } |
865 | } | 891 | } |
866 | 892 | ||
867 | 893 | ||
868 | void KDEPIMConfigWidget::textChanged( const QString& text ) | 894 | void KDEPIMConfigWidget::textChanged( const QString& text ) |
869 | { | 895 | { |
870 | emit changed( true ); | 896 | emit changed( true ); |
871 | } | 897 | } |
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 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef KDEPIMCONFIGWIDGET_H | 31 | #ifndef KDEPIMCONFIGWIDGET_H |
32 | #define KDEPIMCONFIGWIDGET_H | 32 | #define KDEPIMCONFIGWIDGET_H |
33 | 33 | ||
34 | #include <kprefswidget.h> | 34 | #include <kprefswidget.h> |
35 | #include <kio/kfile/kurlrequester.h> | 35 | #include <kio/kfile/kurlrequester.h> |
36 | #include <qmap.h> | 36 | #include <qmap.h> |
37 | 37 | ||
38 | #include "externalapphandler.h" | 38 | #include "externalapphandler.h" |
39 | 39 | ||
40 | 40 | ||
41 | class QComboBox; | 41 | class QComboBox; |
42 | class QLineEdit; | 42 | class QLineEdit; |
43 | class KPimGlobalPrefs; | 43 | class KPimGlobalPrefs; |
44 | class QGroupBox; | 44 | class QGroupBox; |
45 | class QTabWidget; | 45 | class QTabWidget; |
46 | class KDateEdit; | 46 | class KDateEdit; |
47 | 47 | ||
48 | class KDEPIMConfigWidget : public KPrefsWidget | 48 | class 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 |