From b1e5ac87b14610a577292a85319047426ff47a8e Mon Sep 17 00:00:00 2001 From: Xusheng Date: Tue, 19 Sep 2023 13:03:03 +0800 Subject: Extract class CopyableLabel to an independent file. Fix https://github.com/Vector35/binaryninja/issues/525 and https://github.com/Vector35/binaryninja-api/issues/4630 --- ui/copyablelable.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ui/copyablelable.h (limited to 'ui') diff --git a/ui/copyablelable.h b/ui/copyablelable.h new file mode 100644 index 00000000..9cca2bef --- /dev/null +++ b/ui/copyablelable.h @@ -0,0 +1,14 @@ +#include +#include "uitypes.h" + +class BINARYNINJAUIAPI CopyableLabel: public QLabel +{ + QColor m_desiredColor {}; + QString altText = ""; + +public: + CopyableLabel(const QString& text, const QColor& color, bool show = true); + void enterEvent(QEnterEvent* event) override; + void leaveEvent(QEvent* event) override; + void mousePressEvent(QMouseEvent* event) override; +}; -- cgit v1.3.1