diff options
Diffstat (limited to 'lumina-desktop/desktop-plugins/applauncher/OutlineToolButton.h')
-rw-r--r-- | lumina-desktop/desktop-plugins/applauncher/OutlineToolButton.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lumina-desktop/desktop-plugins/applauncher/OutlineToolButton.h b/lumina-desktop/desktop-plugins/applauncher/OutlineToolButton.h index 7c8c012d..68540292 100644 --- a/lumina-desktop/desktop-plugins/applauncher/OutlineToolButton.h +++ b/lumina-desktop/desktop-plugins/applauncher/OutlineToolButton.h @@ -18,6 +18,7 @@ #include <QStylePainter> #include <QFont> #include <QDebug> +#include <QMouseEvent> class OutlineToolButton : public QToolButton{ @@ -31,7 +32,21 @@ public: } ~OutlineToolButton(){} +signals: + void DoubleClicked(); + protected: + void mouseDoubleClickEvent(QMouseEvent *ev){ + ev->accept(); + emit DoubleClicked(); + } + void mousePressEvent(QMouseEvent *ev){ + ev->ignore(); + } + void mouseReleaseEvent(QMouseEvent *ev){ + ev->ignore(); + } + void paintEvent(QPaintEvent*){ /* NOTE: This is what a standard QToolButton performs (peeked at Qt source code for this tidbit) QStylePainter p(this); |