Custom widget used to represent a single task. More...
#include <ProgressWidgetItem.h>
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... | |
| QFrame * | m_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... | |
Custom widget used to represent a single task.
Definition at line 56 of file ProgressWidgetItem.h.
| 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().
|
default |
Virtual destructor.
Referenced by ProgressWidgetItem().
|
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().
|
protectedvirtual |
Used to receive custom progress events.
| e | Event 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().
|
virtual |
Reset the progress bar.
Definition at line 122 of file ProgressWidgetItem.cpp.
|
virtual |
Set the progress label information.
| message | String 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.
|
virtual |
Set the current value in progress bar.
| step | Step value as integer. |
Definition at line 87 of file ProgressWidgetItem.cpp.
References m_currentStep, m_progressBar, and m_propStep.
|
signal |
|
protected |
GUI Objects used to build the custom widget.
Definition at line 121 of file ProgressWidgetItem.h.
Referenced by ProgressWidgetItem().
|
protected |
Attribute used to define the current steps of all task.
Definition at line 117 of file ProgressWidgetItem.h.
Referenced by setValue().
|
protected |
GUI Objects used to build the custom widget.
Definition at line 122 of file ProgressWidgetItem.h.
Referenced by ProgressWidgetItem().
|
protected |
GUI Objects used to build the custom widget.
Definition at line 124 of file ProgressWidgetItem.h.
Referenced by ProgressWidgetItem().
|
protected |
GUI Objects used to build the custom widget.
Definition at line 119 of file ProgressWidgetItem.h.
Referenced by customEvent(), and ProgressWidgetItem().
|
protected |
GUI Objects used to build the custom widget.
Definition at line 123 of file ProgressWidgetItem.h.
Referenced by ProgressWidgetItem().
|
protected |
GUI Objects used to build the custom widget.
Definition at line 120 of file ProgressWidgetItem.h.
Referenced by customEvent(), ProgressWidgetItem(), setTotalValues(), and setValue().
|
protected |
Attribute used to define the proportional step (0-100).
Definition at line 118 of file ProgressWidgetItem.h.
Referenced by setValue().
|
protected |
|
protected |
Attribute used to define the total steps of all tasks.
Definition at line 116 of file ProgressWidgetItem.h.
Referenced by setTotalValues().