summaryrefslogtreecommitdiff
path: root/src/sync/synchosttypewidget.cpp
diff options
context:
space:
mode:
authorSiteshwar Vashisht <siteshwar@gmail.com>2012-05-24 23:54:48 +0530
committerAndrea Diamantini <adjam7@gmail.com>2012-05-28 00:10:31 +0200
commit4a33568b6d177921e50445a9ded44386febe60c0 (patch)
tree171c6185c19789c33912c1170fa974c00ea6f335 /src/sync/synchosttypewidget.cpp
parentFinal refactoring and clean up to support Opera bookmarks. (diff)
downloadrekonq-4a33568b6d177921e50445a9ded44386febe60c0.tar.xz
Made UI changes to disable history and password sync for certain services, added some notification messages in Opera sync handler.
Diffstat (limited to 'src/sync/synchosttypewidget.cpp')
-rw-r--r--src/sync/synchosttypewidget.cpp29
1 files changed, 29 insertions, 0 deletions
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);
+}