From 4a33568b6d177921e50445a9ded44386febe60c0 Mon Sep 17 00:00:00 2001 From: Siteshwar Vashisht Date: Thu, 24 May 2012 23:54:48 +0530 Subject: Made UI changes to disable history and password sync for certain services, added some notification messages in Opera sync handler. --- src/sync/synchosttypewidget.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/sync/synchosttypewidget.cpp') diff --git a/src/sync/synchosttypewidget.cpp b/src/sync/synchosttypewidget.cpp index 73f9a7cb..cece6e2c 100644 --- a/src/sync/synchosttypewidget.cpp +++ b/src/sync/synchosttypewidget.cpp @@ -37,9 +37,12 @@ SyncHostTypeWidget::SyncHostTypeWidget(QWidget *parent) : QWizardPage(parent) + , _changed(false) { setupUi(this); + connect(kcfg_syncEnabled, SIGNAL(clicked()), this, SLOT(hasChanged())); + kcfg_syncEnabled->setChecked(ReKonfig::syncEnabled()); if (ReKonfig::syncType() == 0) ftpRadioButton->setChecked(true); else if(ReKonfig::syncType() == 1) @@ -48,11 +51,32 @@ SyncHostTypeWidget::SyncHostTypeWidget(QWidget *parent) operaRadioButton->setChecked(true); else nullRadioButton->setChecked(true); + + enablewidgets(ReKonfig::syncEnabled()); +} + + +bool SyncHostTypeWidget::changed() +{ + return _changed; } +void SyncHostTypeWidget::hasChanged() +{ + enablewidgets(kcfg_syncEnabled->isChecked()); + + _changed = true; + emit changed(true); +} + int SyncHostTypeWidget::nextId() const { + ReKonfig::setSyncEnabled(kcfg_syncEnabled->isChecked()); + + if (!ReKonfig::syncEnabled()) + return SyncAssistant::Page_Check; + // save if (ftpRadioButton->isChecked()) { @@ -76,3 +100,8 @@ int SyncHostTypeWidget::nextId() const } } + +void SyncHostTypeWidget::enablewidgets(bool b) +{ + hostGroupBox->setEnabled(b); +} -- cgit v1.2.1