33 #include <QtCore/QCoreApplication>
34 #include <QtGui/QSizePolicy>
35 #include <QtGui/QStyle>
47 m_frame->setFrameShape(QFrame::StyledPanel);
48 m_frame->setFrameShadow(QFrame::Sunken);
62 m_button->setIcon(
m_button->style()->standardIcon(QStyle::SP_TitleBarCloseButton));
76 this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
87 QCoreApplication::processEvents();
99 QCoreApplication::processEvents();
104 emit taskCanceled(m_taskId);
111 if(m_progressBar->minimum() == 0 && m_progressBar->maximum() == 0)
114 m_progressBar->setValue(static_cast<te::qt::widgets::ProgressSetValueEvent*>(e)->m_value);
121 m_label->setText(static_cast<ProgressSetMessageEvent*>(e)->m_value.c_str());
126 m_progressBar->reset();
virtual void setValue(int step)
Set the current value in progress bar.
ProgressWidgetItem(QWidget *parent, int taskId, int totalSteps)
Default constructor.
The ProgressSetMessageEvent is a custom event used to set a new message into a progress bar...
QGridLayout * m_frameGridLayout
GUI Objects used to build the custom widget.
virtual void reset()
Reset the progress bar.
static QEvent::Type type()
Get the custom event type.
The ProgressSetValueEvent is a custom event used to set a new value into a progress bar...
QLabel * m_label
GUI Objects used to build the custom widget.
static QEvent::Type type()
Get the custom event type.
The ProgressResetEvent is a custom event used to reset a progress bar.
QGridLayout * m_mainGridLayout
GUI Objects used to build the custom widget.
Custom widget used to represent a single task.
The ProgressResetEvent is a custom event used to reset a progress bar.
virtual void cancel()
Get the button clicked and cancel ALL tasks.
virtual void customEvent(QEvent *e)
Used to receive custom progress events.
~ProgressWidgetItem()
Virtual destructor.
QFrame * m_frame
GUI Objects used to build the custom widget.
virtual void setLabel(const std::string &message)
Set the progress label information.
The ProgressSetValueEvent is a custom event used to set a new value into a progress bar...
static QEvent::Type type()
Get the custom event type.
QProgressBar * m_progressBar
GUI Objects used to build the custom widget.
QCommandLinkButton * m_button
GUI Objects used to build the custom widget.
A custom event used to set a new message into a progress bar.