| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
clickable_label.h
Go to the documentation of this file.
1
11
12#ifndef CLICKABLE_LABEL_H_
13#define CLICKABLE_LABEL_H_
14
15#include <QLabel>
16
20 class ClickableLabel : public QLabel
21{
22 Q_OBJECT
23 public:
28 explicit ClickableLabel(QWidget* parent=0);
29
30signals:
34 void clicked();
35
41 void clickedAt(const QPoint &global_pos, Qt::MouseButton button);
42
43 protected:
48 void mouseReleaseEvent(QMouseEvent* event) override;
49
54 void mousePressEvent(QMouseEvent *event) override;
55
60 void contextMenuEvent(QContextMenuEvent *event) override;
61};
62
63#endif /* CLICKABLE_LABEL_H_ */
ClickableLabel::mouseReleaseEvent
void mouseReleaseEvent(QMouseEvent *event) override
Handles the mouse release event.
Definition clickable_label.cpp:23
ClickableLabel::ClickableLabel
ClickableLabel(QWidget *parent=0)
Constructs a new ClickableLabel.
Definition clickable_label.cpp:16
ClickableLabel::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *event) override
Handles the context menu event.
Definition clickable_label.cpp:42
ClickableLabel::clickedAt
void clickedAt(const QPoint &global_pos, Qt::MouseButton button)
Signal emitted when the label is clicked, providing position and button details.
ClickableLabel::clicked
void clicked()
Signal emitted when the label is clicked.
ClickableLabel::mousePressEvent
void mousePressEvent(QMouseEvent *event) override
Handles the mouse press event.
Definition clickable_label.cpp:36