2016-08-25 00:45:32 +02:00
|
|
|
#ifndef DEVVIEW_H
|
|
|
|
#define DEVVIEW_H
|
|
|
|
|
|
|
|
#include <QTreeView>
|
|
|
|
|
2016-09-21 21:09:12 +02:00
|
|
|
namespace Data {
|
|
|
|
struct SyncthingDev;
|
2020-10-07 21:34:37 +02:00
|
|
|
class SyncthingDeviceModel;
|
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 DevView : public QTreeView {
|
2016-08-25 00:45:32 +02:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2020-10-07 21:34:37 +02:00
|
|
|
using ModelType = Data::SyncthingDeviceModel;
|
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
|
|
|
DevView(QWidget *parent = nullptr);
|
|
|
|
|
2016-08-26 16:43:53 +02:00
|
|
|
Q_SIGNALS:
|
2016-09-21 21:09:12 +02:00
|
|
|
void pauseResumeDev(const Data::SyncthingDev &dev);
|
2016-08-26 16:43:53 +02:00
|
|
|
|
|
|
|
protected:
|
2018-10-10 21:26:46 +02:00
|
|
|
void mouseReleaseEvent(QMouseEvent *event) override;
|
2016-08-26 16:43:53 +02:00
|
|
|
|
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 // DEVVIEW_H
|