game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
Loading...
Searching...
No Matches
StatusIndicator Class Reference

Base class for clickable status bar indicators. More...

#include <status_indicators.h>

Inheritance diagram for StatusIndicator:
Collaboration diagram for StatusIndicator:

Public Member Functions

 StatusIndicator (QWidget *parent=nullptr, ThemeManager *themeManager=nullptr)
void clicked ()
void setIcon (const QString &icon)
void setText (const QString &text)
void setTooltipText (const QString &tip)

Protected Member Functions

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

Protected Attributes

bool hovered_ = false
QLabel * iconLabel_ = nullptr
bool pressed_ = false
QLabel * textLabel_ = nullptr
ThemeManager * themeManager_

Detailed Description

Base class for clickable status bar indicators.

Provides consistent styling and click behavior for status bar widgets.

Definition at line 43 of file status_indicators.h.

Constructor & Destructor Documentation

◆ StatusIndicator()

StatusIndicator::StatusIndicator ( QWidget * parent = nullptr,
ThemeManager * themeManager = nullptr )
explicit

Member Function Documentation

◆ clicked()

◆ enterEvent()

void StatusIndicator::enterEvent ( QEnterEvent * event)
overrideprotected

Definition at line 103 of file status_indicators.cpp.

References hovered_, and updateTextColors().

◆ leaveEvent()

void StatusIndicator::leaveEvent ( QEvent * event)
overrideprotected

Definition at line 111 of file status_indicators.cpp.

References hovered_, pressed_, and updateTextColors().

◆ mousePressEvent()

void StatusIndicator::mousePressEvent ( QMouseEvent * event)
overrideprotected

Definition at line 120 of file status_indicators.cpp.

References pressed_, and updateTextColors().

◆ mouseReleaseEvent()

void StatusIndicator::mouseReleaseEvent ( QMouseEvent * event)
overrideprotected

Definition at line 130 of file status_indicators.cpp.

References clicked(), pressed_, and updateTextColors().

◆ paintEvent()

void StatusIndicator::paintEvent ( QPaintEvent * event)
overrideprotected

◆ setIcon()

◆ setText()

◆ setTooltipText()

◆ updateTextColors()

Member Data Documentation

◆ hovered_

bool StatusIndicator::hovered_ = false
protected

Definition at line 68 of file status_indicators.h.

Referenced by enterEvent(), leaveEvent(), and paintEvent().

◆ iconLabel_

QLabel* StatusIndicator::iconLabel_ = nullptr
protected

Definition at line 66 of file status_indicators.h.

Referenced by StatusIndicator(), setIcon(), and updateTextColors().

◆ pressed_

bool StatusIndicator::pressed_ = false
protected

◆ textLabel_

QLabel* StatusIndicator::textLabel_ = nullptr
protected

Definition at line 67 of file status_indicators.h.

Referenced by StatusIndicator(), setText(), and updateTextColors().

◆ themeManager_

ThemeManager* StatusIndicator::themeManager_
protected

Definition at line 70 of file status_indicators.h.

Referenced by StatusIndicator(), paintEvent(), and updateTextColors().


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