syncthingtray/tray/gui/devview.h

34 lines
667 B
C
Raw Permalink Normal View History

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;
class SyncthingDeviceModel;
2020-10-20 19:16:53 +02:00
class SyncthingSortFilterModel;
} // 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:
using ModelType = Data::SyncthingDeviceModel;
2020-10-20 19:16:53 +02:00
using SortFilterModelType = Data::SyncthingSortFilterModel;
explicit DevView(QWidget *parent = nullptr);
2016-08-25 00:45:32 +02:00
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:
void showContextMenu(const QPoint &position);
2016-08-25 00:45:32 +02:00
};
} // namespace QtGui
2016-08-25 00:45:32 +02:00
#endif // DEVVIEW_H