syncthingtray/tray/gui/devview.h
Martchus 3e1beaa11d Sort directories by name/ID
* Use the name as sorting criteria and fall back to the ID if there's no
  name
* Use new SyncthingSortFilterDirectoryModel also for Plasmoid's filtering
* See https://github.com/Martchus/syncthingtray/issues/75
2020-10-18 15:48:02 +02:00

33 lines
600 B
C++

#ifndef DEVVIEW_H
#define DEVVIEW_H
#include <QTreeView>
namespace Data {
struct SyncthingDev;
class SyncthingDeviceModel;
} // namespace Data
namespace QtGui {
class DevView : public QTreeView {
Q_OBJECT
public:
using ModelType = Data::SyncthingDeviceModel;
using SortFilterModelType = void;
DevView(QWidget *parent = nullptr);
Q_SIGNALS:
void pauseResumeDev(const Data::SyncthingDev &dev);
protected:
void mouseReleaseEvent(QMouseEvent *event) override;
private Q_SLOTS:
void showContextMenu(const QPoint &position);
};
} // namespace QtGui
#endif // DEVVIEW_H