diff options
| author | hibby <d@vehibberd.com> | 2018-02-16 15:17:14 +0000 |
|---|---|---|
| committer | hibby <d@vehibberd.com> | 2018-02-16 15:17:14 +0000 |
| commit | 37f727ac0746fd85504aa46c1f023c09b3eff33a (patch) | |
| tree | c8a7ce04545040a8f161ba279528730bd9a3e6ab /DoubleClickablePushButton.hpp | |
| parent | d63dd8d081a6fcd0715cd13f26df59fb831769d2 (diff) | |
New upstream version 1.8.0+repackupstream/1.8.0+repack
Diffstat (limited to 'DoubleClickablePushButton.hpp')
| -rw-r--r-- | DoubleClickablePushButton.hpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/DoubleClickablePushButton.hpp b/DoubleClickablePushButton.hpp new file mode 100644 index 00000000..ebc1ab84 --- /dev/null +++ b/DoubleClickablePushButton.hpp @@ -0,0 +1,27 @@ +#ifndef DOUBLE_CLICKABLE_PUSH_BUTTON_HPP_ +#define DOUBLE_CLICKABLE_PUSH_BUTTON_HPP_ + +#include <QPushButton> + +// +// DoubleClickablePushButton - QPushButton that emits a mouse double +// click signal +// +// Clients should be aware of the QWidget::mouseDoubleClickEvent() +// notes about receipt of mouse press and mouse release events. +// +class DoubleClickablePushButton + : public QPushButton +{ + Q_OBJECT + +public: + DoubleClickablePushButton (QWidget * = nullptr); + + Q_SIGNAL void doubleClicked (); + +protected: + void mouseDoubleClickEvent (QMouseEvent *) override; +}; + +#endif |
