API Documentation
|
Allows for showing of progress bar in horizontal format. Defaults to look and feel of system progress bar. More...
#include <QCustomProgressbar.h>
Public Member Functions | |
void | addProgressColor (fltp08 percent, RGBColor color) |
void | clearProgressColors () |
bool | isIndeterminateState () const |
fltp08 | percent () const |
QCustomProgressBar (QWidget *parent=nullptr) | |
void | setDrawBackground (bool draw_background) |
void | setFormat (const String &format) |
virtual void | setIndeterminateAnimationTimespan (const TimeSpan &span) |
virtual void | setMessage (const TranslatedString &message) |
virtual void | setPercent (fltp08 percent) |
void | setProgressColor (RGBColor color) |
void | setProgressColors (const Buffer< RGBColor > &colors) |
virtual void | setToIndeterminateState (bool is_indeterminate) |
virtual | ~QCustomProgressBar () override |
Protected Slots | |
void | updateFromTimer () |
Protected Member Functions | |
QString | customText () const |
fltp08 | indeterminatePercent () const |
QSize | minimumSizeHint () const override |
void | paintEvent (QPaintEvent *event) override |
QSize | sizeHint () const override |
void | updateProgressColor () |
Protected Attributes | |
bool | m_draw_background |
TimeSpan | m_indeterminate_period = TimeSpan(1.0) |
QString | m_last_text |
Buffer< std::pair< fltp08, RGBColor > > | m_progress_colors |
QTimer * | m_update_timer |
Allows for showing of progress bar in horizontal format. Defaults to look and feel of system progress bar.
A progress bar is used to give the user an indication of the progress of an operation and to reassure them that the application is still running.
The progress bar uses the concept of percent from 0.0 to 1.0. It will display the percentage specified or can be set to an indeterminate or "spinning" state to indicate progress is occuring, but at an unknown rate.
|
explicit |
|
overridevirtual |
called multiple times to form a gradiant. Parameters: percent - The percent where this color will be most prominant. color - The color use at the given percent
void clearProgressColors | ( | ) |
|
nodiscardprotected |
|
nodiscardprotected |
|
nodiscard |
|
nodiscardoverrideprotected |
|
overrideprotected |
|
nodiscard |
void setDrawBackground | ( | bool | draw_background | ) |
Parameters: draw_background - Whether or not to draw the background
void setFormat | ( | const String & | format | ) |
if progress is indeterminate. Untranslated version of setMessage.
Parameters: message - The message to display inside the progress widget
|
virtual |
Parameters: span - The span of time between a complete rotation or color animation when the widget is set to indeterminate progress
Reimplemented in ProgressWidget.
|
virtual |
if progress is indeterminate. Translated version of setFormat.
Parameters: message - The message to display inside the progress widget
|
virtual |
percent - The percent that the progress bar is between 0.0 and 1.0. Invalid will set the value to indeterminate or "spinning" state
void setProgressColor | ( | RGBColor | color | ) |
Parameters: color - The color to use as the progress bar
Parameters: colors - The colors to use. Will be evenly spaced out across progress.
|
virtual |
an animation to indicate something is happening, but that a percent could not be determined. Can also be triggered by setPercent using Invalid to make indeterminate or a real number to make progress. Parameters: is_indeterminate - whether to make the progress bar indeterminate
|
nodiscardoverrideprotected |
|
protectedslot |
|
protected |
|
protected |
|
protected |
|
protected |