Loading...
Searching...
No Matches
ClickableLabel

Detailed Description

Classes

struct  IconImage
 
class  ClickableLabel
 
class  ClickableIcon
 
class  ClickableStateLabel
 

Class Documentation

◆ IconImage

struct IconImage

Static Public Member Functions

static IconImage generate (const QImage &activeSrc, const QImage &inactiveSrc)
 

Public Attributes

QImage activeOriginal
 
QImage inactiveOriginal
 
QImage active
 
QImage activeHover
 
QImage inactive
 
QImage inactiveHover
 

Member Function Documentation

◆ generate()

static IconImage IconImage::generate ( const QImage & activeSrc,
const QImage & inactiveSrc )
static

Member Data Documentation

◆ activeOriginal

QImage IconImage::activeOriginal

◆ inactiveOriginal

QImage IconImage::inactiveOriginal

◆ active

QImage IconImage::active

◆ activeHover

QImage IconImage::activeHover

◆ inactive

QImage IconImage::inactive

◆ inactiveHover

QImage IconImage::inactiveHover

◆ ClickableLabel

class ClickableLabel

Signals

void clicked ()
 

Public Member Functions

 ClickableLabel (QWidget *parent=nullptr, const QString &name="")
 
void passThroughMousePressEvent (bool enable)
 

Protected Member Functions

void mousePressEvent (QMouseEvent *event) override
 
void mouseReleaseEvent (QMouseEvent *event) override
 

Constructor & Destructor Documentation

◆ ClickableLabel()

ClickableLabel::ClickableLabel ( QWidget * parent = nullptr,
const QString & name = "" )
inline

Member Function Documentation

◆ passThroughMousePressEvent()

void ClickableLabel::passThroughMousePressEvent ( bool enable)
inline

◆ clicked

void ClickableLabel::clicked ( )
signal

◆ mousePressEvent()

void ClickableLabel::mousePressEvent ( QMouseEvent * event)
inlineoverrideprotected

◆ mouseReleaseEvent()

void ClickableLabel::mouseReleaseEvent ( QMouseEvent * event)
inlineoverrideprotected

◆ ClickableIcon

class ClickableIcon

Signals

void clicked ()
 
void toggle (bool newState)
 

Public Member Functions

 ClickableIcon (const QImage &activeIcon, const QImage &inactiveIcon, const QSize &desiredPointSize)
 
 ClickableIcon (const QImage &icon, const QSize &desiredPointSize)
 
void setAllowToggle (bool canToggle)
 
void setActive (bool state)
 
bool active () const
 
void setImage (const QImage &icon)
 
void setImage (const QImage &activeIcon, const QImage &inactiveIcon)
 
QSize desiredPointSize () const
 
void setDesiredPointSize (const QSize &size)
 
double opacity () const
 
void setOpacity (double opacity)
 

Protected Member Functions

void enterEvent (QEnterEvent *event) override
 
void leaveEvent (QEvent *event) override
 
void paintEvent (QPaintEvent *event) override
 
void mousePressEvent (QMouseEvent *) override
 
void mouseReleaseEvent (QMouseEvent *event) override
 

Properties

QSize desiredPointSize
 
double opacity
 

Constructor & Destructor Documentation

◆ ClickableIcon() [1/2]

ClickableIcon::ClickableIcon ( const QImage & activeIcon,
const QImage & inactiveIcon,
const QSize & desiredPointSize )

◆ ClickableIcon() [2/2]

ClickableIcon::ClickableIcon ( const QImage & icon,
const QSize & desiredPointSize )
inline

Member Function Documentation

◆ setAllowToggle()

void ClickableIcon::setAllowToggle ( bool canToggle)

◆ setActive()

void ClickableIcon::setActive ( bool state)

◆ active()

bool ClickableIcon::active ( ) const
inline

◆ setImage() [1/2]

void ClickableIcon::setImage ( const QImage & icon)

◆ setImage() [2/2]

void ClickableIcon::setImage ( const QImage & activeIcon,
const QImage & inactiveIcon )

◆ desiredPointSize()

QSize ClickableIcon::desiredPointSize ( ) const
inline

◆ setDesiredPointSize()

void ClickableIcon::setDesiredPointSize ( const QSize & size)
inline

◆ opacity()

double ClickableIcon::opacity ( ) const
inline

◆ setOpacity()

void ClickableIcon::setOpacity ( double opacity)
inline

◆ clicked

void ClickableIcon::clicked ( )
signal

◆ toggle

void ClickableIcon::toggle ( bool newState)
signal

◆ enterEvent()

void ClickableIcon::enterEvent ( QEnterEvent * event)
overrideprotected

◆ leaveEvent()

void ClickableIcon::leaveEvent ( QEvent * event)
overrideprotected

◆ paintEvent()

void ClickableIcon::paintEvent ( QPaintEvent * event)
overrideprotected

◆ mousePressEvent()

void ClickableIcon::mousePressEvent ( QMouseEvent * )
inlineoverrideprotected

◆ mouseReleaseEvent()

void ClickableIcon::mouseReleaseEvent ( QMouseEvent * event)
overrideprotected

Property Documentation

◆ desiredPointSize

QSize ClickableIcon::desiredPointSize
readwrite

◆ opacity

double ClickableIcon::opacity
readwrite

◆ ClickableStateLabel

class ClickableStateLabel

Public Member Functions

 ClickableStateLabel (QWidget *parent, const QString &name, const QString &altName)
 
bool getState ()
 
void setDisplayState (bool state)
 
void setAlternateTransparency (QPalette::ColorRole colorRole, int alpha, bool state)
 
- Public Member Functions inherited from ClickableLabel
 ClickableLabel (QWidget *parent=nullptr, const QString &name="")
 
void passThroughMousePressEvent (bool enable)
 

Protected Member Functions

void paintEvent (QPaintEvent *event) override
 
- Protected Member Functions inherited from ClickableLabel
void mousePressEvent (QMouseEvent *event) override
 
void mouseReleaseEvent (QMouseEvent *event) override
 

Additional Inherited Members

- Signals inherited from ClickableLabel
void clicked ()
 

Constructor & Destructor Documentation

◆ ClickableStateLabel()

ClickableStateLabel::ClickableStateLabel ( QWidget * parent,
const QString & name,
const QString & altName )
inline

Member Function Documentation

◆ getState()

bool ClickableStateLabel::getState ( )
inline

◆ setDisplayState()

void ClickableStateLabel::setDisplayState ( bool state)
inline

◆ setAlternateTransparency()

void ClickableStateLabel::setAlternateTransparency ( QPalette::ColorRole colorRole,
int alpha,
bool state )
inline

◆ paintEvent()

void ClickableStateLabel::paintEvent ( QPaintEvent * event)
inlineoverrideprotected