2016-09-21 21:09:12 +02:00
|
|
|
#ifndef DOWNLOADVIEW_H
|
|
|
|
#define DOWNLOADVIEW_H
|
|
|
|
|
|
|
|
#include <QTreeView>
|
|
|
|
|
|
|
|
namespace Data {
|
|
|
|
struct SyncthingItemDownloadProgress;
|
|
|
|
struct SyncthingDir;
|
2020-10-07 21:34:37 +02:00
|
|
|
class SyncthingDownloadModel;
|
2017-09-17 21:48:15 +02:00
|
|
|
} // namespace Data
|
2016-09-21 21:09:12 +02:00
|
|
|
|
|
|
|
namespace QtGui {
|
|
|
|
|
2017-05-01 03:34:43 +02:00
|
|
|
class DownloadView : public QTreeView {
|
2016-09-21 21:09:12 +02:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2020-10-07 21:34:37 +02:00
|
|
|
using ModelType = Data::SyncthingDownloadModel;
|
2020-10-18 15:48:02 +02:00
|
|
|
using SortFilterModelType = void;
|
2020-10-07 21:34:37 +02:00
|
|
|
|
2016-09-21 21:09:12 +02:00
|
|
|
DownloadView(QWidget *parent = nullptr);
|
|
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
void openDir(const Data::SyncthingDir &dir);
|
|
|
|
void openItemDir(const Data::SyncthingItemDownloadProgress &dir);
|
|
|
|
|
|
|
|
protected:
|
2018-10-10 21:26:46 +02:00
|
|
|
void mouseReleaseEvent(QMouseEvent *event) override;
|
2016-09-21 21:09:12 +02:00
|
|
|
|
|
|
|
private Q_SLOTS:
|
2019-07-20 18:56:20 +02:00
|
|
|
void showContextMenu(const QPoint &position);
|
2020-10-07 21:34:37 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
void emitOpenDir(QPair<const Data::SyncthingDir *, const Data::SyncthingItemDownloadProgress *> info);
|
2016-09-21 21:09:12 +02:00
|
|
|
};
|
2017-09-17 21:48:15 +02:00
|
|
|
} // namespace QtGui
|
2016-09-21 21:09:12 +02:00
|
|
|
|
|
|
|
#endif // DOWNLOADVIEW_H
|