A progress viewer for a unique task. More...
#include <ProgressViewerTaskWidget.h>
Public Slots | |
| virtual void | cancel () |
| Get the button clicked and cancel ALL tasks. More... | |
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... | |
| ProgressViewerTaskWidget (QWidget *parent, bool hideToolBar, std::string message="") | |
| Default constructor. More... | |
| void | removeTask (int taskId) |
| Removes a task from progress viewer container. More... | |
| void | setMessage (const std::string &message) |
| void | setTask (te::common::TaskProgress *task) |
| 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... | |
| virtual | ~ProgressViewerTaskWidget () |
| Virtual destructor. More... | |
Protected Member Functions | |
| virtual void | customEvent (QEvent *e) |
| Used to receive custom progress events. More... | |
Protected Attributes | |
| QToolButton * | 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... | |
| 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... | |
| std::string | m_message |
| Attribute used to define dialog message. 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... | |
| te::common::TaskProgress * | m_task |
| Task object. More... | |
| int | m_taskId |
| Task Identifier. More... | |
| int | m_totalSteps |
| Attribute used to define the total steps of all tasks. More... | |
| int | m_viewerId |
A progress viewer for a unique task.
Definition at line 58 of file ProgressViewerTaskWidget.h.
| te::qt::widgets::ProgressViewerTaskWidget::ProgressViewerTaskWidget | ( | QWidget * | parent, |
| bool | hideToolBar, | ||
| std::string | message = "" |
||
| ) |
Default constructor.
Definition at line 39 of file ProgressViewerTaskWidget.cpp.
References cancel(), m_button, m_label, m_mainGridLayout, m_message, m_progressBar, and ~ProgressViewerTaskWidget().
|
virtualdefault |
Virtual destructor.
Referenced by ProgressViewerTaskWidget().
|
virtual |
Insert a new taks to progress viewer container.
| t | Task pointer. |
| id | Task identifier. |
Implements te::common::AbstractProgressViewer.
Definition at line 90 of file ProgressViewerTaskWidget.cpp.
|
virtualslot |
Get the button clicked and cancel ALL tasks.
Definition at line 211 of file ProgressViewerTaskWidget.cpp.
References te::common::TaskProgress::cancel(), and m_task.
Referenced by ProgressViewerTaskWidget().
|
virtual |
Cancel a task.
| taskId | Task identifier. |
Implements te::common::AbstractProgressViewer.
Definition at line 116 of file ProgressViewerTaskWidget.cpp.
References te::common::TaskProgress::getId(), m_currentStep, m_propStep, m_task, and m_totalSteps.
Referenced by removeTask().
|
protectedvirtual |
Used to receive custom progress events.
| e | Event sent to this object. |
Definition at line 192 of file ProgressViewerTaskWidget.cpp.
References m_label, m_progressBar, te::qt::widgets::ProgressResetEvent::type(), te::qt::widgets::ProgressSetValueEvent::type(), and te::qt::widgets::ProgressSetMessageEvent::type().
|
virtual |
Removes a task from progress viewer container.
| taskId | Task identifier. |
Implements te::common::AbstractProgressViewer.
Definition at line 95 of file ProgressViewerTaskWidget.cpp.
References cancelTask(), te::common::TaskProgress::getId(), m_button, m_progressBar, and m_task.
| void te::qt::widgets::ProgressViewerTaskWidget::setMessage | ( | const std::string & | message | ) |
Definition at line 182 of file ProgressViewerTaskWidget.cpp.
| void te::qt::widgets::ProgressViewerTaskWidget::setTask | ( | te::common::TaskProgress * | task | ) |
Definition at line 174 of file ProgressViewerTaskWidget.cpp.
References te::common::TaskProgress::getId(), m_button, m_task, and m_taskId.
|
virtual |
Set task total steps.
| taskId | Task identifier. |
Implements te::common::AbstractProgressViewer.
Definition at line 126 of file ProgressViewerTaskWidget.cpp.
References te::common::TaskProgress::getId(), te::common::TaskProgress::getTotalSteps(), m_progressBar, m_task, and m_totalSteps.
|
virtual |
Update the progress message.
| taskId | Task identifier. |
Implements te::common::AbstractProgressViewer.
Definition at line 162 of file ProgressViewerTaskWidget.cpp.
References te::common::TaskProgress::getId(), te::common::TaskProgress::getMessage(), m_message, and m_task.
|
virtual |
Update the progress evaluation.
| taskId | Task identifier. |
Implements te::common::AbstractProgressViewer.
Definition at line 139 of file ProgressViewerTaskWidget.cpp.
References te::common::TaskProgress::getCurrentStep(), te::common::TaskProgress::getId(), m_propStep, m_task, and m_totalSteps.
|
protected |
GUI Objects used to build the custom widget.
Definition at line 140 of file ProgressViewerTaskWidget.h.
Referenced by ProgressViewerTaskWidget(), removeTask(), and setTask().
|
protected |
Attribute used to define the current steps of all task.
Definition at line 135 of file ProgressViewerTaskWidget.h.
Referenced by cancelTask().
|
protected |
GUI Objects used to build the custom widget.
Definition at line 142 of file ProgressViewerTaskWidget.h.
|
protected |
GUI Objects used to build the custom widget.
Definition at line 143 of file ProgressViewerTaskWidget.h.
Referenced by customEvent(), ProgressViewerTaskWidget(), and setMessage().
|
protected |
GUI Objects used to build the custom widget.
Definition at line 141 of file ProgressViewerTaskWidget.h.
Referenced by ProgressViewerTaskWidget().
|
protected |
Attribute used to define dialog message.
Definition at line 137 of file ProgressViewerTaskWidget.h.
Referenced by ProgressViewerTaskWidget(), setMessage(), and updateMessage().
|
protected |
GUI Objects used to build the custom widget.
Definition at line 139 of file ProgressViewerTaskWidget.h.
Referenced by customEvent(), ProgressViewerTaskWidget(), removeTask(), and setTotalValues().
|
protected |
Attribute used to define the proportional step (0-100).
Definition at line 136 of file ProgressViewerTaskWidget.h.
Referenced by cancelTask(), and updateValue().
|
protected |
Task object.
Definition at line 138 of file ProgressViewerTaskWidget.h.
Referenced by cancel(), cancelTask(), removeTask(), setTask(), setTotalValues(), updateMessage(), and updateValue().
|
protected |
Task Identifier.
Definition at line 133 of file ProgressViewerTaskWidget.h.
Referenced by setTask().
|
protected |
Attribute used to define the total steps of all tasks.
Definition at line 134 of file ProgressViewerTaskWidget.h.
Referenced by cancelTask(), setTotalValues(), and updateValue().
|
protectedinherited |
Definition at line 105 of file AbstractProgressViewer.h.
Referenced by te::common::AbstractProgressViewer::AbstractProgressViewer(), and te::common::AbstractProgressViewer::~AbstractProgressViewer().