Spinner Class

class SpinnerSolution::Spinner

The Spinner class renders a circular, endlessly animated progress indicator, that may be attached to any widget as an overlay. More...

Header: #include <solutions/spinner/spinner.h>
Inherits: QObject

Public Functions

Spinner(SpinnerSolution::SpinnerSize size, QWidget *parent = nullptr)
void hide()
bool isVisible() const
void setColor(const QColor &color)
void setSize(SpinnerSolution::SpinnerSize size)
void setVisible(bool visible)
void show()

Detailed Description

Member Function Documentation

[explicit] Spinner::Spinner(SpinnerSolution::SpinnerSize size, QWidget *parent = nullptr)

Creates a spinner overlay with a given size for the passed parent widget.

The parent widget takes the ownership of the created spinner.

void Spinner::hide()

Hides the spinner.

bool Spinner::isVisible() const

Returns true if the spinner is visible; otherwise, returns false.

void Spinner::setColor(const QColor &color)

Sets the color of the spinner to color.

void Spinner::setSize(SpinnerSolution::SpinnerSize size)

Sets the size of the spinner to the given size.

void Spinner::setVisible(bool visible)

Shows or hides the spinner depending on the value of visible. By default, the spinner is visible.

See also isVisible().

void Spinner::show()

Shows the animated spinner as an overlay for the parent widget set previously in the constructor.