KanoopGuiQt 1.3.0
Qt GUI utility library
Loading...
Searching...
No Matches
SpinnerWidget Class Reference

Animated spinner widget for indicating background activity. More...

#include <spinnerwidget.h>

+ Inheritance diagram for SpinnerWidget:
+ Collaboration diagram for SpinnerWidget:

Public Slots

void setSpinning (bool value)
 Start or stop the spinner animation.
 
void setValue (int value)
 Set the numeric value displayed in the center.
 
void setTextVisible (bool value)
 Show or hide the center text overlay.
 

Public Member Functions

 SpinnerWidget (QWidget *parent=nullptr)
 Construct with an optional parent.
 
int value () const
 Return the integer value painted in the center of the spinner.
 
bool isTextVisible () const
 Return whether the optional text overlay is visible.
 
bool isSpinning () const
 Return whether the spinner animation is currently running.
 

Detailed Description

Animated spinner widget for indicating background activity.

SpinnerWidget renders a rotating set of pre-built pixmaps driven by an internal QTimer. An optional numeric value can be painted in the center. Call setSpinning(true) to start the animation and setSpinning(false) to stop.

Definition at line 14 of file spinnerwidget.h.

Constructor & Destructor Documentation

◆ SpinnerWidget()

SpinnerWidget::SpinnerWidget ( QWidget *  parent = nullptr)
explicit

Construct with an optional parent.

Parameters
parentOptional QWidget parent

Member Function Documentation

◆ isSpinning()

bool SpinnerWidget::isSpinning ( ) const
inline

Return whether the spinner animation is currently running.

Returns
true if the timer is active

Definition at line 40 of file spinnerwidget.h.

◆ isTextVisible()

bool SpinnerWidget::isTextVisible ( ) const
inline

Return whether the optional text overlay is visible.

Returns
true if text is shown

Definition at line 34 of file spinnerwidget.h.

◆ setSpinning

void SpinnerWidget::setSpinning ( bool  value)
slot

Start or stop the spinner animation.

Parameters
valuetrue to start, false to stop

◆ setTextVisible

void SpinnerWidget::setTextVisible ( bool  value)
inlineslot

Show or hide the center text overlay.

Parameters
valuetrue to show, false to hide

Definition at line 59 of file spinnerwidget.h.

◆ setValue

void SpinnerWidget::setValue ( int  value)
inlineslot

Set the numeric value displayed in the center.

Parameters
valueInteger to paint

Definition at line 53 of file spinnerwidget.h.

◆ value()

int SpinnerWidget::value ( ) const
inline

Return the integer value painted in the center of the spinner.

Returns
Current value

Definition at line 28 of file spinnerwidget.h.


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