2013-08-01 16:34:31 +04:00
|
|
|
/*
|
|
|
|
* Copyright (C) by Klaas Freitag <freitag@owncloud.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
|
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.
|
2013-08-01 16:34:31 +04: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.
|
|
|
|
*/
|
|
|
|
|
2013-10-08 16:12:05 +04:00
|
|
|
#ifndef PROTOCOLWIDGET_H
|
|
|
|
#define PROTOCOLWIDGET_H
|
2013-08-01 16:34:31 +04:00
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QDateTime>
|
2013-08-13 18:53:39 +04:00
|
|
|
#include <QLocale>
|
2013-08-01 16:34:31 +04:00
|
|
|
|
2014-07-11 02:31:24 +04:00
|
|
|
#include "progressdispatcher.h"
|
2015-07-20 19:15:45 +03:00
|
|
|
#include "owncloudgui.h"
|
2013-08-01 16:34:31 +04:00
|
|
|
|
2013-10-08 16:12:05 +04:00
|
|
|
#include "ui_protocolwidget.h"
|
2013-10-02 20:16:24 +04:00
|
|
|
|
2013-12-03 17:03:45 +04:00
|
|
|
class QPushButton;
|
|
|
|
|
2014-11-10 00:34:07 +03:00
|
|
|
namespace OCC {
|
2013-08-01 16:34:31 +04:00
|
|
|
class SyncResult;
|
|
|
|
|
|
|
|
namespace Ui {
|
2017-05-17 11:55:42 +03:00
|
|
|
class ProtocolWidget;
|
2013-08-01 16:34:31 +04:00
|
|
|
}
|
2013-08-02 13:33:45 +04:00
|
|
|
class Application;
|
2013-08-01 16:34:31 +04:00
|
|
|
|
2015-06-29 19:56:09 +03:00
|
|
|
/**
|
|
|
|
* @brief The ProtocolWidget class
|
|
|
|
* @ingroup gui
|
2015-06-26 18:07:47 +03:00
|
|
|
*/
|
2013-10-08 16:12:05 +04:00
|
|
|
class ProtocolWidget : public QWidget
|
2013-08-01 16:34:31 +04:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2013-10-08 16:12:05 +04:00
|
|
|
explicit ProtocolWidget(QWidget *parent = 0);
|
|
|
|
~ProtocolWidget();
|
2015-07-20 19:15:45 +03:00
|
|
|
QSize sizeHint() const { return ownCloudGui::settingsDialogSize(); }
|
2013-08-01 16:34:31 +04:00
|
|
|
|
2015-11-06 13:43:43 +03:00
|
|
|
QTreeWidget *issueWidget() { return _issueItemView; }
|
2017-05-17 11:55:42 +03:00
|
|
|
void storeSyncActivity(QTextStream &ts);
|
|
|
|
void storeSyncIssues(QTextStream &ts);
|
2015-11-06 13:43:43 +03:00
|
|
|
|
2013-08-01 16:34:31 +04:00
|
|
|
public slots:
|
2017-05-17 11:55:42 +03:00
|
|
|
void slotProgressInfo(const QString &folder, const ProgressInfo &progress);
|
|
|
|
void slotItemCompleted(const QString &folder, const SyncFileItemPtr &item);
|
|
|
|
void slotOpenFile(QTreeWidgetItem *item, int);
|
2013-08-01 16:34:31 +04:00
|
|
|
|
2015-03-23 20:22:12 +03:00
|
|
|
protected:
|
|
|
|
void showEvent(QShowEvent *);
|
|
|
|
void hideEvent(QHideEvent *);
|
|
|
|
|
2013-08-01 16:34:31 +04:00
|
|
|
signals:
|
2015-11-10 17:12:35 +03:00
|
|
|
void copyToClipboard();
|
2016-04-05 14:57:38 +03:00
|
|
|
void issueItemCountUpdated(int);
|
2013-08-01 16:34:31 +04:00
|
|
|
|
|
|
|
private:
|
2017-05-17 11:55:42 +03:00
|
|
|
void setSyncResultStatus(const SyncResult &result);
|
|
|
|
void cleanItems(const QString &folder);
|
2013-12-03 17:48:38 +04:00
|
|
|
|
2017-05-17 11:55:42 +03:00
|
|
|
QTreeWidgetItem *createCompletedTreewidgetItem(const QString &folder, const SyncFileItem &item);
|
2013-11-26 15:22:28 +04:00
|
|
|
|
2013-08-13 18:53:39 +04:00
|
|
|
QString timeString(QDateTime dt, QLocale::FormatType format = QLocale::NarrowFormat) const;
|
2013-08-01 16:34:31 +04:00
|
|
|
|
2014-03-14 21:29:23 +04:00
|
|
|
const int IgnoredIndicatorRole;
|
2013-10-08 16:12:05 +04:00
|
|
|
Ui::ProtocolWidget *_ui;
|
2015-11-06 13:43:43 +03:00
|
|
|
QTreeWidget *_issueItemView;
|
2013-08-01 16:34:31 +04:00
|
|
|
};
|
|
|
|
}
|
2013-10-08 16:12:05 +04:00
|
|
|
#endif // PROTOCOLWIDGET_H
|