2016-08-25 00:45:32 +02:00
|
|
|
#ifndef DIRVIEW_H
|
|
|
|
#define DIRVIEW_H
|
|
|
|
|
|
|
|
#include <QTreeView>
|
|
|
|
|
2016-09-21 21:09:12 +02:00
|
|
|
namespace Data {
|
|
|
|
struct SyncthingDir;
|
2020-10-07 21:34:37 +02:00
|
|
|
class SyncthingDirectoryModel;
|
2020-10-20 19:16:53 +02:00
|
|
|
class SyncthingSortFilterModel;
|
2020-10-07 21:34:37 +02:00
|
|
|
} // namespace Data
|
2016-09-21 21:09:12 +02:00
|
|
|
|
2016-08-25 00:45:32 +02:00
|
|
|
namespace QtGui {
|
|
|
|
|
2017-05-01 03:34:43 +02:00
|
|
|
class DirView : public QTreeView {
|
2016-08-25 00:45:32 +02:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2020-10-07 21:34:37 +02:00
|
|
|
using ModelType = Data::SyncthingDirectoryModel;
|
2020-10-20 19:16:53 +02:00
|
|
|
using SortFilterModelType = Data::SyncthingSortFilterModel;
|
2020-10-07 21:34:37 +02:00
|
|
|
|
2016-08-25 00:45:32 +02:00
|
|
|
DirView(QWidget *parent = nullptr);
|
|
|
|
|
|
|
|
Q_SIGNALS:
|
2016-09-21 21:09:12 +02:00
|
|
|
void openDir(const Data::SyncthingDir &dir);
|
|
|
|
void scanDir(const Data::SyncthingDir &dir);
|
2017-02-23 15:49:58 +01:00
|
|
|
void pauseResumeDir(const Data::SyncthingDir &dir);
|
2016-08-25 00:45:32 +02:00
|
|
|
|
|
|
|
protected:
|
2018-10-10 21:26:46 +02:00
|
|
|
void mouseReleaseEvent(QMouseEvent *event) override;
|
2016-08-25 00:45:32 +02:00
|
|
|
|
|
|
|
private Q_SLOTS:
|
2019-07-20 18:56:20 +02:00
|
|
|
void showContextMenu(const QPoint &position);
|
2016-08-25 00:45:32 +02:00
|
|
|
};
|
2017-09-17 21:48:15 +02:00
|
|
|
} // namespace QtGui
|
2016-08-25 00:45:32 +02:00
|
|
|
|
|
|
|
#endif // DIRVIEW_H
|