Diffstat (limited to 'libkdepim/ksyncprefsdialog.cpp') (more/less context) (show 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 | |||
@@ -23,28 +23,32 @@ | |||
23 | 23 | ||
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
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> |
29 | #include <qfont.h> | 29 | #include <qfont.h> |
30 | #include <qslider.h> | 30 | #include <qslider.h> |
31 | #include <qfile.h> | 31 | #include <qfile.h> |
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> |
38 | #include <qdatetime.h> | 38 | #include <qdatetime.h> |
39 | #include <qcheckbox.h> | 39 | #include <qcheckbox.h> |
40 | #include <qradiobutton.h> | 40 | #include <qradiobutton.h> |
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 | ||
49 | #include <kcolorbutton.h> | 53 | #include <kcolorbutton.h> |
50 | #include <kdebug.h> | 54 | #include <kdebug.h> |
@@ -89,11 +93,11 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
89 | { | 93 | { |
90 | QLabel * lab; | 94 | QLabel * lab; |
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 | ||
98 | QPushButton* button = new QPushButton( i18n("Ok"), b_box ); | 102 | QPushButton* button = new QPushButton( i18n("Ok"), b_box ); |
99 | connect ( button, SIGNAL( clicked()), this, SLOT (slotOK() ) ); | 103 | connect ( button, SIGNAL( clicked()), this, SLOT (slotOK() ) ); |
@@ -101,11 +105,11 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
101 | connect ( button, SIGNAL( clicked()), this, SLOT (reject() ) ); | 105 | connect ( button, SIGNAL( clicked()), this, SLOT (reject() ) ); |
102 | //QBoxLayout * sl = new QVBoxLayout(this ); | 106 | //QBoxLayout * sl = new QVBoxLayout(this ); |
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()); |
110 | topLayout->setMargin(marginHint()); | 114 | topLayout->setMargin(marginHint()); |
111 | 115 | ||
@@ -120,7 +124,7 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
120 | topLayout->addWidget(mMyMachineName,iii,1); | 124 | topLayout->addWidget(mMyMachineName,iii,1); |
121 | ++iii; | 125 | ++iii; |
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); |
125 | ++iii; | 129 | ++iii; |
126 | button = new QPushButton( i18n("New profile"), buttonbox ); | 130 | button = new QPushButton( i18n("New profile"), buttonbox ); |
@@ -145,7 +149,7 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
145 | 149 | ||
146 | 150 | ||
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 ); |
150 | mIncludeInRing = new QCheckBox( i18n("calendar "), iims ); | 154 | mIncludeInRing = new QCheckBox( i18n("calendar "), iims ); |
151 | mIncludeInRingAB = new QCheckBox( i18n("addressbook "), iims ); | 155 | mIncludeInRingAB = new QCheckBox( i18n("addressbook "), iims ); |
@@ -153,19 +157,19 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
153 | new QLabel( i18n(" sync"), iims ); | 157 | new QLabel( i18n(" sync"), iims ); |
154 | topLayout->addMultiCellWidget(iims, iii,iii,0,1); | 158 | topLayout->addMultiCellWidget(iims, iii,iii,0,1); |
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 | ||
163 | 167 | ||
164 | 168 | ||
165 | mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame ); | 169 | mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame ); |
166 | //topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1); | 170 | //topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1); |
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); |
170 | //++iii; | 174 | //++iii; |
171 | loc = new QRadioButton ( i18n("Take local entry on conflict"), gr ); | 175 | loc = new QRadioButton ( i18n("Take local entry on conflict"), gr ); |
@@ -181,21 +185,21 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
181 | //++iii; | 185 | //++iii; |
182 | 186 | ||
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 ); |
191 | //mFilterInAB = new QComboBox( fibo2 ); | 195 | //mFilterInAB = new QComboBox( fibo2 ); |
192 | } | 196 | } |
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 ); |
200 | mFilterInAB = new QComboBox( fibo2 ); | 204 | mFilterInAB = new QComboBox( fibo2 ); |
201 | 205 | ||
@@ -203,17 +207,17 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
203 | // topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1); | 207 | // topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1); |
204 | // ++iii; | 208 | // ++iii; |
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); |
208 | //++iii; | 212 | //++iii; |
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 ); |
218 | mFilterOutAB = new QComboBox( fibo ); | 222 | mFilterOutAB = new QComboBox( fibo ); |
219 | //topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1); | 223 | //topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1); |
@@ -221,15 +225,15 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
221 | mWriteBackFuture= new QCheckBox( i18n("Write back (calendar) entries for time period only"), topFrame ); | 225 | mWriteBackFuture= new QCheckBox( i18n("Write back (calendar) entries for time period only"), topFrame ); |
222 | //topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1); | 226 | //topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1); |
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 ) ) ); |
226 | 230 | ||
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 ); |
230 | mWriteBackPastWeeks->setMaximumWidth( 100 ); | 234 | mWriteBackPastWeeks->setMaximumWidth( 100 ); |
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); |
234 | mWriteBackFutureWeeks->setMaximumWidth( 100 ); | 238 | mWriteBackFutureWeeks->setMaximumWidth( 100 ); |
235 | new QLabel( i18n(" weeks in the future ") , tf2 ); | 239 | new QLabel( i18n(" weeks in the future ") , tf2 ); |
@@ -241,7 +245,7 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
241 | connect ( mWriteBackFile, SIGNAL( toggled ( bool ) ), gb2, SLOT ( setEnabled ( bool ) ) ); | 245 | connect ( mWriteBackFile, SIGNAL( toggled ( bool ) ), gb2, SLOT ( setEnabled ( bool ) ) ); |
242 | 246 | ||
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; |
246 | topLayout->addMultiCellWidget(gr, iii,iii,0,1); | 250 | topLayout->addMultiCellWidget(gr, iii,iii,0,1); |
247 | ++iii; | 251 | ++iii; |
@@ -255,7 +259,7 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
255 | mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr ); | 259 | mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr ); |
256 | connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); | 260 | connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); |
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); |
260 | ++iii; | 264 | ++iii; |
261 | 265 | ||
@@ -263,48 +267,48 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
263 | // Profile kind specific settings | 267 | // Profile kind specific settings |
264 | { | 268 | { |
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); |
269 | //++iii; | 273 | //++iii; |
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 ); |
273 | mPhoneDevice = new QLineEdit( temphb); | 277 | mPhoneDevice = new QLineEdit( temphb); |
274 | button = new QPushButton( i18n("Help..."), temphb ); | 278 | button = new QPushButton( i18n("Help..."), temphb ); |
275 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) ); | 279 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) ); |
276 | 280 | ||
277 | 281 | ||
278 | temphb = new QHBox( phoneWidget ); | 282 | temphb = new Q3HBox( phoneWidget ); |
279 | new QLabel( i18n("Connection: "), temphb ); | 283 | new QLabel( i18n("Connection: "), temphb ); |
280 | mPhoneConnection = new QLineEdit( temphb); | 284 | mPhoneConnection = new QLineEdit( temphb); |
281 | button = new QPushButton( i18n("Help..."), temphb ); | 285 | button = new QPushButton( i18n("Help..."), temphb ); |
282 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) ); | 286 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) ); |
283 | 287 | ||
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 ); |
287 | mPhoneModel = new QLineEdit( temphb); | 291 | mPhoneModel = new QLineEdit( temphb); |
288 | button = new QPushButton( i18n("Help..."), temphb ); | 292 | button = new QPushButton( i18n("Help..."), temphb ); |
289 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) ); | 293 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) ); |
290 | 294 | ||
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 | ||
297 | lab = new QLabel( i18n("Local file Cal:"), temphb ); | 301 | lab = new QLabel( i18n("Local file Cal:"), temphb ); |
298 | lab = new QLabel( i18n("Local file ABook:"), temphb ); | 302 | lab = new QLabel( i18n("Local file ABook:"), temphb ); |
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 ); |
302 | connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) ); | 306 | connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) ); |
303 | button = new QPushButton( i18n("Choose..."), temphb ); | 307 | button = new QPushButton( i18n("Choose..."), temphb ); |
304 | connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) ); | 308 | connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) ); |
305 | button = new QPushButton( i18n("Choose..."), temphb ); | 309 | button = new QPushButton( i18n("Choose..."), temphb ); |
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 | ||
309 | mRemoteFile = new QLineEdit( temphb); | 313 | mRemoteFile = new QLineEdit( temphb); |
310 | mRemoteFileAB = new QLineEdit( temphb); | 314 | mRemoteFileAB = new QLineEdit( temphb); |
@@ -313,34 +317,34 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
313 | 317 | ||
314 | 318 | ||
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); |
321 | new QLabel( i18n("AddressBook:"), temphb); | 325 | new QLabel( i18n("AddressBook:"), temphb); |
322 | new QLabel( i18n("PWManager:"), temphb); | 326 | new QLabel( i18n("PWManager:"), temphb); |
323 | 327 | ||
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); |
327 | mRemotePrecommandAB = new QLineEdit(temphb); | 331 | mRemotePrecommandAB = new QLineEdit(temphb); |
328 | mRemotePrecommandPWM = new QLineEdit(temphb); | 332 | mRemotePrecommandPWM = new QLineEdit(temphb); |
329 | 333 | ||
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); |
333 | mLocalTempFileAB = new QLineEdit(temphb); | 337 | mLocalTempFileAB = new QLineEdit(temphb); |
334 | mLocalTempFilePWM = new QLineEdit(temphb); | 338 | mLocalTempFilePWM = new QLineEdit(temphb); |
335 | 339 | ||
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 ); |
339 | mRemotePostcommandAB = new QLineEdit(temphb ); | 343 | mRemotePostcommandAB = new QLineEdit(temphb ); |
340 | mRemotePostcommandPWM = new QLineEdit(temphb ); | 344 | mRemotePostcommandPWM = new QLineEdit(temphb ); |
341 | mIsKapiFileR = new QCheckBox( i18n("Addressbook file is used by KA/Pi"), remoteFileWidget ); | 345 | mIsKapiFileR = new QCheckBox( i18n("Addressbook file is used by KA/Pi"), remoteFileWidget ); |
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 ); |
345 | connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) ); | 349 | connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) ); |
346 | button = new QPushButton( i18n("ftp"), temphb ); | 350 | button = new QPushButton( i18n("ftp"), temphb ); |
@@ -348,37 +352,37 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
348 | lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget); | 352 | lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget); |
349 | 353 | ||
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); |
356 | new QLabel( i18n("AddressBook:"), temphb); | 360 | new QLabel( i18n("AddressBook:"), temphb); |
357 | new QLabel( i18n("PWManager:"), temphb); | 361 | new QLabel( i18n("PWManager:"), temphb); |
358 | 362 | ||
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); |
362 | mRemotePwAB = new QLineEdit(temphb); | 366 | mRemotePwAB = new QLineEdit(temphb); |
363 | mRemotePwPWM = new QLineEdit(temphb); | 367 | mRemotePwPWM = new QLineEdit(temphb); |
364 | 368 | ||
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); |
368 | mRemoteIPAB = new QLineEdit(temphb); | 372 | mRemoteIPAB = new QLineEdit(temphb); |
369 | mRemoteIPPWM = new QLineEdit(temphb); | 373 | mRemoteIPPWM = new QLineEdit(temphb); |
370 | 374 | ||
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); |
374 | mRemotePortAB = new QLineEdit(temphb); | 378 | mRemotePortAB = new QLineEdit(temphb); |
375 | mRemotePortPWM = new QLineEdit(temphb); | 379 | mRemotePortPWM = new QLineEdit(temphb); |
376 | 380 | ||
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") ); |
383 | mResTableKapi->horizontalHeader()->setLabel( 0, i18n("Remote") ); | 387 | mResTableKapi->horizontalHeader()->setLabel( 0, i18n("Remote") ); |
384 | mResTablePwmpi->horizontalHeader()->setLabel( 0, i18n("Remote") ); | 388 | mResTablePwmpi->horizontalHeader()->setLabel( 0, i18n("Remote") ); |
@@ -468,7 +472,7 @@ void KSyncPrefsDialog::slotOK() | |||
468 | } | 472 | } |
469 | int i; | 473 | int i; |
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")); |
473 | return; | 477 | return; |
474 | } | 478 | } |