API Documentation
|
Allows for showing of progress bar in horizontal format. Defaults to look and feel of system progress. More...
#include <QCustomProgressbar.h>
Public Member Functions | |
QCustomProgressBar (QWidget *parent=nullptr) | |
virtual | ~QCustomProgressBar () override |
void | setProgressColor (RGBColor color) |
Wipes and custom colors and uses the defined color as the progress bar. Parameters: | |
void | addProgressColor (fltp08 percent, RGBColor color) |
Sets the progress bar color to a given one as the progress aproaches the percent. Meant to be called multiple times to form a gradiant. Parameters: percent - The percent where this color will be most prominant. | |
void | setProgressColors (const Buffer< RGBColor > &colors) |
Sets the progress bar to colors depending on the percent. Parameters: | |
void | clearProgressColors () |
virtual void | setPercent (fltp08 percent) |
fltp08 | percent () const |
bool | isIndeterminateState () const |
void | setDrawBackground (bool draw_background) |
Sets whether or not the background should be drawn (Default is true) | |
virtual void | setMessage (const TranslatedString &message) |
Sets the translated message to be displayed. p% will be replaced with the current progress or removed if progress is indeterminate. Translated version of setFormat. | |
void | setFormat (const String &format) |
Sets the format to be displayed. p% will be replaced with the current progress or removed if progress is indeterminate. Untranslated version of setMessage. | |
virtual void | setToIndeterminateState (bool is_indeterminate) |
Sets whether the procress bar is indeterminate. An indeterminate progress bar will have an animation to indicate something is happening, but that a percent could not be determined. Can also be triggered by setPercent using NaN to make indeterminate or a real number to make progress. Parameters: | |
virtual void | setIndeterminateAnimationTimespan (const TimeSpan &span) |
Sets the speed of animations when progress is undefined, or NaN. | |
Protected Slots | |
void | updateFromTimer () |
Protected Member Functions | |
QSize | sizeHint () const override |
QSize | minimumSizeHint () const override |
fltp08 | indeterminatePercent () const |
QString | customText () const |
void | paintEvent (QPaintEvent *event) override |
void | updateProgressColor () |
Protected Attributes | |
QTimer * | m_update_timer |
TimeSpan | m_indeterminate_period = TimeSpan(1.0) |
Buffer< std::pair< fltp08, RGBColor > > | m_progress_colors |
QString | m_last_text |
bool | m_draw_background |
Allows for showing of progress bar in horizontal format. Defaults to look and feel of system progress.
|
explicit |
|
overridevirtual |
Sets the progress bar color to a given one as the progress aproaches the percent. Meant to be called multiple times to form a gradiant. Parameters: percent - The percent where this color will be most prominant.
Fn: bool QCustomProgressBar::addProgressColor(fltp08 percent, const RGBColor& colors);
void clearProgressColors | ( | ) |
|
nodiscardprotected |
|
nodiscardprotected |
|
nodiscard |
Fn: bool QCustomProgressBar::isIndeterminateState();
|
nodiscardoverrideprotected |
|
overrideprotected |
|
nodiscard |
void setDrawBackground | ( | bool | draw_background | ) |
Sets whether or not the background should be drawn (Default is true)
Fn: void QCustomProgressBar::setDrawBackground(bool draw_background);
Parameters:
void setFormat | ( | const String & | format | ) |
Sets the format to be displayed. p% will be replaced with the current progress or removed if progress is indeterminate. Untranslated version of setMessage.
Fn: void QCustomProgressBar::setFormat(const String& span);
Parameters:
|
virtual |
Sets the speed of animations when progress is undefined, or NaN.
Fn: void QCustomProgressBar::setIndeterminateAnimationTimespan(const TimeSpan& span);
Parameters: span - The span of time between a complete rotation or color animation when the widget is
Reimplemented in ProgressWidget.
|
virtual |
Sets the translated message to be displayed. p% will be replaced with the current progress or removed if progress is indeterminate. Translated version of setFormat.
Fn: void QCustomProgressBar::setMessage(const TranslatedString& span);
Parameters:
|
virtual |
Fn: bool QCustomProgressBar::setPercent(fltp08 percent); Parameters: percent - The percent that the progress bar is between 0.0 and 1.0. NaN will set the value to
void setProgressColor | ( | RGBColor | color | ) |
Wipes and custom colors and uses the defined color as the progress bar. Parameters:
Fn: bool QCustomProgressBar::setProgressColor(RGBColor color);
Sets the progress bar to colors depending on the percent. Parameters:
Fn: bool QCustomProgressBar::setProgressColors(const Buffer<RGBColor>& colors);
|
virtual |
Sets whether the procress bar is indeterminate. An indeterminate progress bar will have an animation to indicate something is happening, but that a percent could not be determined. Can also be triggered by setPercent using NaN to make indeterminate or a real number to make progress. Parameters:
Fn: bool QCustomProgressBar::setProgressColor(RGBColor color);
|
nodiscardoverrideprotected |
|
protectedslot |
|
protected |
|
protected |
|
protected |
|
protected |