summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncprefsdialog.cpp
Unidiff
Diffstat (limited to 'libkdepim/ksyncprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncprefsdialog.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 0caa27e..ee092b9 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -99,397 +99,397 @@ void KSyncPrefsDialog::setupSyncAlgTab()
99 connect ( button, SIGNAL( clicked()), this, SLOT (reject() ) ); 99 connect ( button, SIGNAL( clicked()), this, SLOT (reject() ) );
100 //QBoxLayout * sl = new QVBoxLayout(this ); 100 //QBoxLayout * sl = new QVBoxLayout(this );
101 //sl->addWidget ( sv ); 101 //sl->addWidget ( sv );
102 sv->setResizePolicy ( QScrollView::AutoOneFit ); 102 sv->setResizePolicy ( QScrollView::AutoOneFit );
103 QFrame *topFrame = new QFrame ( sv ); 103 QFrame *topFrame = new QFrame ( sv );
104 sv->addChild( topFrame ); 104 sv->addChild( topFrame );
105 mSetupSyncAlgTab = topFrame; 105 mSetupSyncAlgTab = topFrame;
106 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 106 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
107 topLayout->setSpacing(spacingHint()); 107 topLayout->setSpacing(spacingHint());
108 topLayout->setMargin(marginHint()); 108 topLayout->setMargin(marginHint());
109 109
110 //lab = new QLabel(i18n("Sync settings not yet implemented. DO NOT USE!"), topFrame); 110 //lab = new QLabel(i18n("Sync settings not yet implemented. DO NOT USE!"), topFrame);
111 int iii = 0; 111 int iii = 0;
112 //topLayout->addMultiCellWidget(lab , iii,iii,0,1); 112 //topLayout->addMultiCellWidget(lab , iii,iii,0,1);
113 //++iii; 113 //++iii;
114 114
115 mMyMachineName = new QLineEdit(topFrame); 115 mMyMachineName = new QLineEdit(topFrame);
116 lab = new QLabel(mMyMachineName, i18n("Local device name:"), topFrame); 116 lab = new QLabel(mMyMachineName, i18n("Local device name:"), topFrame);
117 topLayout->addWidget(lab ,iii,0); 117 topLayout->addWidget(lab ,iii,0);
118 topLayout->addWidget(mMyMachineName,iii,1); 118 topLayout->addWidget(mMyMachineName,iii,1);
119 ++iii; 119 ++iii;
120 120
121 QHBox* buttonbox = new QHBox( topFrame); 121 QHBox* buttonbox = new QHBox( topFrame);
122 topLayout->addMultiCellWidget(buttonbox, iii,iii,0,1); 122 topLayout->addMultiCellWidget(buttonbox, iii,iii,0,1);
123 ++iii; 123 ++iii;
124 button = new QPushButton( i18n("New profile"), buttonbox ); 124 button = new QPushButton( i18n("New profile"), buttonbox );
125 connect ( button, SIGNAL( clicked()), this, SLOT (newProfile() ) ); 125 connect ( button, SIGNAL( clicked()), this, SLOT (newProfile() ) );
126 126
127 button = new QPushButton( i18n("Clone profile"), buttonbox ); 127 button = new QPushButton( i18n("Clone profile"), buttonbox );
128 connect ( button, SIGNAL( clicked()), this, SLOT ( cloneProfile() ) ); 128 connect ( button, SIGNAL( clicked()), this, SLOT ( cloneProfile() ) );
129 129
130 button = new QPushButton( i18n("Delete profile"), buttonbox ); 130 button = new QPushButton( i18n("Delete profile"), buttonbox );
131 connect ( button, SIGNAL( clicked()), this, SLOT (deleteProfile() ) ); 131 connect ( button, SIGNAL( clicked()), this, SLOT (deleteProfile() ) );
132 132
133 mProfileBox = new QComboBox(topFrame); 133 mProfileBox = new QComboBox(topFrame);
134 mProfileBox->setEditable ( true ); 134 mProfileBox->setEditable ( true );
135 mProfileBox->setInsertionPolicy(QComboBox::NoInsertion); 135 mProfileBox->setInsertionPolicy(QComboBox::NoInsertion);
136 connect ( mProfileBox, SIGNAL(activated ( int ) ), this, SLOT (profileChanged( int ) ) ); 136 connect ( mProfileBox, SIGNAL(activated ( int ) ), this, SLOT (profileChanged( int ) ) );
137 connect ( mProfileBox, SIGNAL( textChanged ( const QString & ) ), this, SLOT (textChanged( const QString & ) ) ); 137 connect ( mProfileBox, SIGNAL( textChanged ( const QString & ) ), this, SLOT (textChanged( const QString & ) ) );
138 138
139 lab = new QLabel(mProfileBox, i18n("Profile:"), topFrame); 139 lab = new QLabel(mProfileBox, i18n("Profile:"), topFrame);
140 topLayout->addWidget(lab ,iii,0); 140 topLayout->addWidget(lab ,iii,0);
141 topLayout->addWidget(mProfileBox, iii,1); 141 topLayout->addWidget(mProfileBox, iii,1);
142 ++iii; 142 ++iii;
143 143
144 mIncludeInRing = new QCheckBox( i18n("Include in multiple calendar sync"), topFrame ); 144 mIncludeInRing = new QCheckBox( i18n("Include in multiple calendar sync"), topFrame );
145 topLayout->addMultiCellWidget(mIncludeInRing, iii,iii,0,1); 145 topLayout->addMultiCellWidget(mIncludeInRing, iii,iii,0,1);
146 ++iii; 146 ++iii;
147 mIncludeInRingAB = new QCheckBox( i18n("Include in multiple addressbook sync"), topFrame ); 147 mIncludeInRingAB = new QCheckBox( i18n("Include in multiple addressbook sync"), topFrame );
148 topLayout->addMultiCellWidget(mIncludeInRingAB, iii,iii,0,1); 148 topLayout->addMultiCellWidget(mIncludeInRingAB, iii,iii,0,1);
149 ++iii; 149 ++iii;
150 mIncludeInRingPWM = new QCheckBox( i18n("Include in multiple pwmanager sync"), topFrame ); 150 mIncludeInRingPWM = new QCheckBox( i18n("Include in multiple pwmanager sync"), topFrame );
151 topLayout->addMultiCellWidget(mIncludeInRingPWM, iii,iii,0,1); 151 topLayout->addMultiCellWidget(mIncludeInRingPWM, iii,iii,0,1);
152 ++iii; 152 ++iii;
153 153
154 mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame ); 154 mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame );
155 topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1); 155 topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1);
156 ++iii; 156 ++iii;
157 QButtonGroup* gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame); 157 QButtonGroup* gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame);
158 topLayout->addMultiCellWidget(gr, iii,iii,0,1); 158 topLayout->addMultiCellWidget(gr, iii,iii,0,1);
159 ++iii; 159 ++iii;
160 loc = new QRadioButton ( i18n("Take local entry on conflict"), gr ); 160 loc = new QRadioButton ( i18n("Take local entry on conflict"), gr );
161 rem = new QRadioButton ( i18n("Take remote entry on conflict"), gr ); 161 rem = new QRadioButton ( i18n("Take remote entry on conflict"), gr );
162 newest = new QRadioButton ( i18n("Take newest entry on conflict"), gr ); 162 newest = new QRadioButton ( i18n("Take newest entry on conflict"), gr );
163 ask = new QRadioButton ( i18n("Ask for every entry on conflict"), gr ); 163 ask = new QRadioButton ( i18n("Ask for every entry on conflict"), gr );
164 f_loc= new QRadioButton ( i18n("Force: Take local entry always"), gr ); 164 f_loc= new QRadioButton ( i18n("Force: Take local entry always"), gr );
165 f_rem = new QRadioButton ( i18n("Force: Take remote entry always"), gr ); 165 f_rem = new QRadioButton ( i18n("Force: Take remote entry always"), gr );
166 // both = new QRadioButton ( i18n("Take both on conflict"), gr ); 166 // both = new QRadioButton ( i18n("Take both on conflict"), gr );
167 167
168 mShowSummaryAfterSync = new QCheckBox( i18n("Show summary after sync"), topFrame ); 168 mShowSummaryAfterSync = new QCheckBox( i18n("Show summary after sync"), topFrame );
169 topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1); 169 topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1);
170 ++iii; 170 ++iii;
171 171
172 mWriteBackFile = new QCheckBox( i18n("Write back synced data"), topFrame ); 172 mWriteBackFile = new QCheckBox( i18n("Write back synced data"), topFrame );
173 topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1); 173 topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1);
174 ++iii; 174 ++iii;
175 175
176 mWriteBackExisting= new QCheckBox( i18n("-- Write back (on remote) existing entries only"), topFrame ); 176 mWriteBackExisting= new QCheckBox( i18n("-- Write back (on remote) existing entries only"), topFrame );
177 topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1); 177 topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1);
178 ++iii; 178 ++iii;
179 179
180 mWriteBackFuture= new QCheckBox( i18n("-- Write back (calendar) entries in future only"), topFrame ); 180 mWriteBackFuture= new QCheckBox( i18n("-- Write back (calendar) entries in future only"), topFrame );
181 topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1); 181 topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1);
182 ++iii; 182 ++iii;
183 topLayout->addMultiCellWidget(new QLabel( i18n("---- Max. weeks in future: ") , topFrame ), iii,iii,0,0); 183 topLayout->addMultiCellWidget(new QLabel( i18n("---- Max. weeks in future: ") , topFrame ), iii,iii,0,0);
184 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, topFrame); 184 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, topFrame);
185 topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1); 185 topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1);
186 ++iii; 186 ++iii;
187 187
188 proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame); 188 proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame);
189 gr = proGr; 189 gr = proGr;
190 topLayout->addMultiCellWidget(gr, iii,iii,0,1); 190 topLayout->addMultiCellWidget(gr, iii,iii,0,1);
191 ++iii; 191 ++iii;
192 mIsLocal = new QRadioButton ( i18n("Local file"), gr ); 192 mIsLocal = new QRadioButton ( i18n("Local file"), gr );
193 mIsPi = new QRadioButton ( i18n("Pi-Sync ( direct Kx/Pi to Kx/Pi sync )"), gr ); 193 mIsPi = new QRadioButton ( i18n("Pi-Sync ( direct Kx/Pi to Kx/Pi sync )"), gr );
194 connect (mIsPi, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 194 connect (mIsPi, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
195 mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr ); 195 mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr );
196 connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 196 connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
197 mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr ); 197 mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr );
198 connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 198 connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
199 199
200 200
201 phoneWidget = new QVBox( topFrame); 201 phoneWidget = new QVBox( topFrame);
202 topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1); 202 topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1);
203 ++iii; 203 ++iii;
204 mWriteContactToSIM= new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget ); 204 mWriteContactToSIM= new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget );
205 QHBox* temphb = new QHBox( phoneWidget ); 205 QHBox* temphb = new QHBox( phoneWidget );
206 new QLabel( i18n("I/O device: "), temphb ); 206 new QLabel( i18n("I/O device: "), temphb );
207 mPhoneDevice = new QLineEdit( temphb); 207 mPhoneDevice = new QLineEdit( temphb);
208 button = new QPushButton( i18n("Help..."), temphb ); 208 button = new QPushButton( i18n("Help..."), temphb );
209 connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) ); 209 connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) );
210 210
211 211
212 temphb = new QHBox( phoneWidget ); 212 temphb = new QHBox( phoneWidget );
213 new QLabel( i18n("Connection: "), temphb ); 213 new QLabel( i18n("Connection: "), temphb );
214 mPhoneConnection = new QLineEdit( temphb); 214 mPhoneConnection = new QLineEdit( temphb);
215 button = new QPushButton( i18n("Help..."), temphb ); 215 button = new QPushButton( i18n("Help..."), temphb );
216 connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) ); 216 connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) );
217 217
218 218
219 temphb = new QHBox( phoneWidget ); 219 temphb = new QHBox( phoneWidget );
220 new QLabel( i18n("Model(opt.): "), temphb ); 220 new QLabel( i18n("Model(opt.): "), temphb );
221 mPhoneModel = new QLineEdit( temphb); 221 mPhoneModel = new QLineEdit( temphb);
222 button = new QPushButton( i18n("Help..."), temphb ); 222 button = new QPushButton( i18n("Help..."), temphb );
223 connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) ); 223 connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) );
224 224
225 // *** local 225 // *** local
226 localFileWidget = new QVBox( topFrame); 226 localFileWidget = new QVBox( topFrame);
227 topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1); 227 topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1);
228 ++iii; 228 ++iii;
229 temphb = new QHBox( localFileWidget ); 229 temphb = new QHBox( localFileWidget );
230 230
231 lab = new QLabel( i18n("Local file Cal:"), temphb ); 231 lab = new QLabel( i18n("Local file Cal:"), temphb );
232 lab = new QLabel( i18n("Local file ABook:"), temphb ); 232 lab = new QLabel( i18n("Local file ABook:"), temphb );
233 lab = new QLabel( i18n("Local file PWMgr:"), temphb ); 233 lab = new QLabel( i18n("Local file PWMgr:"), temphb );
234 temphb = new QHBox( localFileWidget ); 234 temphb = new QHBox( localFileWidget );
235 button = new QPushButton( i18n("Choose..."), temphb ); 235 button = new QPushButton( i18n("Choose..."), temphb );
236 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) ); 236 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) );
237 button = new QPushButton( i18n("Choose..."), temphb ); 237 button = new QPushButton( i18n("Choose..."), temphb );
238 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) ); 238 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) );
239 button = new QPushButton( i18n("Choose..."), temphb ); 239 button = new QPushButton( i18n("Choose..."), temphb );
240 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) ); 240 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) );
241 temphb = new QHBox( localFileWidget ); 241 temphb = new QHBox( localFileWidget );
242 242
243 mRemoteFile = new QLineEdit( temphb); 243 mRemoteFile = new QLineEdit( temphb);
244 mRemoteFileAB = new QLineEdit( temphb); 244 mRemoteFileAB = new QLineEdit( temphb);
245 mRemoteFilePWM = new QLineEdit( temphb); 245 mRemoteFilePWM = new QLineEdit( temphb);
246 246
247 // *** remote 247 // *** remote
248 remoteFileWidget = new QVBox( topFrame); 248 remoteFileWidget = new QVBox( topFrame);
249 topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1); 249 topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1);
250 ++iii; 250 ++iii;
251 temphb = new QHBox( remoteFileWidget ); 251 temphb = new QHBox( remoteFileWidget );
252 new QLabel( i18n("Calendar:"), temphb); 252 new QLabel( i18n("Calendar:"), temphb);
253 new QLabel( i18n("AddressBook:"), temphb); 253 new QLabel( i18n("AddressBook:"), temphb);
254 new QLabel( i18n("PWManager:"), temphb); 254 new QLabel( i18n("PWManager:"), temphb);
255 255
256 lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget); 256 lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget);
257 temphb = new QHBox( remoteFileWidget ); 257 temphb = new QHBox( remoteFileWidget );
258 mRemotePrecommand = new QLineEdit(temphb); 258 mRemotePrecommand = new QLineEdit(temphb);
259 mRemotePrecommandAB = new QLineEdit(temphb); 259 mRemotePrecommandAB = new QLineEdit(temphb);
260 mRemotePrecommandPWM = new QLineEdit(temphb); 260 mRemotePrecommandPWM = new QLineEdit(temphb);
261 261
262 lab = new QLabel( i18n("Local temp file:"), remoteFileWidget); 262 lab = new QLabel( i18n("Local temp file:"), remoteFileWidget);
263 temphb = new QHBox( remoteFileWidget ); 263 temphb = new QHBox( remoteFileWidget );
264 mLocalTempFile = new QLineEdit(temphb); 264 mLocalTempFile = new QLineEdit(temphb);
265 mLocalTempFileAB = new QLineEdit(temphb); 265 mLocalTempFileAB = new QLineEdit(temphb);
266 mLocalTempFilePWM = new QLineEdit(temphb); 266 mLocalTempFilePWM = new QLineEdit(temphb);
267 267
268 lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget); 268 lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget);
269 temphb = new QHBox( remoteFileWidget ); 269 temphb = new QHBox( remoteFileWidget );
270 mRemotePostcommand = new QLineEdit(temphb ); 270 mRemotePostcommand = new QLineEdit(temphb );
271 mRemotePostcommandAB = new QLineEdit(temphb ); 271 mRemotePostcommandAB = new QLineEdit(temphb );
272 mRemotePostcommandPWM = new QLineEdit(temphb ); 272 mRemotePostcommandPWM = new QLineEdit(temphb );
273 273
274 lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget); 274 lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget);
275 temphb = new QHBox( remoteFileWidget ); 275 temphb = new QHBox( remoteFileWidget );
276 button = new QPushButton( i18n("ssh/scp"), temphb ); 276 button = new QPushButton( i18n("ssh/scp"), temphb );
277 connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) ); 277 connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) );
278 button = new QPushButton( i18n("ftp"), temphb ); 278 button = new QPushButton( i18n("ftp"), temphb );
279 connect ( button, SIGNAL( clicked()), this, SLOT (fillFTP() ) ); 279 connect ( button, SIGNAL( clicked()), this, SLOT (fillFTP() ) );
280 lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget); 280 lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget);
281 281
282 // *** pi-sync 282 // *** pi-sync
283 piWidget = new QVBox( topFrame); 283 piWidget = new QVBox( topFrame);
284 topLayout->addMultiCellWidget(piWidget, iii,iii,0,1); 284 topLayout->addMultiCellWidget(piWidget, iii,iii,0,1);
285 ++iii; 285 ++iii;
286 temphb = new QHBox( piWidget ); 286 temphb = new QHBox( piWidget );
287 new QLabel( i18n("Calendar:"), temphb); 287 new QLabel( i18n("Calendar:"), temphb);
288 new QLabel( i18n("AddressBook:"), temphb); 288 new QLabel( i18n("AddressBook:"), temphb);
289 new QLabel( i18n("PWManager:"), temphb); 289 new QLabel( i18n("PWManager:"), temphb);
290 290
291 lab = new QLabel( i18n("Password for remote access:"), piWidget); 291 lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget);
292 temphb = new QHBox( piWidget ); 292 temphb = new QHBox( piWidget );
293 mRemotePw = new QLineEdit(temphb); 293 mRemotePw = new QLineEdit(temphb);
294 mRemotePwAB = new QLineEdit(temphb); 294 mRemotePwAB = new QLineEdit(temphb);
295 mRemotePwPWM = new QLineEdit(temphb); 295 mRemotePwPWM = new QLineEdit(temphb);
296 296
297 lab = new QLabel( i18n("Remote IP address:"), piWidget); 297 lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget);
298 temphb = new QHBox( piWidget ); 298 temphb = new QHBox( piWidget );
299 mRemoteIP = new QLineEdit(temphb); 299 mRemoteIP = new QLineEdit(temphb);
300 mRemoteIPAB = new QLineEdit(temphb); 300 mRemoteIPAB = new QLineEdit(temphb);
301 mRemoteIPPWM = new QLineEdit(temphb); 301 mRemoteIPPWM = new QLineEdit(temphb);
302 302
303 lab = new QLabel( i18n("Remote port number:"), piWidget); 303 lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget);
304 temphb = new QHBox( piWidget ); 304 temphb = new QHBox( piWidget );
305 mRemotePort = new QLineEdit(temphb); 305 mRemotePort = new QLineEdit(temphb);
306 mRemotePortAB = new QLineEdit(temphb); 306 mRemotePortAB = new QLineEdit(temphb);
307 mRemotePortPWM = new QLineEdit(temphb); 307 mRemotePortPWM = new QLineEdit(temphb);
308 308
309} 309}
310 310
311 311
312 312
313 313
314 314
315void KSyncPrefsDialog::slotOK() 315void KSyncPrefsDialog::slotOK()
316{ 316{
317 if ( mMyMachineName->text() == "undefined" ) { 317 if ( mMyMachineName->text() == "undefined" ) {
318 KMessageBox::error(this,i18n("Local device name undefined!\nPlease define device name!"),i18n("KO/Pi config error")); 318 KMessageBox::error(this,i18n("Local device name undefined!\nPlease define device name!"),i18n("KO/Pi config error"));
319 return; 319 return;
320 } 320 }
321 int i; 321 int i;
322 for (i = 0; i < mSyncProfileNames.count(); ++ i) { 322 for (i = 0; i < mSyncProfileNames.count(); ++ i) {
323 if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) { 323 if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) {
324 KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error")); 324 KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error"));
325 return; 325 return;
326 } 326 }
327 } 327 }
328 usrWriteConfig(); 328 usrWriteConfig();
329 QDialog::accept(); 329 QDialog::accept();
330} 330}
331void KSyncPrefsDialog::accept() 331void KSyncPrefsDialog::accept()
332{ 332{
333 slotOK(); 333 slotOK();
334} 334}
335void KSyncPrefsDialog::chooseFile() 335void KSyncPrefsDialog::chooseFile()
336{ 336{
337 QString fn = QDir::homeDirPath(); 337 QString fn = QDir::homeDirPath();
338 338
339 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.ics/*.vcs)"), this ); 339 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.ics/*.vcs)"), this );
340 if ( fn == "" ) 340 if ( fn == "" )
341 return; 341 return;
342 mRemoteFile->setText( fn ); 342 mRemoteFile->setText( fn );
343} 343}
344 344
345void KSyncPrefsDialog::chooseFileAB() 345void KSyncPrefsDialog::chooseFileAB()
346{ 346{
347 QString fn = QDir::homeDirPath(); 347 QString fn = QDir::homeDirPath();
348 348
349 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.vcf)"), this ); 349 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.vcf)"), this );
350 if ( fn == "" ) 350 if ( fn == "" )
351 return; 351 return;
352 mRemoteFileAB->setText( fn ); 352 mRemoteFileAB->setText( fn );
353} 353}
354 354
355void KSyncPrefsDialog::chooseFilePWM() 355void KSyncPrefsDialog::chooseFilePWM()
356{ 356{
357 QString fn = QDir::homeDirPath(); 357 QString fn = QDir::homeDirPath();
358 358
359 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.pwm)"), this ); 359 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.pwm)"), this );
360 if ( fn == "" ) 360 if ( fn == "" )
361 return; 361 return;
362 mRemoteFilePWM->setText( fn ); 362 mRemoteFilePWM->setText( fn );
363} 363}
364 364
365void KSyncPrefsDialog::textChanged( const QString & s ) 365void KSyncPrefsDialog::textChanged( const QString & s )
366{ 366{
367 if ( mProfileBox->count() == 0 ) 367 if ( mProfileBox->count() == 0 )
368 return; 368 return;
369 if ( currentSelection < 3 ) { 369 if ( currentSelection < 3 ) {
370 //KMessageBox::error(this,i18n("This profil name\ncannot be edited!\n"),i18n("KO/Pi config error")); 370 //KMessageBox::error(this,i18n("This profil name\ncannot be edited!\n"),i18n("KO/Pi config error"));
371 mProfileBox->blockSignals( true ); 371 mProfileBox->blockSignals( true );
372 mProfileBox->setCurrentItem(mProfileBox-> currentItem ()); 372 mProfileBox->setCurrentItem(mProfileBox-> currentItem ());
373 mProfileBox->blockSignals( false ); 373 mProfileBox->blockSignals( false );
374 return; 374 return;
375 } 375 }
376 //qDebug("cur i %d ",mProfileBox-> currentItem () ); 376 //qDebug("cur i %d ",mProfileBox-> currentItem () );
377 mProfileBox->changeItem ( s, mProfileBox-> currentItem () ) ; 377 mProfileBox->changeItem ( s, mProfileBox-> currentItem () ) ;
378 KSyncProfile* prof = mSyncProfiles.at(mProfileBox-> currentItem ()) ; 378 KSyncProfile* prof = mSyncProfiles.at(mProfileBox-> currentItem ()) ;
379 prof->setName( s ); 379 prof->setName( s );
380 mSyncProfileNames[mProfileBox-> currentItem ()] = s; 380 mSyncProfileNames[mProfileBox-> currentItem ()] = s;
381} 381}
382void KSyncPrefsDialog::profileChanged( int item ) 382void KSyncPrefsDialog::profileChanged( int item )
383{ 383{
384 //qDebug("KSyncPrefsDialog::profileChanged before %d, count %d ", item, mProfileBox->count() ); 384 //qDebug("KSyncPrefsDialog::profileChanged before %d, count %d ", item, mProfileBox->count() );
385 KSyncProfile* prof; 385 KSyncProfile* prof;
386 saveProfile(); 386 saveProfile();
387 currentSelection = item; 387 currentSelection = item;
388 prof = mSyncProfiles.at(item) ; 388 prof = mSyncProfiles.at(item) ;
389 389
390 mRemotePw->setText(prof->getRemotePw()); 390 mRemotePw->setText(prof->getRemotePw());
391 mRemoteIP->setText(prof->getRemoteIP()); 391 mRemoteIP->setText(prof->getRemoteIP());
392 mRemotePort->setText(prof->getRemotePort()); 392 mRemotePort->setText(prof->getRemotePort());
393 393
394 mRemotePwAB->setText(prof->getRemotePwAB()); 394 mRemotePwAB->setText(prof->getRemotePwAB());
395 mRemoteIPAB->setText(prof->getRemoteIPAB()); 395 mRemoteIPAB->setText(prof->getRemoteIPAB());
396 mRemotePortAB->setText(prof->getRemotePortAB()); 396 mRemotePortAB->setText(prof->getRemotePortAB());
397 397
398 mRemotePwPWM->setText(prof->getRemotePwPWM()); 398 mRemotePwPWM->setText(prof->getRemotePwPWM());
399 mRemoteIPPWM->setText(prof->getRemoteIPPWM()); 399 mRemoteIPPWM->setText(prof->getRemoteIPPWM());
400 mRemotePortPWM->setText(prof->getRemotePortPWM()); 400 mRemotePortPWM->setText(prof->getRemotePortPWM());
401 401
402 mRemotePrecommand->setText(prof->getPreSyncCommand()); 402 mRemotePrecommand->setText(prof->getPreSyncCommand());
403 mRemotePostcommand->setText(prof->getPostSyncCommand()); 403 mRemotePostcommand->setText(prof->getPostSyncCommand());
404 mLocalTempFile->setText(prof->getLocalTempFile()); 404 mLocalTempFile->setText(prof->getLocalTempFile());
405 mRemoteFile->setText(prof->getRemoteFileName()) ; 405 mRemoteFile->setText(prof->getRemoteFileName()) ;
406 406
407 mRemotePrecommandAB->setText(prof->getPreSyncCommandAB()); 407 mRemotePrecommandAB->setText(prof->getPreSyncCommandAB());
408 mRemotePostcommandAB->setText(prof->getPostSyncCommandAB()); 408 mRemotePostcommandAB->setText(prof->getPostSyncCommandAB());
409 mLocalTempFileAB->setText(prof->getLocalTempFileAB()); 409 mLocalTempFileAB->setText(prof->getLocalTempFileAB());
410 mRemoteFileAB->setText(prof->getRemoteFileNameAB()) ; 410 mRemoteFileAB->setText(prof->getRemoteFileNameAB()) ;
411 411
412 mRemotePrecommandPWM->setText(prof->getPreSyncCommandPWM()); 412 mRemotePrecommandPWM->setText(prof->getPreSyncCommandPWM());
413 mRemotePostcommandPWM->setText(prof->getPostSyncCommandPWM()); 413 mRemotePostcommandPWM->setText(prof->getPostSyncCommandPWM());
414 mLocalTempFilePWM->setText(prof->getLocalTempFilePWM()); 414 mLocalTempFilePWM->setText(prof->getLocalTempFilePWM());
415 mRemoteFilePWM->setText(prof->getRemoteFileNamePWM()) ; 415 mRemoteFilePWM->setText(prof->getRemoteFileNamePWM()) ;
416 416
417 mWriteContactToSIM->setChecked( prof->getWriteContactToSIM()); 417 mWriteContactToSIM->setChecked( prof->getWriteContactToSIM());
418 mPhoneDevice->setText(prof->getPhoneDevice()); 418 mPhoneDevice->setText(prof->getPhoneDevice());
419 mPhoneConnection->setText(prof->getPhoneConnection()); 419 mPhoneConnection->setText(prof->getPhoneConnection());
420 mPhoneModel->setText(prof->getPhoneModel()); 420 mPhoneModel->setText(prof->getPhoneModel());
421 421
422 mShowSummaryAfterSync->setChecked( prof->getShowSummaryAfterSync()); 422 mShowSummaryAfterSync->setChecked( prof->getShowSummaryAfterSync());
423 mAskForPreferences->setChecked( prof->getAskForPreferences()); 423 mAskForPreferences->setChecked( prof->getAskForPreferences());
424 mWriteBackExisting->setChecked( prof->getWriteBackExisting() ); 424 mWriteBackExisting->setChecked( prof->getWriteBackExisting() );
425 mWriteBackFile->setChecked( prof->getWriteBackFile()); 425 mWriteBackFile->setChecked( prof->getWriteBackFile());
426 mIncludeInRing->setChecked( prof->getIncludeInRingSync() ); 426 mIncludeInRing->setChecked( prof->getIncludeInRingSync() );
427 mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() ); 427 mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() );
428 mIncludeInRingPWM->setChecked( prof->getIncludeInRingSyncPWM() ); 428 mIncludeInRingPWM->setChecked( prof->getIncludeInRingSyncPWM() );
429 mWriteBackFuture->setChecked( prof->getWriteBackFuture()); 429 mWriteBackFuture->setChecked( prof->getWriteBackFuture());
430 mWriteBackFutureWeeks->setValue( prof->getWriteBackFutureWeeks() ); 430 mWriteBackFutureWeeks->setValue( prof->getWriteBackFutureWeeks() );
431 431
432 switch ( prof->getSyncPrefs() ) { 432 switch ( prof->getSyncPrefs() ) {
433 case 0: 433 case 0:
434 loc->setChecked( true); 434 loc->setChecked( true);
435 break; 435 break;
436 case 1: 436 case 1:
437 rem->setChecked( true ); 437 rem->setChecked( true );
438 break; 438 break;
439 case 2: 439 case 2:
440 newest->setChecked( true); 440 newest->setChecked( true);
441 break; 441 break;
442 case 3: 442 case 3:
443 ask->setChecked( true); 443 ask->setChecked( true);
444 break; 444 break;
445 case 4: 445 case 4:
446 f_loc->setChecked( true); 446 f_loc->setChecked( true);
447 break; 447 break;
448 case 5: 448 case 5:
449 f_rem->setChecked( true); 449 f_rem->setChecked( true);
450 break; 450 break;
451 case 6: 451 case 6:
452 //both->setChecked( true); 452 //both->setChecked( true);
453 break; 453 break;
454 default: 454 default:
455 break; 455 break;
456 } 456 }
457 mIsLocal->setChecked(prof->getIsLocalFileSync()) ; 457 mIsLocal->setChecked(prof->getIsLocalFileSync()) ;
458 mIsPhone->setChecked(prof->getIsPhoneSync()) ; 458 mIsPhone->setChecked(prof->getIsPhoneSync()) ;
459 mIsPi->setChecked(prof->getIsPiSync()) ; 459 mIsPi->setChecked(prof->getIsPiSync()) ;
460 mIsNotLocal->setChecked(!prof->getIsLocalFileSync() && !prof->getIsPhoneSync() &&!prof->getIsPiSync() ); 460 mIsNotLocal->setChecked(!prof->getIsLocalFileSync() && !prof->getIsPhoneSync() &&!prof->getIsPiSync() );
461 proGr->setEnabled( item > 2 ); 461 proGr->setEnabled( item > 2 );
462 if ( item < 3 ) { 462 if ( item < 3 ) {
463 localFileWidget->hide(); 463 localFileWidget->hide();
464 remoteFileWidget->hide(); 464 remoteFileWidget->hide();
465 phoneWidget->hide(); 465 phoneWidget->hide();
466 piWidget->hide(); 466 piWidget->hide();
467 467
468 } else 468 } else
469 kindChanged( prof->getIsLocalFileSync() ); 469 kindChanged( prof->getIsLocalFileSync() );
470} 470}
471 471
472void KSyncPrefsDialog::fillSSH() 472void KSyncPrefsDialog::fillSSH()
473{ 473{
474 mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); 474 mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" );
475 mLocalTempFile->setText("/tmp/mycalendar.ics" ); 475 mLocalTempFile->setText("/tmp/mycalendar.ics" );
476 mRemotePostcommand->setText("scp /tmp/mycalendar.ics zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics" ); 476 mRemotePostcommand->setText("scp /tmp/mycalendar.ics zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics" );
477 mRemotePrecommandAB->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); 477 mRemotePrecommandAB->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf /tmp/std.vcf" );
478 mLocalTempFileAB->setText("/tmp/std.vcf" ); 478 mLocalTempFileAB->setText("/tmp/std.vcf" );
479 mRemotePostcommandAB->setText("scp /tmp/std.vcf zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf" ); 479 mRemotePostcommandAB->setText("scp /tmp/std.vcf zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf" );
480 mRemotePrecommandPWM->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" ); 480 mRemotePrecommandPWM->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" );
481 mLocalTempFilePWM->setText("/tmp/passwords.pwm" ); 481 mLocalTempFilePWM->setText("/tmp/passwords.pwm" );
482 mRemotePostcommandPWM->setText("scp /tmp/passwords.pwm zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/pwmanager.pwm" ); 482 mRemotePostcommandPWM->setText("scp /tmp/passwords.pwm zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/pwmanager.pwm" );
483} 483}
484void KSyncPrefsDialog::fillFTP() 484void KSyncPrefsDialog::fillFTP()
485{ 485{
486 mRemotePrecommand->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics" ); 486 mRemotePrecommand->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics" );
487 mLocalTempFile->setText("/tmp/mycalendar.ics" ); 487 mLocalTempFile->setText("/tmp/mycalendar.ics" );
488 mRemotePostcommand->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); 488 mRemotePostcommand->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" );
489 mRemotePrecommandAB->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf" ); 489 mRemotePrecommandAB->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf" );
490 mLocalTempFileAB->setText("/tmp/std.vcf" ); 490 mLocalTempFileAB->setText("/tmp/std.vcf" );
491 mRemotePostcommandAB->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); 491 mRemotePostcommandAB->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf /tmp/std.vcf" );
492 492
493 mRemotePrecommandPWM->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm" ); 493 mRemotePrecommandPWM->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm" );
494 mLocalTempFilePWM->setText("/tmp/passwords.pwm" ); 494 mLocalTempFilePWM->setText("/tmp/passwords.pwm" );
495 mRemotePostcommandPWM->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" ); 495 mRemotePostcommandPWM->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" );