Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
pqClickableLabel Class Reference

A simple clickable label that mimics a push button and emits onClicked event. More...

#include <pqClickableLabel.h>

Inherits QLabel.

Signals

void onClicked (QWidget *widget)
 Signal emitted when the label is clicked (to mimic a push button) More...
 

Public Member Functions

 pqClickableLabel ()=delete
 Default constructor is deleted. More...
 
 pqClickableLabel (QWidget *widget, const QString &text, const QString &tooltip, const QString &statusTip, QPixmap *pixmap, QWidget *parent)
 Default constructor that sets up the tooltip and the label pixmap or text. More...
 
 ~pqClickableLabel () override=default
 Defaulted destructor for polymorphism. More...
 

Protected Member Functions

void mousePressEvent (QMouseEvent *event) override
 

Protected Attributes

QWidget * Widget = nullptr
 

Detailed Description

A simple clickable label that mimics a push button and emits onClicked event.

Definition at line 43 of file pqClickableLabel.h.

Constructor & Destructor Documentation

◆ pqClickableLabel() [1/2]

pqClickableLabel::pqClickableLabel ( )
delete

Default constructor is deleted.

◆ pqClickableLabel() [2/2]

pqClickableLabel::pqClickableLabel ( QWidget *  widget,
const QString &  text,
const QString &  tooltip,
const QString &  statusTip,
QPixmap *  pixmap,
QWidget *  parent 
)

Default constructor that sets up the tooltip and the label pixmap or text.

If the pixmap is nullptr, it will not be set.

◆ ~pqClickableLabel()

pqClickableLabel::~pqClickableLabel ( )
overridedefault

Defaulted destructor for polymorphism.

Member Function Documentation

◆ onClicked

void pqClickableLabel::onClicked ( QWidget *  widget)
signal

Signal emitted when the label is clicked (to mimic a push button)

Parameters
[in]wthe widget attached to the pqClickableLabel

◆ mousePressEvent()

void pqClickableLabel::mousePressEvent ( QMouseEvent *  event)
overrideprotected

Member Data Documentation

◆ Widget

QWidget* pqClickableLabel::Widget = nullptr
protected

Definition at line 78 of file pqClickableLabel.h.


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