diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-11-24 14:26:20 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-11-24 14:35:03 +0100 |
commit | 827d9a3be8209587c532f061753e99730b9be4c4 (patch) | |
tree | 95ef51b6773b4d9f2ef8b2ff999188bd96632a9c /src/qt/guiutil.h | |
parent | bc121b0eb19713ec72002b5be03ba5ac35903a17 (diff) |
qt: Replace NetworkToggleStatusBarControl with generic ClickableLabel
Generalize the clickable label functionality.
We will use this to add similar functionality to the sync icon.
Diffstat (limited to 'src/qt/guiutil.h')
-rw-r--r-- | src/qt/guiutil.h | 14 |
1 files changed, 14 insertions, 0 deletions
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 <QProgressBar> #include <QString> #include <QTableView> +#include <QLabel> #include <boost/filesystem.hpp> @@ -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 |