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
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
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
|
|
|
|
|
|
|
#include "mirall/progressdispatcher.h"
|
|
|
|
|
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;
|
|
|
|
|
2013-08-01 16:34:31 +04:00
|
|
|
namespace Mirall {
|
|
|
|
class SyncResult;
|
|
|
|
|
|
|
|
namespace Ui {
|
2013-10-08 16:12:05 +04: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
|
|
|
|
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();
|
2013-08-01 16:34:31 +04:00
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void slotProgressInfo( const QString& folder, const Progress::Info& progress );
|
2013-10-02 20:16:24 +04:00
|
|
|
void slotOpenFile( QTreeWidgetItem* item, int );
|
2013-08-01 16:34:31 +04:00
|
|
|
|
|
|
|
protected slots:
|
|
|
|
void copyToClipboard();
|
2013-12-03 17:03:45 +04:00
|
|
|
void slotClearBlacklist();
|
2013-08-01 16:34:31 +04:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void guiLog(const QString&, const QString&);
|
|
|
|
|
|
|
|
private:
|
2013-08-06 20:06:05 +04:00
|
|
|
void setSyncResultStatus(const SyncResult& result );
|
2014-03-14 21:29:23 +04:00
|
|
|
void cleanIgnoreItems( const QString& folder );
|
2013-12-03 17:48:38 +04:00
|
|
|
void computeResyncButtonEnabled();
|
|
|
|
|
2014-03-14 16:03:16 +04: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;
|
2013-12-03 17:03:45 +04:00
|
|
|
QPushButton *_clearBlacklistBtn;
|
2013-08-01 16:34:31 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2013-10-08 16:12:05 +04:00
|
|
|
#endif // PROTOCOLWIDGET_H
|