summaryrefslogtreecommitdiff
path: root/src/sync/synchosttypewidget.cpp
diff options
context:
space:
mode:
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);
+}