Diffstat (limited to 'libkdepim/ksyncprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index 6e6e631..28aac45 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp | |||
@@ -71,128 +71,129 @@ | |||
71 | KSyncPrefsDialog::KSyncPrefsDialog(QWidget *parent, char *name, bool modal) : | 71 | KSyncPrefsDialog::KSyncPrefsDialog(QWidget *parent, char *name, bool modal) : |
72 | KDialog(parent,name,true) | 72 | KDialog(parent,name,true) |
73 | { | 73 | { |
74 | 74 | ||
75 | setCaption( i18n("Synchronization Preferences")); | 75 | setCaption( i18n("Synchronization Preferences")); |
76 | 76 | ||
77 | mSyncProfiles.setAutoDelete( true ); | 77 | mSyncProfiles.setAutoDelete( true ); |
78 | setupSyncAlgTab(); | 78 | setupSyncAlgTab(); |
79 | } | 79 | } |
80 | 80 | ||
81 | 81 | ||
82 | KSyncPrefsDialog::~KSyncPrefsDialog() | 82 | KSyncPrefsDialog::~KSyncPrefsDialog() |
83 | { | 83 | { |
84 | } | 84 | } |
85 | 85 | ||
86 | void KSyncPrefsDialog::setupSyncAlgTab() | 86 | void KSyncPrefsDialog::setupSyncAlgTab() |
87 | { | 87 | { |
88 | QLabel * lab; | 88 | QLabel * lab; |
89 | //QFrame *page = addPage(i18n("Sync Prefs"),0,0); | 89 | //QFrame *page = addPage(i18n("Sync Prefs"),0,0); |
90 | QVBox * mainbox = new QVBox( this ); | 90 | QVBox * mainbox = new QVBox( this ); |
91 | QScrollView* sv = new QScrollView( mainbox ); | 91 | QScrollView* sv = new QScrollView( mainbox ); |
92 | QHBoxLayout * lay = new QHBoxLayout( this ); | 92 | QHBoxLayout * lay = new QHBoxLayout( this ); |
93 | lay->addWidget( mainbox ); | 93 | lay->addWidget( mainbox ); |
94 | QHBox * b_box = new QHBox( mainbox ); | 94 | QHBox * b_box = new QHBox( mainbox ); |
95 | 95 | ||
96 | QPushButton* button = new QPushButton( i18n("Ok"), b_box ); | 96 | QPushButton* button = new QPushButton( i18n("Ok"), b_box ); |
97 | connect ( button, SIGNAL( clicked()), this, SLOT (slotOK() ) ); | 97 | connect ( button, SIGNAL( clicked()), this, SLOT (slotOK() ) ); |
98 | button = new QPushButton( i18n("Cancel"), b_box ); | 98 | button = new QPushButton( i18n("Cancel"), b_box ); |
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 | connect ( mProfileBox, SIGNAL(activated ( int ) ), this, SLOT (profileChanged( int ) ) ); | 136 | connect ( mProfileBox, SIGNAL(activated ( int ) ), this, SLOT (profileChanged( int ) ) ); |
136 | connect ( mProfileBox, SIGNAL( textChanged ( const QString & ) ), this, SLOT (textChanged( const QString & ) ) ); | 137 | connect ( mProfileBox, SIGNAL( textChanged ( const QString & ) ), this, SLOT (textChanged( const QString & ) ) ); |
137 | 138 | ||
138 | lab = new QLabel(mProfileBox, i18n("Profile:"), topFrame); | 139 | lab = new QLabel(mProfileBox, i18n("Profile:"), topFrame); |
139 | topLayout->addWidget(lab ,iii,0); | 140 | topLayout->addWidget(lab ,iii,0); |
140 | topLayout->addWidget(mProfileBox, iii,1); | 141 | topLayout->addWidget(mProfileBox, iii,1); |
141 | ++iii; | 142 | ++iii; |
142 | 143 | ||
143 | mIncludeInRing = new QCheckBox( i18n("Include in multiple calendar sync"), topFrame ); | 144 | mIncludeInRing = new QCheckBox( i18n("Include in multiple calendar sync"), topFrame ); |
144 | topLayout->addMultiCellWidget(mIncludeInRing, iii,iii,0,1); | 145 | topLayout->addMultiCellWidget(mIncludeInRing, iii,iii,0,1); |
145 | ++iii; | 146 | ++iii; |
146 | mIncludeInRingAB = new QCheckBox( i18n("Include in multiple addressbook sync"), topFrame ); | 147 | mIncludeInRingAB = new QCheckBox( i18n("Include in multiple addressbook sync"), topFrame ); |
147 | topLayout->addMultiCellWidget(mIncludeInRingAB, iii,iii,0,1); | 148 | topLayout->addMultiCellWidget(mIncludeInRingAB, iii,iii,0,1); |
148 | ++iii; | 149 | ++iii; |
149 | mIncludeInRingPWM = new QCheckBox( i18n("Include in multiple pwmanager sync"), topFrame ); | 150 | mIncludeInRingPWM = new QCheckBox( i18n("Include in multiple pwmanager sync"), topFrame ); |
150 | topLayout->addMultiCellWidget(mIncludeInRingPWM, iii,iii,0,1); | 151 | topLayout->addMultiCellWidget(mIncludeInRingPWM, iii,iii,0,1); |
151 | ++iii; | 152 | ++iii; |
152 | 153 | ||
153 | mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame ); | 154 | mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame ); |
154 | topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1); | 155 | topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1); |
155 | ++iii; | 156 | ++iii; |
156 | QButtonGroup* gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame); | 157 | QButtonGroup* gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame); |
157 | topLayout->addMultiCellWidget(gr, iii,iii,0,1); | 158 | topLayout->addMultiCellWidget(gr, iii,iii,0,1); |
158 | ++iii; | 159 | ++iii; |
159 | loc = new QRadioButton ( i18n("Take local entry on conflict"), gr ); | 160 | loc = new QRadioButton ( i18n("Take local entry on conflict"), gr ); |
160 | rem = new QRadioButton ( i18n("Take remote entry on conflict"), gr ); | 161 | rem = new QRadioButton ( i18n("Take remote entry on conflict"), gr ); |
161 | newest = new QRadioButton ( i18n("Take newest entry on conflict"), gr ); | 162 | newest = new QRadioButton ( i18n("Take newest entry on conflict"), gr ); |
162 | ask = new QRadioButton ( i18n("Ask for every entry on conflict"), gr ); | 163 | ask = new QRadioButton ( i18n("Ask for every entry on conflict"), gr ); |
163 | f_loc= new QRadioButton ( i18n("Force: Take local entry always"), gr ); | 164 | f_loc= new QRadioButton ( i18n("Force: Take local entry always"), gr ); |
164 | f_rem = new QRadioButton ( i18n("Force: Take remote entry always"), gr ); | 165 | f_rem = new QRadioButton ( i18n("Force: Take remote entry always"), gr ); |
165 | // both = new QRadioButton ( i18n("Take both on conflict"), gr ); | 166 | // both = new QRadioButton ( i18n("Take both on conflict"), gr ); |
166 | 167 | ||
167 | mShowSummaryAfterSync = new QCheckBox( i18n("Show summary after sync"), topFrame ); | 168 | mShowSummaryAfterSync = new QCheckBox( i18n("Show summary after sync"), topFrame ); |
168 | topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1); | 169 | topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1); |
169 | ++iii; | 170 | ++iii; |
170 | 171 | ||
171 | mWriteBackFile = new QCheckBox( i18n("Write back synced data"), topFrame ); | 172 | mWriteBackFile = new QCheckBox( i18n("Write back synced data"), topFrame ); |
172 | topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1); | 173 | topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1); |
173 | ++iii; | 174 | ++iii; |
174 | 175 | ||
175 | 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 ); |
176 | topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1); | 177 | topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1); |
177 | ++iii; | 178 | ++iii; |
178 | 179 | ||
179 | 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 ); |
180 | topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1); | 181 | topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1); |
181 | ++iii; | 182 | ++iii; |
182 | 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); |
183 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, topFrame); | 184 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, topFrame); |
184 | topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1); | 185 | topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1); |
185 | ++iii; | 186 | ++iii; |
186 | 187 | ||
187 | proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame); | 188 | proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame); |
188 | gr = proGr; | 189 | gr = proGr; |
189 | topLayout->addMultiCellWidget(gr, iii,iii,0,1); | 190 | topLayout->addMultiCellWidget(gr, iii,iii,0,1); |
190 | ++iii; | 191 | ++iii; |
191 | mIsLocal = new QRadioButton ( i18n("Local file"), gr ); | 192 | mIsLocal = new QRadioButton ( i18n("Local file"), gr ); |
192 | mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr ); | 193 | mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr ); |
193 | connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); | 194 | connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); |
194 | mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr ); | 195 | mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr ); |
195 | connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); | 196 | connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); |
196 | 197 | ||
197 | 198 | ||
198 | phoneWidget = new QVBox( topFrame); | 199 | phoneWidget = new QVBox( topFrame); |
@@ -286,129 +287,129 @@ void KSyncPrefsDialog::slotOK() | |||
286 | } | 287 | } |
287 | int i; | 288 | int i; |
288 | for (i = 0; i < mSyncProfileNames.count(); ++ i) { | 289 | for (i = 0; i < mSyncProfileNames.count(); ++ i) { |
289 | if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) { | 290 | if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) { |
290 | KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error")); | 291 | KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error")); |
291 | return; | 292 | return; |
292 | } | 293 | } |
293 | } | 294 | } |
294 | usrWriteConfig(); | 295 | usrWriteConfig(); |
295 | QDialog::accept(); | 296 | QDialog::accept(); |
296 | } | 297 | } |
297 | void KSyncPrefsDialog::accept() | 298 | void KSyncPrefsDialog::accept() |
298 | { | 299 | { |
299 | slotOK(); | 300 | slotOK(); |
300 | } | 301 | } |
301 | void KSyncPrefsDialog::chooseFile() | 302 | void KSyncPrefsDialog::chooseFile() |
302 | { | 303 | { |
303 | QString fn = QDir::homeDirPath(); | 304 | QString fn = QDir::homeDirPath(); |
304 | 305 | ||
305 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.ics/*.vcs)"), this ); | 306 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.ics/*.vcs)"), this ); |
306 | if ( fn == "" ) | 307 | if ( fn == "" ) |
307 | return; | 308 | return; |
308 | mRemoteFile->setText( fn ); | 309 | mRemoteFile->setText( fn ); |
309 | } | 310 | } |
310 | 311 | ||
311 | void KSyncPrefsDialog::chooseFileAB() | 312 | void KSyncPrefsDialog::chooseFileAB() |
312 | { | 313 | { |
313 | QString fn = QDir::homeDirPath(); | 314 | QString fn = QDir::homeDirPath(); |
314 | 315 | ||
315 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.vcf)"), this ); | 316 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.vcf)"), this ); |
316 | if ( fn == "" ) | 317 | if ( fn == "" ) |
317 | return; | 318 | return; |
318 | mRemoteFileAB->setText( fn ); | 319 | mRemoteFileAB->setText( fn ); |
319 | } | 320 | } |
320 | 321 | ||
321 | void KSyncPrefsDialog::chooseFilePWM() | 322 | void KSyncPrefsDialog::chooseFilePWM() |
322 | { | 323 | { |
323 | QString fn = QDir::homeDirPath(); | 324 | QString fn = QDir::homeDirPath(); |
324 | 325 | ||
325 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.pwm)"), this ); | 326 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.pwm)"), this ); |
326 | if ( fn == "" ) | 327 | if ( fn == "" ) |
327 | return; | 328 | return; |
328 | mRemoteFilePWM->setText( fn ); | 329 | mRemoteFilePWM->setText( fn ); |
329 | } | 330 | } |
330 | 331 | ||
331 | void KSyncPrefsDialog::textChanged( const QString & s ) | 332 | void KSyncPrefsDialog::textChanged( const QString & s ) |
332 | { | 333 | { |
333 | if ( mProfileBox->count() == 0 ) | 334 | if ( mProfileBox->count() == 0 ) |
334 | return; | 335 | return; |
335 | if ( currentSelection < 3 ) { | 336 | if ( currentSelection < 3 ) { |
336 | //KMessageBox::error(this,i18n("This profil name\ncannot be edited!\n"),i18n("KO/Pi config error")); | 337 | //KMessageBox::error(this,i18n("This profil name\ncannot be edited!\n"),i18n("KO/Pi config error")); |
337 | mProfileBox->blockSignals( true ); | 338 | mProfileBox->blockSignals( true ); |
338 | mProfileBox->setCurrentItem(mProfileBox-> currentItem ()); | 339 | mProfileBox->setCurrentItem(mProfileBox-> currentItem ()); |
339 | mProfileBox->blockSignals( false ); | 340 | mProfileBox->blockSignals( false ); |
340 | return; | 341 | return; |
341 | } | 342 | } |
342 | //qDebug("cur i %d ",mProfileBox-> currentItem () ); | 343 | //qDebug("cur i %d ",mProfileBox-> currentItem () ); |
343 | mProfileBox->changeItem ( s, mProfileBox-> currentItem () ) ; | 344 | mProfileBox->changeItem ( s, mProfileBox-> currentItem () ) ; |
344 | KSyncProfile* prof = mSyncProfiles.at(mProfileBox-> currentItem ()) ; | 345 | KSyncProfile* prof = mSyncProfiles.at(mProfileBox-> currentItem ()) ; |
345 | prof->setName( s ); | 346 | prof->setName( s ); |
346 | mSyncProfileNames[mProfileBox-> currentItem ()] = s; | 347 | mSyncProfileNames[mProfileBox-> currentItem ()] = s; |
347 | } | 348 | } |
348 | void KSyncPrefsDialog::profileChanged( int item ) | 349 | void KSyncPrefsDialog::profileChanged( int item ) |
349 | { | 350 | { |
350 | //qDebug("KSyncPrefsDialog::profileChanged %d ", item ); | 351 | //qDebug("KSyncPrefsDialog::profileChanged before %d, count %d ", item, mProfileBox->count() ); |
351 | KSyncProfile* prof; | 352 | KSyncProfile* prof; |
352 | saveProfile(); | 353 | saveProfile(); |
353 | currentSelection = item; | 354 | currentSelection = item; |
354 | prof = mSyncProfiles.at(item) ; | 355 | prof = mSyncProfiles.at(item) ; |
355 | mRemotePrecommand->setText(prof->getPreSyncCommand()); | 356 | mRemotePrecommand->setText(prof->getPreSyncCommand()); |
356 | mRemotePostcommand->setText(prof->getPostSyncCommand()); | 357 | mRemotePostcommand->setText(prof->getPostSyncCommand()); |
357 | mLocalTempFile->setText(prof->getLocalTempFile()); | 358 | mLocalTempFile->setText(prof->getLocalTempFile()); |
358 | mRemoteFile->setText(prof->getRemoteFileName()) ; | 359 | mRemoteFile->setText(prof->getRemoteFileName()) ; |
359 | 360 | ||
360 | mRemotePrecommandAB->setText(prof->getPreSyncCommandAB()); | 361 | mRemotePrecommandAB->setText(prof->getPreSyncCommandAB()); |
361 | mRemotePostcommandAB->setText(prof->getPostSyncCommandAB()); | 362 | mRemotePostcommandAB->setText(prof->getPostSyncCommandAB()); |
362 | mLocalTempFileAB->setText(prof->getLocalTempFileAB()); | 363 | mLocalTempFileAB->setText(prof->getLocalTempFileAB()); |
363 | mRemoteFileAB->setText(prof->getRemoteFileNameAB()) ; | 364 | mRemoteFileAB->setText(prof->getRemoteFileNameAB()) ; |
364 | 365 | ||
365 | mRemotePrecommandPWM->setText(prof->getPreSyncCommandPWM()); | 366 | mRemotePrecommandPWM->setText(prof->getPreSyncCommandPWM()); |
366 | mRemotePostcommandPWM->setText(prof->getPostSyncCommandPWM()); | 367 | mRemotePostcommandPWM->setText(prof->getPostSyncCommandPWM()); |
367 | mLocalTempFilePWM->setText(prof->getLocalTempFilePWM()); | 368 | mLocalTempFilePWM->setText(prof->getLocalTempFilePWM()); |
368 | mRemoteFilePWM->setText(prof->getRemoteFileNamePWM()) ; | 369 | mRemoteFilePWM->setText(prof->getRemoteFileNamePWM()) ; |
369 | 370 | ||
370 | mWriteContactToSIM->setChecked( prof->getWriteContactToSIM()); | 371 | mWriteContactToSIM->setChecked( prof->getWriteContactToSIM()); |
371 | mPhoneDevice->setText(prof->getPhoneDevice()); | 372 | mPhoneDevice->setText(prof->getPhoneDevice()); |
372 | mPhoneConnection->setText(prof->getPhoneConnection()); | 373 | mPhoneConnection->setText(prof->getPhoneConnection()); |
373 | mPhoneModel->setText(prof->getPhoneModel()); | 374 | mPhoneModel->setText(prof->getPhoneModel()); |
374 | 375 | ||
375 | mShowSummaryAfterSync->setChecked( prof->getShowSummaryAfterSync()); | 376 | mShowSummaryAfterSync->setChecked( prof->getShowSummaryAfterSync()); |
376 | mAskForPreferences->setChecked( prof->getAskForPreferences()); | 377 | mAskForPreferences->setChecked( prof->getAskForPreferences()); |
377 | mWriteBackExisting->setChecked( prof->getWriteBackExisting() ); | 378 | mWriteBackExisting->setChecked( prof->getWriteBackExisting() ); |
378 | mWriteBackFile->setChecked( prof->getWriteBackFile()); | 379 | mWriteBackFile->setChecked( prof->getWriteBackFile()); |
379 | mIncludeInRing->setChecked( prof->getIncludeInRingSync() ); | 380 | mIncludeInRing->setChecked( prof->getIncludeInRingSync() ); |
380 | mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() ); | 381 | mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() ); |
381 | mIncludeInRingPWM->setChecked( prof->getIncludeInRingSyncPWM() ); | 382 | mIncludeInRingPWM->setChecked( prof->getIncludeInRingSyncPWM() ); |
382 | mWriteBackFuture->setChecked( prof->getWriteBackFuture()); | 383 | mWriteBackFuture->setChecked( prof->getWriteBackFuture()); |
383 | mWriteBackFutureWeeks->setValue( prof->getWriteBackFutureWeeks() ); | 384 | mWriteBackFutureWeeks->setValue( prof->getWriteBackFutureWeeks() ); |
384 | 385 | ||
385 | switch ( prof->getSyncPrefs() ) { | 386 | switch ( prof->getSyncPrefs() ) { |
386 | case 0: | 387 | case 0: |
387 | loc->setChecked( true); | 388 | loc->setChecked( true); |
388 | break; | 389 | break; |
389 | case 1: | 390 | case 1: |
390 | rem->setChecked( true ); | 391 | rem->setChecked( true ); |
391 | break; | 392 | break; |
392 | case 2: | 393 | case 2: |
393 | newest->setChecked( true); | 394 | newest->setChecked( true); |
394 | break; | 395 | break; |
395 | case 3: | 396 | case 3: |
396 | ask->setChecked( true); | 397 | ask->setChecked( true); |
397 | break; | 398 | break; |
398 | case 4: | 399 | case 4: |
399 | f_loc->setChecked( true); | 400 | f_loc->setChecked( true); |
400 | break; | 401 | break; |
401 | case 5: | 402 | case 5: |
402 | f_rem->setChecked( true); | 403 | f_rem->setChecked( true); |
403 | break; | 404 | break; |
404 | case 6: | 405 | case 6: |
405 | //both->setChecked( true); | 406 | //both->setChecked( true); |
406 | break; | 407 | break; |
407 | default: | 408 | default: |
408 | break; | 409 | break; |
409 | } | 410 | } |
410 | mIsLocal->setChecked(prof->getIsLocalFileSync()) ; | 411 | mIsLocal->setChecked(prof->getIsLocalFileSync()) ; |
411 | mIsPhone->setChecked(prof->getIsPhoneSync()) ; | 412 | mIsPhone->setChecked(prof->getIsPhoneSync()) ; |
412 | mIsNotLocal->setChecked(!prof->getIsLocalFileSync() && !prof->getIsPhoneSync() ); | 413 | mIsNotLocal->setChecked(!prof->getIsLocalFileSync() && !prof->getIsPhoneSync() ); |
413 | proGr->setEnabled( item > 2 ); | 414 | proGr->setEnabled( item > 2 ); |
414 | if ( item < 3 ) { | 415 | if ( item < 3 ) { |