syncthingtray/tray/gui/dirview.h
Martchus f4097d3d79 Fix positioning of context menus under Wayland
Does not cover positioning the tray widget itself yet.
2019-07-20 18:56:20 +02:00

33 lines
625 B
C++

#ifndef DIRVIEW_H
#define DIRVIEW_H
#include <QTreeView>
namespace Data {
struct SyncthingDir;
}
namespace QtGui {
class DirView : public QTreeView {
Q_OBJECT
public:
DirView(QWidget *parent = nullptr);
Q_SIGNALS:
void openDir(const Data::SyncthingDir &dir);
void scanDir(const Data::SyncthingDir &dir);
void pauseResumeDir(const Data::SyncthingDir &dir);
protected:
void mouseReleaseEvent(QMouseEvent *event) override;
private Q_SLOTS:
void showContextMenu(const QPoint &position);
void copySelectedItem();
void copySelectedItemPath();
};
} // namespace QtGui
#endif // DIRVIEW_H