Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Signals | Public Member Functions | Protected Member Functions | List of all members
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)
 Handles the mouse release event.
 
void mousePressEvent (QMouseEvent *event)
 Handles the mouse press event.
 
void contextMenuEvent (QContextMenuEvent *event)
 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)
protected

Handles the context menu event.

Parameters
eventThe context menu event details.

◆ mousePressEvent()

void ClickableLabel::mousePressEvent ( QMouseEvent *  event)
protected

Handles the mouse press event.

Parameters
eventThe mouse event details.

◆ mouseReleaseEvent()

void ClickableLabel::mouseReleaseEvent ( QMouseEvent *  event)
protected

Handles the mouse release event.

Parameters
eventThe mouse event details.

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