ProgressIndicatorPainter Classclass Utils::ProgressIndicatorPainter
The ProgressIndicatorPainter class is the painting backend for the ProgressIndicator class. More...
|void||paint(QPainter &painter, const QRect &rect) const|
|void||setUpdateCallback(const Utils::ProgressIndicatorPainter::UpdateCallback &cb)|
You can use it to paint a circular, endlessly animated progress indicator directly onto a QPaintDevice, for example, if you want to show a progress indicator where you cannot use a QWidget.
Member Function Documentation
Constructs a progress indicator painter for the indicator size.
See also setUpdateCallback.
Utils::ProgressIndicatorSize ProgressIndicatorPainter::indicatorSize() const
Returns the current indicator size. Use size to get the resulting pixel size.
See also setIndicatorSize.
void ProgressIndicatorPainter::paint(QPainter &painter, const QRect &rect) const
Paints the progress indicator centered in the rect on the given painter.
See also size.
void ProgressIndicatorPainter::setIndicatorSize(Utils::ProgressIndicatorSize size)
Changes the size of the progress indicator to size. Users of the class need to adapt their painting or layouting code to the change in resulting pixel size.
See also indicatorSize and size.
void ProgressIndicatorPainter::setUpdateCallback(const Utils::ProgressIndicatorPainter::UpdateCallback &cb)
Sets the callback cb that is called whenever the progress indicator needs a repaint, because its animation progressed. The callback is a void function taking no parameters, and should usually trigger a QWidget::update on the widget that does the actual painting.
QSize ProgressIndicatorPainter::size() const
Returns the size of the progress indicator in device independent pixels.
See also setIndicatorSize and paint.
Starts the progress indicator animation.
See also setUpdateCallback and stopAnimation.
Stops the progress indicator animation.
See also setUpdateCallback and startAnimation.
© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.