2013-07-31 17:46:41 +04:00
|
|
|
/*
|
|
|
|
* Copyright (C) by Klaas Freitag <freitag@owncloud.com>
|
|
|
|
* Copyright (C) by Krzesimir Nowak <krzesimir@endocode.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) any later version.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MIRALL_OWNCLOUD_ADVANCED_SETUP_PAGE_H
|
|
|
|
#define MIRALL_OWNCLOUD_ADVANCED_SETUP_PAGE_H
|
|
|
|
|
|
|
|
#include <QWizard>
|
|
|
|
|
|
|
|
#include "wizard/owncloudwizardcommon.h"
|
|
|
|
#include "ui_owncloudadvancedsetuppage.h"
|
|
|
|
|
|
|
|
class QProgressIndicator;
|
|
|
|
|
2014-11-10 00:34:07 +03:00
|
|
|
namespace OCC {
|
2013-07-31 17:46:41 +04:00
|
|
|
|
2015-06-29 19:56:09 +03:00
|
|
|
/**
|
|
|
|
* @brief The OwncloudAdvancedSetupPage class
|
|
|
|
* @ingroup gui
|
2015-06-26 18:07:47 +03:00
|
|
|
*/
|
2017-05-17 11:55:42 +03:00
|
|
|
class OwncloudAdvancedSetupPage : public QWizardPage
|
2013-07-31 17:46:41 +04:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2017-05-17 11:55:42 +03:00
|
|
|
OwncloudAdvancedSetupPage();
|
2013-07-31 17:46:41 +04:00
|
|
|
|
2018-11-11 13:09:29 +03:00
|
|
|
bool isComplete() const override;
|
|
|
|
void initializePage() override;
|
|
|
|
int nextId() const override;
|
|
|
|
bool validatePage() override;
|
2017-05-17 11:55:42 +03:00
|
|
|
QString localFolder() const;
|
|
|
|
QStringList selectiveSyncBlacklist() const;
|
2018-05-18 09:29:40 +03:00
|
|
|
bool useVirtualFileSync() const;
|
2017-05-17 11:55:42 +03:00
|
|
|
bool isConfirmBigFolderChecked() const;
|
|
|
|
void setRemoteFolder(const QString &remoteFolder);
|
|
|
|
void setMultipleFoldersExist(bool exist);
|
|
|
|
void directoriesCreated();
|
2013-07-31 17:46:41 +04:00
|
|
|
|
|
|
|
signals:
|
2017-05-17 11:55:42 +03:00
|
|
|
void createLocalAndRemoteFolders(const QString &, const QString &);
|
2013-07-31 17:46:41 +04:00
|
|
|
|
|
|
|
public slots:
|
2017-05-17 11:55:42 +03:00
|
|
|
void setErrorString(const QString &);
|
2019-12-19 22:26:27 +03:00
|
|
|
void slotStyleChanged();
|
2013-07-31 17:46:41 +04:00
|
|
|
|
|
|
|
private slots:
|
2017-05-17 11:55:42 +03:00
|
|
|
void slotSelectFolder();
|
|
|
|
void slotSyncEverythingClicked();
|
|
|
|
void slotSelectiveSyncClicked();
|
2018-05-18 09:29:40 +03:00
|
|
|
void slotVirtualFileSyncClicked();
|
2017-05-17 11:55:42 +03:00
|
|
|
void slotQuotaRetrieved(const QVariantMap &result);
|
2013-07-31 17:46:41 +04:00
|
|
|
|
|
|
|
private:
|
2018-04-03 18:30:17 +03:00
|
|
|
void setRadioChecked(QRadioButton *radio);
|
|
|
|
|
2017-05-17 11:55:42 +03:00
|
|
|
void setupCustomization();
|
|
|
|
void updateStatus();
|
|
|
|
bool dataChanged();
|
|
|
|
void startSpinner();
|
|
|
|
void stopSpinner();
|
|
|
|
QUrl serverUrl() const;
|
2019-01-10 01:15:45 +03:00
|
|
|
qint64 availableLocalSpace() const;
|
|
|
|
QString checkLocalSpace(qint64 remoteSize) const;
|
2019-12-19 22:26:27 +03:00
|
|
|
void customizeStyle();
|
2013-07-31 17:46:41 +04:00
|
|
|
|
2017-05-17 11:55:42 +03:00
|
|
|
Ui_OwncloudAdvancedSetupPage _ui;
|
2020-05-28 17:59:24 +03:00
|
|
|
bool _checking = false;
|
|
|
|
bool _created = false;
|
|
|
|
bool _localFolderValid = false;
|
2017-05-17 11:55:42 +03:00
|
|
|
QProgressIndicator *_progressIndi;
|
|
|
|
QString _remoteFolder;
|
|
|
|
QStringList _selectiveSyncBlacklist;
|
2020-05-28 17:59:24 +03:00
|
|
|
qint64 _rSize = -1;
|
|
|
|
qint64 _rSelectedSize = -1;
|
2013-07-31 17:46:41 +04:00
|
|
|
};
|
|
|
|
|
2014-11-10 00:34:07 +03:00
|
|
|
} // namespace OCC
|
2013-07-31 17:46:41 +04:00
|
|
|
|
|
|
|
#endif
|