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
|
|
|
|
* the Free Software Foundation; version 2 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.
|
|
|
|
*/
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
#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
|
|
|
|
2014-12-19 18:56:17 +03:00
|
|
|
namespace OCC {
|
2014-09-03 18:12:21 +04:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class ShareDialog;
|
|
|
|
}
|
|
|
|
|
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,
|
2015-11-05 11:58:16 +03:00
|
|
|
const QString &sharePath,
|
|
|
|
const QString &localPath,
|
|
|
|
bool resharingAllowed,
|
|
|
|
QWidget *parent = 0);
|
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
|
|
|
void getShares();
|
2015-01-21 17:03:01 +03:00
|
|
|
|
2014-09-03 18:12:21 +04:00
|
|
|
private slots:
|
2015-11-05 11:58:16 +03:00
|
|
|
void done( int r );
|
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:
|
|
|
|
Ui::ShareDialog *_ui;
|
2016-02-22 12:38:10 +03:00
|
|
|
QPointer<AccountState> _accountState;
|
2015-01-16 16:48:56 +03:00
|
|
|
QString _sharePath;
|
|
|
|
QString _localPath;
|
2015-10-29 13:09:10 +03:00
|
|
|
|
2015-03-11 16:09:31 +03:00
|
|
|
bool _resharingAllowed;
|
2015-11-05 11:58:16 +03:00
|
|
|
|
|
|
|
ShareLinkWidget *_linkWidget;
|
|
|
|
ShareUserGroupWidget *_userGroupWidget;
|
2014-09-03 18:12:21 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // SHAREDIALOG_H
|