API Documentation
Loading...
Searching...
No Matches
ProgressWidget Class Reference

#include <ProgressWidget.h>

Inheritance diagram for ProgressWidget:
[legend]
Collaboration diagram for ProgressWidget:
[legend]

Public Member Functions

 ProgressWidget (QWidget *parent=nullptr)
 
virtual ~ProgressWidget () override
 
void setIconID (const String &image_id, bool foreground=true)
 
void clearIcon ()
 
void resizeEvent (QResizeEvent *event) override
 
void setHorizontal (bool is_horizontal)
 
void setTickCount (uint04 tick_count)
 
void paintEvent (QPaintEvent *event) override
 
void setSizeMultiplier (fltp04 size_multiplier)
 
virtual void setIndeterminateAnimationTimespan (const TimeSpan &span) override
 Sets the speed of animations when progress is undefined, or NaN.
 
void setProgressThickness (fltp04 thickness)
 
QSize sizeHint () const override
 
QSize minimumSizeHint () const override
 
virtual bool event (QEvent *event) override
 
bool isHorizontal () const
 
int heightForWidth (int w) const override
 
virtual void addMessage (const LogMessage &) override
 
void clearTextRectCache ()
 
fltp04 progressEpsilon () const
 
- Public Member Functions inherited from QCustomProgressBar
 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:
 
- Public Member Functions inherited from LogStream
virtual ~LogStream ()
 
virtual void attach (ProgressInfo *stream)
 
virtual void detach (ProgressInfo *stream)
 
virtual void allowCancel (bool)
 
virtual void addMessages (const Buffer< LogMessage > &messages)
 
void clearLinks ()
 
void setIgnoreMessages (bool ignore)
 
bool ignoringMessages () const
 

Protected Member Functions

void updateTimerInterval ()
 
void setProgress (fltp04 percent) override
 
- Protected Member Functions inherited from QCustomProgressBar
QSize sizeHint () const override
 
QSize minimumSizeHint () const override
 
fltp08 indeterminatePercent () const
 
QString customText () const
 
void paintEvent (QPaintEvent *event) override
 
void updateProgressColor ()
 

Protected Attributes

String m_icon_id
 
QIcon m_background_icon
 
QPixmap * m_tick_mark_cache_image
 
QRectF m_last_text_rect_a
 
QRectF m_last_text_rect_b
 
QString m_last_text
 
QFont m_last_font_a
 
QFont m_last_font_b
 
fltp04 m_last_percent
 
fltp04 m_size_multiplier = 1.0f
 
uint04 m_tick_count = 10
 
fltp04 m_thickness = 0.1f
 
bool m_is_horizontal
 
bool m_is_analog
 
bool m_is_updating_percent
 
bool m_icon_foreground = false
 
- Protected Attributes inherited from QCustomProgressBar
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
 
- Protected Attributes inherited from LogStream
Buffer< ProgressInfo * > m_linked_logs
 
bool m_ignore_message = false
 

Additional Inherited Members

- Protected Slots inherited from QCustomProgressBar
void updateFromTimer ()
 

Constructor & Destructor Documentation

◆ ProgressWidget()

ProgressWidget ( QWidget * parent = nullptr)
explicit

◆ ~ProgressWidget()

~ProgressWidget ( )
overridevirtual

Member Function Documentation

◆ addMessage()

void addMessage ( const LogMessage & )
overridevirtual

Implements LogStream.

◆ clearIcon()

void clearIcon ( )

◆ clearTextRectCache()

void clearTextRectCache ( )

◆ event()

bool event ( QEvent * event)
overridevirtual

◆ heightForWidth()

int heightForWidth ( int w) const
inlineoverride

◆ isHorizontal()

bool isHorizontal ( ) const
inline

◆ minimumSizeHint()

QSize minimumSizeHint ( ) const
nodiscardoverride

◆ paintEvent()

void paintEvent ( QPaintEvent * event)
override

◆ progressEpsilon()

fltp04 progressEpsilon ( ) const

◆ resizeEvent()

void resizeEvent ( QResizeEvent * event)
override

◆ setHorizontal()

void setHorizontal ( bool is_horizontal)

◆ setIconID()

void setIconID ( const String & image_id,
bool foreground = true )

◆ setIndeterminateAnimationTimespan()

void setIndeterminateAnimationTimespan ( const TimeSpan & span)
overridevirtual

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

set to indeterminate progress

Reimplemented from QCustomProgressBar.

◆ setProgress()

void setProgress ( fltp04 percent)
overrideprotectedvirtual

Implements LogStream.

◆ setProgressThickness()

void setProgressThickness ( fltp04 thickness)

◆ setSizeMultiplier()

void setSizeMultiplier ( fltp04 size_multiplier)

◆ setTickCount()

void setTickCount ( uint04 tick_count)

◆ sizeHint()

QSize sizeHint ( ) const
nodiscardoverride

◆ updateTimerInterval()

void updateTimerInterval ( )
protected

Member Data Documentation

◆ m_background_icon

QIcon m_background_icon
protected

◆ m_icon_foreground

bool m_icon_foreground = false
protected

◆ m_icon_id

String m_icon_id
protected

◆ m_is_analog

bool m_is_analog
protected

◆ m_is_horizontal

bool m_is_horizontal
protected

◆ m_is_updating_percent

bool m_is_updating_percent
protected

◆ m_last_font_a

QFont m_last_font_a
protected

◆ m_last_font_b

QFont m_last_font_b
protected

◆ m_last_percent

fltp04 m_last_percent
protected

◆ m_last_text

QString m_last_text
protected

◆ m_last_text_rect_a

QRectF m_last_text_rect_a
protected

◆ m_last_text_rect_b

QRectF m_last_text_rect_b
protected

◆ m_size_multiplier

fltp04 m_size_multiplier = 1.0f
protected

◆ m_thickness

fltp04 m_thickness = 0.1f
protected

◆ m_tick_count

uint04 m_tick_count = 10
protected

◆ m_tick_mark_cache_image

QPixmap* m_tick_mark_cache_image
protected

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