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

Displays the progress, either horizontally as a bar or as a roand spin dial. Contains various options for display and can be added as a LogStream to a Log. More...

#include <ProgressWidget.h>

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

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

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

Additional Inherited Members

- Protected Slots inherited from QCustomProgressBar
void updateFromTimer ()
 

Detailed Description

Displays the progress, either horizontally as a bar or as a roand spin dial. Contains various options for display and can be added as a LogStream to a Log.


Constructor & Destructor Documentation

◆ ProgressWidget()

ProgressWidget ( QWidget * parent = nullptr)
explicit

◆ ~ProgressWidget()

virtual ~ProgressWidget ( )
overridevirtual

Member Function Documentation

◆ addMessage()

virtual void addMessage ( const LogMessage & )
overridevirtual

Implements LogStream.

◆ clearIcon()

void clearIcon ( )

◆ clearTextRectCache()

void clearTextRectCache ( )

◆ event()

virtual 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()

virtual void setIndeterminateAnimationTimespan ( const TimeSpan & span)
overridevirtual

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 file: