diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2011-12-09 15:29:56 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-12-12 16:40:29 +0100 |
commit | c2bbd9066ae8b6902d51b8d9782702252eec5d95 (patch) | |
tree | 03b2d030bf08433f1fc346d7ef8b81adeee861c1 /src/sync/synchosttypewidget.cpp | |
parent | Rebase fix (diff) | |
download | rekonq-c2bbd9066ae8b6902d51b8d9782702252eec5d95.tar.xz |
Sync improvements, last bunch!
Improved code division (it will be super easy now adding a new handler)
Added a new config UI (QWizard based)
Diffstat (limited to 'src/sync/synchosttypewidget.cpp')
-rw-r--r-- | src/sync/synchosttypewidget.cpp | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/sync/synchosttypewidget.cpp b/src/sync/synchosttypewidget.cpp new file mode 100644 index 00000000..0810182e --- /dev/null +++ b/src/sync/synchosttypewidget.cpp @@ -0,0 +1,64 @@ +/* ============================================================ +* +* This file is a part of the rekonq project +* +* Copyright (C) 2011 by Andrea Diamantini <adjam7 at gmail dot com> +* +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License or (at your option) version 3 or any later version +* accepted by the membership of KDE e.V. (or its successor approved +* by the membership of KDE e.V.), which shall act as a proxy +* defined in Section 14 of version 3 of the license. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +* +* ============================================================ */ + + +// Self Includes +#include "synchosttypewidget.h" +#include "synchosttypewidget.moc" + +// Auto Includes +#include "rekonq.h" + +// Local Includes +#include "syncassistant.h" + + +SyncHostTypeWidget::SyncHostTypeWidget(QWidget *parent) + : QWizardPage(parent) +{ + setupUi(this); + + if (ReKonfig::syncType() == 0) + ftpRadioButton->setChecked(true); + else + nullRadioButton->setChecked(true); +} + + +int SyncHostTypeWidget::nextId() const +{ + // save + if (ftpRadioButton->isChecked()) + { + ReKonfig::setSyncType(0); + return SyncAssistant::Page_FTP_Settings; + } + else + { + ReKonfig::setSyncType(1); + return SyncAssistant::Page_Check; + } + +} |