Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
ClickableLabel Class Reference

A custom QLabel that emits signals when clicked. More...

#include <clickable_label.h>

Inheritance diagram for ClickableLabel:

Signals

void clicked ()
 Signal emitted when the label is clicked.
void clickedAt (const QPoint &global_pos, Qt::MouseButton button)
 Signal emitted when the label is clicked, providing position and button details.

Public Member Functions

 ClickableLabel (QWidget *parent=0)
 Constructs a new ClickableLabel.

Protected Member Functions

void mouseReleaseEvent (QMouseEvent *event) override
 Handles the mouse release event.
void mousePressEvent (QMouseEvent *event) override
 Handles the mouse press event.
void contextMenuEvent (QContextMenuEvent *event) override
 Handles the context menu event.

Detailed Description

A custom QLabel that emits signals when clicked.

Constructor & Destructor Documentation

◆ ClickableLabel()

ClickableLabel::ClickableLabel ( QWidget * parent = 0)
explicit

Constructs a new ClickableLabel.

Parameters
parentThe parent widget, defaults to 0.

Member Function Documentation

◆ clickedAt

void ClickableLabel::clickedAt ( const QPoint & global_pos,
Qt::MouseButton button )
signal

Signal emitted when the label is clicked, providing position and button details.

Parameters
global_posThe global position of the click.
buttonThe mouse button that was clicked.

◆ contextMenuEvent()

void ClickableLabel::contextMenuEvent ( QContextMenuEvent * event)
overrideprotected

Handles the context menu event.

Parameters
eventThe context menu event details.

◆ mousePressEvent()

void ClickableLabel::mousePressEvent ( QMouseEvent * event)
overrideprotected

Handles the mouse press event.

Parameters
eventThe mouse event details.

◆ mouseReleaseEvent()

void ClickableLabel::mouseReleaseEvent ( QMouseEvent * event)
overrideprotected

Handles the mouse release event.

Parameters
eventThe mouse event details.

The documentation for this class was generated from the following files: