2015-01-12 13:35:11 +03:00
|
|
|
/*
|
2015-02-25 20:32:25 +03:00
|
|
|
* Copyright (C) by Roeland Jago Douma <roeland@famdouma.nl>
|
2015-01-12 13:35:11 +03:00
|
|
|
*
|
|
|
|
* 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
|
2016-10-25 12:00:07 +03:00
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
2015-01-12 13:35:11 +03:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2014-09-03 18:12:21 +04:00
|
|
|
#ifndef SHAREDIALOG_H
|
|
|
|
#define SHAREDIALOG_H
|
|
|
|
|
2016-02-22 12:38:10 +03:00
|
|
|
#include "accountstate.h"
|
2016-03-30 12:33:34 +03:00
|
|
|
#include "sharepermissions.h"
|
2018-04-06 18:13:29 +03:00
|
|
|
#include "owncloudgui.h"
|
2016-02-22 12:38:10 +03:00
|
|
|
|
|
|
|
#include <QPointer>
|
2015-11-05 11:58:16 +03:00
|
|
|
#include <QString>
|
2014-09-03 18:12:21 +04:00
|
|
|
#include <QDialog>
|
2015-11-05 11:58:16 +03:00
|
|
|
#include <QWidget>
|
2015-10-29 13:09:10 +03:00
|
|
|
|
2016-03-30 12:33:34 +03:00
|
|
|
class QProgressIndicator;
|
|
|
|
|
2014-12-19 18:56:17 +03:00
|
|
|
namespace OCC {
|
2014-09-03 18:12:21 +04:00
|
|
|
|
|
|
|
namespace Ui {
|
2017-05-17 11:55:42 +03:00
|
|
|
class ShareDialog;
|
2014-09-03 18:12:21 +04:00
|
|
|
}
|
|
|
|
|
2015-11-05 11:58:16 +03:00
|
|
|
class ShareLinkWidget;
|
|
|
|
class ShareUserGroupWidget;
|
2014-09-03 18:12:21 +04:00
|
|
|
|
|
|
|
class ShareDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2016-02-22 12:38:10 +03:00
|
|
|
explicit ShareDialog(QPointer<AccountState> accountState,
|
2017-05-17 11:55:42 +03:00
|
|
|
const QString &sharePath,
|
|
|
|
const QString &localPath,
|
|
|
|
SharePermissions maxSharingPermissions,
|
2017-05-10 10:37:10 +03:00
|
|
|
const QByteArray &numericFileId,
|
2018-04-06 18:13:29 +03:00
|
|
|
ShareDialogStartPage startPage,
|
2018-11-11 12:56:22 +03:00
|
|
|
QWidget *parent = nullptr);
|
2014-09-03 18:12:21 +04:00
|
|
|
~ShareDialog();
|
2015-11-05 11:58:16 +03:00
|
|
|
|
2014-09-03 18:12:21 +04:00
|
|
|
private slots:
|
2017-05-17 11:55:42 +03:00
|
|
|
void done(int r);
|
2017-09-15 15:24:34 +03:00
|
|
|
void slotPropfindReceived(const QVariantMap &result);
|
|
|
|
void slotPropfindError();
|
2015-01-21 15:51:16 +03:00
|
|
|
void slotThumbnailFetched(const int &statusCode, const QByteArray &reply);
|
2016-02-22 12:38:10 +03:00
|
|
|
void slotAccountStateChanged(int state);
|
2015-03-26 20:08:06 +03:00
|
|
|
|
2014-09-03 18:12:21 +04:00
|
|
|
private:
|
2016-03-30 12:33:34 +03:00
|
|
|
void showSharingUi();
|
|
|
|
|
2014-09-03 18:12:21 +04:00
|
|
|
Ui::ShareDialog *_ui;
|
2018-07-25 12:18:08 +03:00
|
|
|
|
2016-02-22 12:38:10 +03:00
|
|
|
QPointer<AccountState> _accountState;
|
2015-01-16 16:48:56 +03:00
|
|
|
QString _sharePath;
|
|
|
|
QString _localPath;
|
2016-03-30 12:33:34 +03:00
|
|
|
SharePermissions _maxSharingPermissions;
|
2017-05-10 10:37:10 +03:00
|
|
|
QByteArray _numericFileId;
|
2017-09-15 15:24:34 +03:00
|
|
|
QString _privateLinkUrl;
|
2018-04-06 18:13:29 +03:00
|
|
|
ShareDialogStartPage _startPage;
|
2015-11-05 11:58:16 +03:00
|
|
|
|
|
|
|
ShareLinkWidget *_linkWidget;
|
|
|
|
ShareUserGroupWidget *_userGroupWidget;
|
2016-03-30 12:33:34 +03:00
|
|
|
QProgressIndicator *_progressIndicator;
|
2014-09-03 18:12:21 +04:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // SHAREDIALOG_H
|