summary refs log tree commit diff
path: root/src/ui/TextLabel.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-09-26 19:21:10 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-09-26 19:21:10 +0300
commitbbf37bf633cdafa921b6ecd29c515f6984908eeb (patch)
treef0d947692ba71765bcead863f5be75522f14c302 /src/ui/TextLabel.h
parentMove TextLabel into its own file (diff)
downloadnheko-bbf37bf633cdafa921b6ecd29c515f6984908eeb.tar.xz
Don't clear selection when a context menu is requested
Diffstat (limited to 'src/ui/TextLabel.h')
-rw-r--r--src/ui/TextLabel.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ui/TextLabel.h b/src/ui/TextLabel.h

index da6e9c4b..1470d64e 100644 --- a/src/ui/TextLabel.h +++ b/src/ui/TextLabel.h
@@ -9,6 +9,22 @@ class QMouseEvent; class QFocusEvent; class QWheelEvent; +class ContextMenuFilter : public QObject +{ + Q_OBJECT + +public: + explicit ContextMenuFilter(QWidget *parent) + : QObject(parent) + {} + +signals: + void contextMenuIsOpening(); + +protected: + bool eventFilter(QObject *obj, QEvent *event); +}; + class TextLabel : public QTextBrowser { Q_OBJECT @@ -35,4 +51,5 @@ signals: private: QString link_; + bool contextMenuRequested_ = false; };