te::qt::widgets::ProgressWidgetItem Class Reference

Custom widget used to represent a single task. More...

#include <ProgressWidgetItem.h>

Inheritance diagram for te::qt::widgets::ProgressWidgetItem:
QWidget

Public Slots

virtual void cancel ()
 Get the button clicked and cancel ALL tasks. More...
 

Signals

void taskCanceled (int id)
 Inform that a task was canceled. More...
 

Public Member Functions

 ProgressWidgetItem (QWidget *parent, int taskId, int totalSteps, QString label)
 Default constructor. More...
 
virtual void reset ()
 Reset the progress bar. More...
 
virtual void setLabel (const std::string &message)
 Set the progress label information. More...
 
void setTotalValues (int values)
 Set task total steps. More...
 
virtual void setValue (int step)
 Set the current value in progress bar. More...
 
 ~ProgressWidgetItem ()
 Virtual destructor. More...
 

Protected Member Functions

virtual void customEvent (QEvent *e)
 Used to receive custom progress events. More...
 

Protected Attributes

QCommandLinkButton * m_button
 GUI Objects used to build the custom widget. More...
 
int m_currentStep
 Attribute used to define the current steps of all task. More...
 
QFramem_frame
 GUI Objects used to build the custom widget. More...
 
QGridLayout * m_frameGridLayout
 GUI Objects used to build the custom widget. More...
 
QLabel * m_label
 GUI Objects used to build the custom widget. More...
 
QGridLayout * m_mainGridLayout
 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...
 
int m_taskId
 Task Identifier. More...
 
int m_totalSteps
 Attribute used to define the total steps of all tasks. More...
 

Detailed Description

Custom widget used to represent a single task.

See also
ProgressViewerWidget

Definition at line 56 of file ProgressWidgetItem.h.

Constructor & Destructor Documentation

te::qt::widgets::ProgressWidgetItem::ProgressWidgetItem ( QWidget parent,
int  taskId,
int  totalSteps,
QString  label 
)

Default constructor.

Definition at line 37 of file ProgressWidgetItem.cpp.

References cancel(), m_button, m_frame, m_frameGridLayout, m_label, m_mainGridLayout, m_progressBar, and ~ProgressWidgetItem().

te::qt::widgets::ProgressWidgetItem::~ProgressWidgetItem ( )
default

Virtual destructor.

Referenced by ProgressWidgetItem().

Member Function Documentation

void te::qt::widgets::ProgressWidgetItem::cancel ( )
virtualslot

Get the button clicked and cancel ALL tasks.

Definition at line 129 of file ProgressWidgetItem.cpp.

References m_taskId, and taskCanceled().

Referenced by ProgressWidgetItem().

void te::qt::widgets::ProgressWidgetItem::customEvent ( QEvent e)
protectedvirtual

Used to receive custom progress events.

Parameters
eEvent sent to this object.

Definition at line 134 of file ProgressWidgetItem.cpp.

References m_label, m_progressBar, te::qt::widgets::ProgressResetEvent::type(), te::qt::widgets::ProgressSetValueEvent::type(), and te::qt::widgets::ProgressSetMessageEvent::type().

void te::qt::widgets::ProgressWidgetItem::reset ( )
virtual

Reset the progress bar.

Definition at line 122 of file ProgressWidgetItem.cpp.

void te::qt::widgets::ProgressWidgetItem::setLabel ( const std::string &  message)
virtual

Set the progress label information.

Parameters
messageString with the label information.

Definition at line 115 of file ProgressWidgetItem.cpp.

void te::qt::widgets::ProgressWidgetItem::setTotalValues ( int  values)

Set task total steps.

Definition at line 105 of file ProgressWidgetItem.cpp.

References m_progressBar, and m_totalSteps.

void te::qt::widgets::ProgressWidgetItem::setValue ( int  step)
virtual

Set the current value in progress bar.

Parameters
stepStep value as integer.

Definition at line 87 of file ProgressWidgetItem.cpp.

References m_currentStep, m_progressBar, and m_propStep.

void te::qt::widgets::ProgressWidgetItem::taskCanceled ( int  id)
signal

Inform that a task was canceled.

Parameters
idtaskId.

Referenced by cancel().

Member Data Documentation

QCommandLinkButton* te::qt::widgets::ProgressWidgetItem::m_button
protected

GUI Objects used to build the custom widget.

Definition at line 121 of file ProgressWidgetItem.h.

Referenced by ProgressWidgetItem().

int te::qt::widgets::ProgressWidgetItem::m_currentStep
protected

Attribute used to define the current steps of all task.

Definition at line 117 of file ProgressWidgetItem.h.

Referenced by setValue().

QFrame* te::qt::widgets::ProgressWidgetItem::m_frame
protected

GUI Objects used to build the custom widget.

Definition at line 122 of file ProgressWidgetItem.h.

Referenced by ProgressWidgetItem().

QGridLayout* te::qt::widgets::ProgressWidgetItem::m_frameGridLayout
protected

GUI Objects used to build the custom widget.

Definition at line 124 of file ProgressWidgetItem.h.

Referenced by ProgressWidgetItem().

QLabel* te::qt::widgets::ProgressWidgetItem::m_label
protected

GUI Objects used to build the custom widget.

Definition at line 119 of file ProgressWidgetItem.h.

Referenced by customEvent(), and ProgressWidgetItem().

QGridLayout* te::qt::widgets::ProgressWidgetItem::m_mainGridLayout
protected

GUI Objects used to build the custom widget.

Definition at line 123 of file ProgressWidgetItem.h.

Referenced by ProgressWidgetItem().

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

GUI Objects used to build the custom widget.

Definition at line 120 of file ProgressWidgetItem.h.

Referenced by customEvent(), ProgressWidgetItem(), setTotalValues(), and setValue().

int te::qt::widgets::ProgressWidgetItem::m_propStep
protected

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

Definition at line 118 of file ProgressWidgetItem.h.

Referenced by setValue().

int te::qt::widgets::ProgressWidgetItem::m_taskId
protected

Task Identifier.

Definition at line 115 of file ProgressWidgetItem.h.

Referenced by cancel().

int te::qt::widgets::ProgressWidgetItem::m_totalSteps
protected

Attribute used to define the total steps of all tasks.

Definition at line 116 of file ProgressWidgetItem.h.

Referenced by setTotalValues().


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