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

A pulsing skeleton placeholder widget. More...

#include <loading_widgets.h>

Inheritance diagram for SkeletonWidget:
Collaboration diagram for SkeletonWidget:

Public Member Functions

 SkeletonWidget (const QSize &size, QWidget *parent=nullptr, ThemeManager *themeManager=nullptr)
 SkeletonWidget (int width, int height, QWidget *parent=nullptr, ThemeManager *themeManager=nullptr)
 ~SkeletonWidget () override=default
void setBaseColor (const QColor &color)
void setCornerRadius (int radius)
void setHighlightColor (const QColor &color)
void setShimmerOffset (qreal offset)
qreal shimmerOffset () const
void startAnimation ()
void stopAnimation ()

Protected Member Functions

void hideEvent (QHideEvent *event) override
void paintEvent (QPaintEvent *event) override
void showEvent (QShowEvent *event) override

Detailed Description

A pulsing skeleton placeholder widget.

Shows an animated gradient that pulses to indicate loading. Used as a placeholder while content is being fetched.

Usage: auto* skeleton = new SkeletonWidget(200, 30); // width x height layout->addWidget(skeleton); // Later, replace with actual content

Definition at line 38 of file loading_widgets.h.

Constructor & Destructor Documentation

◆ SkeletonWidget() [1/2]

SkeletonWidget::SkeletonWidget ( int width,
int height,
QWidget * parent = nullptr,
ThemeManager * themeManager = nullptr )
explicit

Definition at line 23 of file loading_widgets.cpp.

Referenced by SkeletonWidget().

◆ SkeletonWidget() [2/2]

SkeletonWidget::SkeletonWidget ( const QSize & size,
QWidget * parent = nullptr,
ThemeManager * themeManager = nullptr )
explicit

Definition at line 37 of file loading_widgets.cpp.

References SkeletonWidget().

◆ ~SkeletonWidget()

SkeletonWidget::~SkeletonWidget ( )
overridedefault

Member Function Documentation

◆ hideEvent()

void SkeletonWidget::hideEvent ( QHideEvent * event)
overrideprotected

Definition at line 74 of file loading_widgets.cpp.

References stopAnimation().

◆ paintEvent()

void SkeletonWidget::paintEvent ( QPaintEvent * event)
overrideprotected

Definition at line 80 of file loading_widgets.cpp.

◆ setBaseColor()

void SkeletonWidget::setBaseColor ( const QColor & color)
inline

Definition at line 55 of file loading_widgets.h.

◆ setCornerRadius()

void SkeletonWidget::setCornerRadius ( int radius)
inline

Definition at line 50 of file loading_widgets.h.

◆ setHighlightColor()

void SkeletonWidget::setHighlightColor ( const QColor & color)
inline

Definition at line 60 of file loading_widgets.h.

◆ setShimmerOffset()

void SkeletonWidget::setShimmerOffset ( qreal offset)
inline

Definition at line 70 of file loading_widgets.h.

◆ shimmerOffset()

qreal SkeletonWidget::shimmerOffset ( ) const
inline

Definition at line 66 of file loading_widgets.h.

◆ showEvent()

void SkeletonWidget::showEvent ( QShowEvent * event)
overrideprotected

Definition at line 68 of file loading_widgets.cpp.

References startAnimation().

◆ startAnimation()

void SkeletonWidget::startAnimation ( )

Definition at line 52 of file loading_widgets.cpp.

Referenced by showEvent().

◆ stopAnimation()

void SkeletonWidget::stopAnimation ( )

Definition at line 60 of file loading_widgets.cpp.

Referenced by hideEvent().


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