diff options
| author | Xusheng <xusheng@vector35.com> | 2023-09-19 13:03:03 +0800 |
|---|---|---|
| committer | Xusheng <xusheng@vector35.com> | 2023-09-19 15:00:12 +0800 |
| commit | b1e5ac87b14610a577292a85319047426ff47a8e (patch) | |
| tree | 6f61e76862c1be76ffbaaf279879dad0194092d2 /ui | |
| parent | beb79f0a7aa38bdf6818056d8c21c6e599456be8 (diff) | |
Extract class CopyableLabel to an independent file. Fix https://github.com/Vector35/binaryninja/issues/525 and https://github.com/Vector35/binaryninja-api/issues/4630
Diffstat (limited to 'ui')
| -rw-r--r-- | ui/copyablelable.h | 14 |
1 files changed, 14 insertions, 0 deletions
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 <QLabel> +#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; +}; |
