From 827d9a3be8209587c532f061753e99730b9be4c4 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 24 Nov 2016 14:26:20 +0100 Subject: qt: Replace NetworkToggleStatusBarControl with generic ClickableLabel Generalize the clickable label functionality. We will use this to add similar functionality to the sync icon. --- src/qt/guiutil.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/qt/guiutil.h') diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index 8f1f3fbb2c..9a17d24f07 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -14,6 +14,7 @@ #include #include #include +#include #include @@ -215,6 +216,19 @@ namespace GUIUtil typedef QProgressBar ProgressBar; #endif + class ClickableLabel : public QLabel + { + Q_OBJECT + + Q_SIGNALS: + /** Emitted when the label is clicked. The relative mouse coordinates of the click are + * passed to the signal. + */ + void clicked(const QPoint& point); + protected: + void mousePressEvent(QMouseEvent *event); + }; + } // namespace GUIUtil #endif // BITCOIN_QT_GUIUTIL_H -- cgit v1.2.3