syncthingtray/tray/gui/downloadview.h

38 lines
856 B
C
Raw Normal View History

2016-09-21 21:09:12 +02:00
#ifndef DOWNLOADVIEW_H
#define DOWNLOADVIEW_H
#include <QTreeView>
namespace Data {
struct SyncthingItemDownloadProgress;
struct SyncthingDir;
class SyncthingDownloadModel;
} // 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:
using ModelType = Data::SyncthingDownloadModel;
using SortFilterModelType = void;
explicit DownloadView(QWidget *parent = nullptr);
2016-09-21 21:09:12 +02:00
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:
void showContextMenu(const QPoint &position);
private:
void emitOpenDir(QPair<const Data::SyncthingDir *, const Data::SyncthingItemDownloadProgress *> info);
2016-09-21 21:09:12 +02:00
};
} // namespace QtGui
2016-09-21 21:09:12 +02:00
#endif // DOWNLOADVIEW_H