Diffstat (limited to 'libkdepim/ksyncprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 130 |
1 files changed, 67 insertions, 63 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index 2b87298..fd5bbca 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp | |||
@@ -25,4 +25,4 @@ | |||
25 | #include <qlabel.h> | 25 | #include <qlabel.h> |
26 | #include <qgroupbox.h> | 26 | #include <q3groupbox.h> |
27 | #include <qbuttongroup.h> | 27 | #include <q3buttongroup.h> |
28 | #include <qlineedit.h> | 28 | #include <qlineedit.h> |
@@ -32,6 +32,6 @@ | |||
32 | #include <qdir.h> | 32 | #include <qdir.h> |
33 | #include <qtextstream.h> | 33 | #include <q3textstream.h> |
34 | #include <qcombobox.h> | 34 | #include <qcombobox.h> |
35 | #include <qvbox.h> | 35 | #include <q3vbox.h> |
36 | #include <qhbox.h> | 36 | #include <q3hbox.h> |
37 | #include <qspinbox.h> | 37 | #include <qspinbox.h> |
@@ -41,8 +41,12 @@ | |||
41 | #include <qpushbutton.h> | 41 | #include <qpushbutton.h> |
42 | #include <qstrlist.h> | 42 | #include <q3strlist.h> |
43 | #include <qapplication.h> | 43 | #include <qapplication.h> |
44 | #include <qlayout.h> | 44 | #include <qlayout.h> |
45 | #include <qscrollview.h> | 45 | #include <q3scrollview.h> |
46 | #include <qvgroupbox.h> | 46 | #include <q3vgroupbox.h> |
47 | #include <qhgroupbox.h> | 47 | #include <q3hgroupbox.h> |
48 | //Added by qt3to4: | ||
49 | #include <Q3HBoxLayout> | ||
50 | #include <Q3GridLayout> | ||
51 | #include <Q3Frame> | ||
48 | 52 | ||
@@ -91,7 +95,7 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
91 | //QFrame *page = addPage(i18n("Sync Prefs"),0,0); | 95 | //QFrame *page = addPage(i18n("Sync Prefs"),0,0); |
92 | QVBox * mainbox = new QVBox( this ); | 96 | Q3VBox * mainbox = new Q3VBox( this ); |
93 | QScrollView* sv = new QScrollView( mainbox ); | 97 | Q3ScrollView* sv = new Q3ScrollView( mainbox ); |
94 | QHBoxLayout * lay = new QHBoxLayout( this ); | 98 | Q3HBoxLayout * lay = new Q3HBoxLayout( this ); |
95 | lay->addWidget( mainbox ); | 99 | lay->addWidget( mainbox ); |
96 | QHBox * b_box = new QHBox( mainbox ); | 100 | Q3HBox * b_box = new Q3HBox( mainbox ); |
97 | 101 | ||
@@ -103,7 +107,7 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
103 | //sl->addWidget ( sv ); | 107 | //sl->addWidget ( sv ); |
104 | sv->setResizePolicy ( QScrollView::AutoOneFit ); | 108 | sv->setResizePolicy ( Q3ScrollView::AutoOneFit ); |
105 | QFrame *topFrame = new QFrame ( sv ); | 109 | Q3Frame *topFrame = new Q3Frame ( sv ); |
106 | sv->addChild( topFrame ); | 110 | sv->addChild( topFrame ); |
107 | mSetupSyncAlgTab = topFrame; | 111 | mSetupSyncAlgTab = topFrame; |
108 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 112 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); |
109 | topLayout->setSpacing(spacingHint()); | 113 | topLayout->setSpacing(spacingHint()); |
@@ -122,3 +126,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
122 | 126 | ||
123 | QHBox* buttonbox = new QHBox( topFrame); | 127 | Q3HBox* buttonbox = new Q3HBox( topFrame); |
124 | topLayout->addMultiCellWidget(buttonbox, iii,iii,0,1); | 128 | topLayout->addMultiCellWidget(buttonbox, iii,iii,0,1); |
@@ -147,3 +151,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
147 | 151 | ||
148 | QHGroupBox *iims = new QHGroupBox( i18n("Multiple Sync options"), topFrame); | 152 | Q3HGroupBox *iims = new Q3HGroupBox( i18n("Multiple Sync options"), topFrame); |
149 | new QLabel( i18n("Include in multiple "), iims ); | 153 | new QLabel( i18n("Include in multiple "), iims ); |
@@ -155,8 +159,8 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
155 | ++iii; | 159 | ++iii; |
156 | QVGroupBox* gb0 = new QVGroupBox( i18n("Sync algo options"), topFrame); | 160 | Q3VGroupBox* gb0 = new Q3VGroupBox( i18n("Sync algo options"), topFrame); |
157 | topLayout->addMultiCellWidget(gb0, iii,iii,0,1); | 161 | topLayout->addMultiCellWidget(gb0, iii,iii,0,1); |
158 | ++iii; | 162 | ++iii; |
159 | QButtonGroup* gr; | 163 | Q3ButtonGroup* gr; |
160 | { | 164 | { |
161 | QVGroupBox* topFrame = gb0; | 165 | Q3VGroupBox* topFrame = gb0; |
162 | 166 | ||
@@ -167,3 +171,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
167 | //++iii; | 171 | //++iii; |
168 | gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame); | 172 | gr = new Q3ButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame); |
169 | //topLayout->addMultiCellWidget(gr, iii,iii,0,1); | 173 | //topLayout->addMultiCellWidget(gr, iii,iii,0,1); |
@@ -183,8 +187,8 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
183 | #if 0 | 187 | #if 0 |
184 | QHGroupBox* gb51 = new QHGroupBox( i18n("Local resources to sync with:"), topFrame); | 188 | Q3HGroupBox* gb51 = new Q3HGroupBox( i18n("Local resources to sync with:"), topFrame); |
185 | { | 189 | { |
186 | QVBox * fibo2 = new QVBox ( gb51 ); | 190 | Q3VBox * fibo2 = new Q3VBox ( gb51 ); |
187 | new QLabel ( i18n("Calendar resources:"), fibo2 ); | 191 | new QLabel ( i18n("Calendar resources:"), fibo2 ); |
188 | //mFilterInCal = new QComboBox( fibo2 ); | 192 | //mFilterInCal = new QComboBox( fibo2 ); |
189 | fibo2 = new QVBox ( gb51 ); | 193 | fibo2 = new Q3VBox ( gb51 ); |
190 | new QLabel ( i18n("Addressbook resources:"), fibo2 ); | 194 | new QLabel ( i18n("Addressbook resources:"), fibo2 ); |
@@ -193,7 +197,7 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
193 | #endif | 197 | #endif |
194 | QHGroupBox* gb5 = new QHGroupBox( i18n("Apply filter when adding data to local:"), topFrame); | 198 | Q3HGroupBox* gb5 = new Q3HGroupBox( i18n("Apply filter when adding data to local:"), topFrame); |
195 | QVBox * fibo2 = new QVBox ( gb5 ); | 199 | Q3VBox * fibo2 = new Q3VBox ( gb5 ); |
196 | new QLabel ( i18n("Incoming calendar filter:"), fibo2 ); | 200 | new QLabel ( i18n("Incoming calendar filter:"), fibo2 ); |
197 | mFilterInCal = new QComboBox( fibo2 ); | 201 | mFilterInCal = new QComboBox( fibo2 ); |
198 | fibo2 = new QVBox ( gb5 ); | 202 | fibo2 = new Q3VBox ( gb5 ); |
199 | new QLabel ( i18n("Incoming addressbook filter:"), fibo2 ); | 203 | new QLabel ( i18n("Incoming addressbook filter:"), fibo2 ); |
@@ -205,3 +209,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
205 | 209 | ||
206 | QVGroupBox* gb2 = new QVGroupBox( i18n("Write back options"), topFrame); | 210 | Q3VGroupBox* gb2 = new Q3VGroupBox( i18n("Write back options"), topFrame); |
207 | //topLayout->addMultiCellWidget(gb2, iii,iii,0,1); | 211 | //topLayout->addMultiCellWidget(gb2, iii,iii,0,1); |
@@ -209,9 +213,9 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
209 | { | 213 | { |
210 | QVGroupBox*topFrame = gb2; | 214 | Q3VGroupBox*topFrame = gb2; |
211 | mWriteBackExisting= new QCheckBox( i18n("Write back (on remote) existing entries only"), topFrame ); | 215 | mWriteBackExisting= new QCheckBox( i18n("Write back (on remote) existing entries only"), topFrame ); |
212 | QHGroupBox* gb4 = new QHGroupBox( i18n("Apply filter when adding data to remote:"), topFrame); | 216 | Q3HGroupBox* gb4 = new Q3HGroupBox( i18n("Apply filter when adding data to remote:"), topFrame); |
213 | QVBox * fibo = new QVBox ( gb4 ); | 217 | Q3VBox * fibo = new Q3VBox ( gb4 ); |
214 | new QLabel ( i18n("Outgoing calendar filter:"), fibo ); | 218 | new QLabel ( i18n("Outgoing calendar filter:"), fibo ); |
215 | mFilterOutCal = new QComboBox( fibo ); | 219 | mFilterOutCal = new QComboBox( fibo ); |
216 | fibo = new QVBox ( gb4 ); | 220 | fibo = new Q3VBox ( gb4 ); |
217 | new QLabel ( i18n("Outgoing addressbook filter:"), fibo ); | 221 | new QLabel ( i18n("Outgoing addressbook filter:"), fibo ); |
@@ -223,3 +227,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
223 | //++iii; | 227 | //++iii; |
224 | QVGroupBox* gb3 = new QVGroupBox( i18n("Time period"), topFrame); | 228 | Q3VGroupBox* gb3 = new Q3VGroupBox( i18n("Time period"), topFrame); |
225 | connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) ); | 229 | connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) ); |
@@ -227,3 +231,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
227 | new QLabel( i18n("From ") , gb3 ); | 231 | new QLabel( i18n("From ") , gb3 ); |
228 | QHBox * tf1 = new QHBox ( gb3 ); | 232 | Q3HBox * tf1 = new Q3HBox ( gb3 ); |
229 | mWriteBackPastWeeks= new QSpinBox(1,104, 1, tf1 ); | 233 | mWriteBackPastWeeks= new QSpinBox(1,104, 1, tf1 ); |
@@ -231,3 +235,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
231 | new QLabel( i18n(" weeks in the past to ") ,tf1 ); | 235 | new QLabel( i18n(" weeks in the past to ") ,tf1 ); |
232 | QHBox * tf2 = new QHBox ( gb3 ); | 236 | Q3HBox * tf2 = new Q3HBox ( gb3 ); |
233 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, tf2); | 237 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, tf2); |
@@ -243,3 +247,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
243 | } | 247 | } |
244 | proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame); | 248 | proGr = new Q3ButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame); |
245 | gr = proGr; | 249 | gr = proGr; |
@@ -257,3 +261,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
257 | 261 | ||
258 | QVGroupBox* gb1 = new QVGroupBox( i18n("Profile kind specific settings"), topFrame); | 262 | Q3VGroupBox* gb1 = new Q3VGroupBox( i18n("Profile kind specific settings"), topFrame); |
259 | topLayout->addMultiCellWidget(gb1, iii,iii,0,1); | 263 | topLayout->addMultiCellWidget(gb1, iii,iii,0,1); |
@@ -265,4 +269,4 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
265 | // *** phone ******************************* | 269 | // *** phone ******************************* |
266 | QVGroupBox* topFrame = gb1; | 270 | Q3VGroupBox* topFrame = gb1; |
267 | phoneWidget = new QVBox( topFrame); | 271 | phoneWidget = new Q3VBox( topFrame); |
268 | //topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1); | 272 | //topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1); |
@@ -270,3 +274,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
270 | mWriteContactToSIM = 0;//new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget ); | 274 | mWriteContactToSIM = 0;//new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget ); |
271 | QHBox* temphb = new QHBox( phoneWidget ); | 275 | Q3HBox* temphb = new Q3HBox( phoneWidget ); |
272 | new QLabel( i18n("I/O device: "), temphb ); | 276 | new QLabel( i18n("I/O device: "), temphb ); |
@@ -277,3 +281,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
277 | 281 | ||
278 | temphb = new QHBox( phoneWidget ); | 282 | temphb = new Q3HBox( phoneWidget ); |
279 | new QLabel( i18n("Connection: "), temphb ); | 283 | new QLabel( i18n("Connection: "), temphb ); |
@@ -284,3 +288,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
284 | 288 | ||
285 | temphb = new QHBox( phoneWidget ); | 289 | temphb = new Q3HBox( phoneWidget ); |
286 | new QLabel( i18n("Model(opt.): "), temphb ); | 290 | new QLabel( i18n("Model(opt.): "), temphb ); |
@@ -291,6 +295,6 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
291 | // *** local******************************* | 295 | // *** local******************************* |
292 | localFileWidget = new QVBox( topFrame); | 296 | localFileWidget = new Q3VBox( topFrame); |
293 | //topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1); | 297 | //topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1); |
294 | //++iii; | 298 | //++iii; |
295 | temphb = new QHBox( localFileWidget ); | 299 | temphb = new Q3HBox( localFileWidget ); |
296 | 300 | ||
@@ -299,3 +303,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
299 | lab = new QLabel( i18n("Local file PWMgr:"), temphb ); | 303 | lab = new QLabel( i18n("Local file PWMgr:"), temphb ); |
300 | temphb = new QHBox( localFileWidget ); | 304 | temphb = new Q3HBox( localFileWidget ); |
301 | button = new QPushButton( i18n("Choose..."), temphb ); | 305 | button = new QPushButton( i18n("Choose..."), temphb ); |
@@ -306,3 +310,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
306 | connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) ); | 310 | connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) ); |
307 | temphb = new QHBox( localFileWidget ); | 311 | temphb = new Q3HBox( localFileWidget ); |
308 | 312 | ||
@@ -315,6 +319,6 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
315 | // *** remote******************************* | 319 | // *** remote******************************* |
316 | remoteFileWidget = new QVBox( topFrame); | 320 | remoteFileWidget = new Q3VBox( topFrame); |
317 | //topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1); | 321 | //topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1); |
318 | //++iii; | 322 | //++iii; |
319 | temphb = new QHBox( remoteFileWidget ); | 323 | temphb = new Q3HBox( remoteFileWidget ); |
320 | new QLabel( i18n("Calendar:"), temphb); | 324 | new QLabel( i18n("Calendar:"), temphb); |
@@ -324,3 +328,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
324 | lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget); | 328 | lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget); |
325 | temphb = new QHBox( remoteFileWidget ); | 329 | temphb = new Q3HBox( remoteFileWidget ); |
326 | mRemotePrecommand = new QLineEdit(temphb); | 330 | mRemotePrecommand = new QLineEdit(temphb); |
@@ -330,3 +334,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
330 | lab = new QLabel( i18n("Local temp file:"), remoteFileWidget); | 334 | lab = new QLabel( i18n("Local temp file:"), remoteFileWidget); |
331 | temphb = new QHBox( remoteFileWidget ); | 335 | temphb = new Q3HBox( remoteFileWidget ); |
332 | mLocalTempFile = new QLineEdit(temphb); | 336 | mLocalTempFile = new QLineEdit(temphb); |
@@ -336,3 +340,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
336 | lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget); | 340 | lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget); |
337 | temphb = new QHBox( remoteFileWidget ); | 341 | temphb = new Q3HBox( remoteFileWidget ); |
338 | mRemotePostcommand = new QLineEdit(temphb ); | 342 | mRemotePostcommand = new QLineEdit(temphb ); |
@@ -342,3 +346,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
342 | lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget); | 346 | lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget); |
343 | temphb = new QHBox( remoteFileWidget ); | 347 | temphb = new Q3HBox( remoteFileWidget ); |
344 | button = new QPushButton( i18n("ssh/scp"), temphb ); | 348 | button = new QPushButton( i18n("ssh/scp"), temphb ); |
@@ -350,6 +354,6 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
350 | // *** pi-sync******************************* | 354 | // *** pi-sync******************************* |
351 | piWidget = new QVBox( topFrame); | 355 | piWidget = new Q3VBox( topFrame); |
352 | //topLayout->addMultiCellWidget(piWidget, iii,iii,0,1); | 356 | //topLayout->addMultiCellWidget(piWidget, iii,iii,0,1); |
353 | //++iii; | 357 | //++iii; |
354 | temphb = new QHBox( piWidget ); | 358 | temphb = new Q3HBox( piWidget ); |
355 | new QLabel( i18n("Calendar:"), temphb); | 359 | new QLabel( i18n("Calendar:"), temphb); |
@@ -359,3 +363,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
359 | lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget); | 363 | lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget); |
360 | temphb = new QHBox( piWidget ); | 364 | temphb = new Q3HBox( piWidget ); |
361 | mRemotePw = new QLineEdit(temphb); | 365 | mRemotePw = new QLineEdit(temphb); |
@@ -365,3 +369,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
365 | lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget); | 369 | lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget); |
366 | temphb = new QHBox( piWidget ); | 370 | temphb = new Q3HBox( piWidget ); |
367 | mRemoteIP = new QLineEdit(temphb); | 371 | mRemoteIP = new QLineEdit(temphb); |
@@ -371,3 +375,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
371 | lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget); | 375 | lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget); |
372 | temphb = new QHBox( piWidget ); | 376 | temphb = new Q3HBox( piWidget ); |
373 | mRemotePort = new QLineEdit(temphb); | 377 | mRemotePort = new QLineEdit(temphb); |
@@ -377,6 +381,6 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
377 | lab = new QLabel( i18n("Local/remote Resource sync partners (Leave empty to not sync)"), piWidget); | 381 | lab = new QLabel( i18n("Local/remote Resource sync partners (Leave empty to not sync)"), piWidget); |
378 | mTableBox = new QHBox( piWidget ); | 382 | mTableBox = new Q3HBox( piWidget ); |
379 | mResTableKopi = new QTable( 1, 1, mTableBox ); | 383 | mResTableKopi = new Q3Table( 1, 1, mTableBox ); |
380 | mResTableKapi = new QTable( 1, 1, mTableBox ); | 384 | mResTableKapi = new Q3Table( 1, 1, mTableBox ); |
381 | mResTablePwmpi = new QTable( 1, 1, mTableBox ); | 385 | mResTablePwmpi = new Q3Table( 1, 1, mTableBox ); |
382 | mResTableKopi->horizontalHeader()->setLabel( 0, i18n("Remote") ); | 386 | mResTableKopi->horizontalHeader()->setLabel( 0, i18n("Remote") ); |
@@ -470,3 +474,3 @@ void KSyncPrefsDialog::slotOK() | |||
470 | for (i = 0; i < mSyncProfileNames.count(); ++ i) { | 474 | for (i = 0; i < mSyncProfileNames.count(); ++ i) { |
471 | if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) { | 475 | if ( mSyncProfileNames.count( mSyncProfileNames[i]) > 1 ) { |
472 | KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error")); | 476 | KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error")); |