nextcloud-desktop/src/gui/wizard/owncloudadvancedsetuppage.h

91 lines
2.5 KiB
C
Raw Normal View History

/*
* 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 {
2015-06-29 19:56:09 +03:00
/**
* @brief The OwncloudAdvancedSetupPage class
* @ingroup gui
*/
2017-05-17 11:55:42 +03:00
class OwncloudAdvancedSetupPage : public QWizardPage
{
Q_OBJECT
public:
2017-05-17 11:55:42 +03:00
OwncloudAdvancedSetupPage();
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;
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();
signals:
2017-05-17 11:55:42 +03:00
void createLocalAndRemoteFolders(const QString &, const QString &);
public slots:
2017-05-17 11:55:42 +03:00
void setErrorString(const QString &);
void slotStyleChanged();
private slots:
2017-05-17 11:55:42 +03:00
void slotSelectFolder();
void slotSyncEverythingClicked();
void slotSelectiveSyncClicked();
void slotVirtualFileSyncClicked();
2017-05-17 11:55:42 +03:00
void slotQuotaRetrieved(const QVariantMap &result);
private:
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;
qint64 availableLocalSpace() const;
QString checkLocalSpace(qint64 remoteSize) const;
void customizeStyle();
2017-05-17 11:55:42 +03:00
Ui_OwncloudAdvancedSetupPage _ui;
bool _checking = false;
bool _created = false;
bool _localFolderValid = false;
2017-05-17 11:55:42 +03:00
QProgressIndicator *_progressIndi;
QString _remoteFolder;
QStringList _selectiveSyncBlacklist;
qint64 _rSize = -1;
qint64 _rSelectedSize = -1;
};
2014-11-10 00:34:07 +03:00
} // namespace OCC
#endif