* 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
33 lines
600 B
C++
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
|