te::qt::widgets::ProgressViewerBar Class Reference

A class that defines the interface of a qt bar progress viewer. More...

#include <ProgressViewerBar.h>

Inheritance diagram for te::qt::widgets::ProgressViewerBar:
te::qt::widgets::AbstractQtProgressViewer te::common::AbstractProgressViewer

Public Slots

virtual void onResetProgress () override
 
virtual void onSetProgressMessage (const std::string &message) override
 
virtual void onSetProgressRange (int min, int max) override
 
virtual void onSetProgressValue (int value) override
 

Signals

void resetProgress ()
 
void setProgressMessage (const std::string &message)
 
void setProgressRange (int min, int max)
 
void setProgressValue (int value)
 

Public Member Functions

void addTask (te::common::TaskProgress *t, int id)
 Insert a new taks to progress viewer container. More...
 
void cancelTask (int taskId)
 Cancel a task. More...
 
 ProgressViewerBar (QWidget *parent)
 Default constructor. More...
 
void removeTask (int taskId)
 Removes a task from progress viewer container. More...
 
void setTotalValues (int taskId)
 Set task total steps. More...
 
void updateMessage (int taskId)
 Update the progress message. More...
 
void updateValue (int taskId)
 Update the progress evaluation. More...
 
 ~ProgressViewerBar ()
 Virtual destructor. More...
 

Protected Attributes

int m_currentStep
 Attribute used to define the current steps of all task. More...
 
QGridLayout * m_layout
 GUI Objects used to build the custom widget. More...
 
QProgressBar * m_progressBar
 GUI Objects used to build the custom widget. More...
 
int m_propStep
 Attribute used to define the proportional step (0-100). More...
 
bool m_reset
 
std::map< int, te::common::TaskProgress * > m_tasks
 Task container. More...
 
int m_totalSteps
 Attribute used to define the total steps of all tasks. More...
 
int m_viewerId
 

Detailed Description

A class that defines the interface of a qt bar progress viewer.

It can be use inside a status bar.

This viewer is made using QtProgressBar object. Feed back will be generated over a custom widget. Multiples tasks will be displayed using ONLY one progress.

The proportional value is calculated using TOTALSTEPS / CURRENTSTEPS.

TOTALSTEPS - Sum of all total steps of all tasks CURRENTSTEPS - Sum of all current steps of all tasks

This viwer does NOT have message information. A Qt Button objected has located at the right side of the bar. The button clicked can be accessed getting clicked() signal.

See also
AbstractProgressViewer, QtProgressBar
Note
In this viewer, tasks can NOT be deleted.

Definition at line 76 of file ProgressViewerBar.h.

Constructor & Destructor Documentation

◆ ProgressViewerBar()

te::qt::widgets::ProgressViewerBar::ProgressViewerBar ( QWidget *  parent)

Default constructor.

◆ ~ProgressViewerBar()

te::qt::widgets::ProgressViewerBar::~ProgressViewerBar ( )

Virtual destructor.

Member Function Documentation

◆ addTask()

void te::qt::widgets::ProgressViewerBar::addTask ( te::common::TaskProgress t,
int  id 
)
virtual

Insert a new taks to progress viewer container.

Parameters
tTask pointer
idTask identifier

Implements te::qt::widgets::AbstractQtProgressViewer.

◆ cancelTask()

void te::qt::widgets::ProgressViewerBar::cancelTask ( int  taskId)
virtual

Cancel a task.

Parameters
taskIdTask identifier

Implements te::qt::widgets::AbstractQtProgressViewer.

◆ onResetProgress

virtual void te::qt::widgets::ProgressViewerBar::onResetProgress ( )
overridevirtualslot

◆ onSetProgressMessage

virtual void te::qt::widgets::ProgressViewerBar::onSetProgressMessage ( const std::string &  message)
overridevirtualslot

◆ onSetProgressRange

virtual void te::qt::widgets::ProgressViewerBar::onSetProgressRange ( int  min,
int  max 
)
overridevirtualslot

◆ onSetProgressValue

virtual void te::qt::widgets::ProgressViewerBar::onSetProgressValue ( int  value)
overridevirtualslot

◆ removeTask()

void te::qt::widgets::ProgressViewerBar::removeTask ( int  taskId)
virtual

Removes a task from progress viewer container.

Parameters
taskIdTask identifier

Implements te::qt::widgets::AbstractQtProgressViewer.

◆ resetProgress

void te::qt::widgets::AbstractQtProgressViewer::resetProgress ( )
signalinherited

◆ setProgressMessage

void te::qt::widgets::AbstractQtProgressViewer::setProgressMessage ( const std::string &  message)
signalinherited

◆ setProgressRange

void te::qt::widgets::AbstractQtProgressViewer::setProgressRange ( int  min,
int  max 
)
signalinherited

◆ setProgressValue

void te::qt::widgets::AbstractQtProgressViewer::setProgressValue ( int  value)
signalinherited

◆ setTotalValues()

void te::qt::widgets::ProgressViewerBar::setTotalValues ( int  taskId)
virtual

Set task total steps.

Parameters
taskIdTask identifier

Implements te::qt::widgets::AbstractQtProgressViewer.

◆ updateMessage()

void te::qt::widgets::ProgressViewerBar::updateMessage ( int  taskId)
virtual

Update the progress message.

Parameters
taskIdTask identifier

Implements te::qt::widgets::AbstractQtProgressViewer.

◆ updateValue()

void te::qt::widgets::ProgressViewerBar::updateValue ( int  taskId)
virtual

Update the progress evaluation.

Parameters
taskIdTask identifier

Implements te::qt::widgets::AbstractQtProgressViewer.

Member Data Documentation

◆ m_currentStep

int te::qt::widgets::ProgressViewerBar::m_currentStep
protected

Attribute used to define the current steps of all task.

Definition at line 144 of file ProgressViewerBar.h.

◆ m_layout

QGridLayout* te::qt::widgets::ProgressViewerBar::m_layout
protected

GUI Objects used to build the custom widget.

Definition at line 147 of file ProgressViewerBar.h.

◆ m_progressBar

QProgressBar* te::qt::widgets::ProgressViewerBar::m_progressBar
protected

GUI Objects used to build the custom widget.

Definition at line 148 of file ProgressViewerBar.h.

◆ m_propStep

int te::qt::widgets::ProgressViewerBar::m_propStep
protected

Attribute used to define the proportional step (0-100).

Definition at line 145 of file ProgressViewerBar.h.

◆ m_reset

bool te::qt::widgets::ProgressViewerBar::m_reset
protected

Definition at line 150 of file ProgressViewerBar.h.

◆ m_tasks

std::map<int, te::common::TaskProgress*> te::qt::widgets::ProgressViewerBar::m_tasks
protected

Task container.

Definition at line 146 of file ProgressViewerBar.h.

◆ m_totalSteps

int te::qt::widgets::ProgressViewerBar::m_totalSteps
protected

Attribute used to define the total steps of all tasks.

Definition at line 143 of file ProgressViewerBar.h.

◆ m_viewerId

int te::common::AbstractProgressViewer::m_viewerId
protectedinherited

Definition at line 105 of file AbstractProgressViewer.h.


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