AsyncProgressDialog
Classes | Public Slots | Public Member Functions | List of all members
APD::ProgressWidgetContainer Class Reference

A progress widget, which is a container for other progress widget. More...

Inheritance diagram for APD::ProgressWidgetContainer:
APD::ProgressWidget

Classes

class  Impl
 

Public Slots

void setValue (int value, const QVariant &userData, const TimeStamp &timeStamp) override
 
void setRange (int minimum, int maximum) override
 
void setText (const QString &text) override
 
- Public Slots inherited from APD::ProgressWidget
virtual void setValue (int, const QVariant &, const TimeStamp &)
 
virtual void setRange (int, int)
 
virtual void setText (const QString &)
 

Public Member Functions

 ProgressWidgetContainer (QWidget *parent=nullptr)
 
void addWidget (ProgressWidget *widget, int row, int column, Qt::Alignment alignment=0)
 
void addWidget (ProgressWidget *widget, int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment=0)
 
void removeWidget (ProgressWidget *widget)
 
QGridLayout * gridLayout () const
 
- Public Member Functions inherited from APD::ProgressWidget
 ProgressWidget (QWidget *parent=nullptr)
 

Detailed Description

A progress widget, which is a container for other progress widget.

Internally, it creates a QGridLayout and places addition widgets there. If the used adds a progress widget, the corresponding signals and slots are connected in order to keep the child widgets updated. The ProgressWidgetContainer forwards those signals to its child progress widgets.

Constructor & Destructor Documentation

◆ ProgressWidgetContainer()

APD::ProgressWidgetContainer::ProgressWidgetContainer ( QWidget *  parent = nullptr)
explicit

Constructs a progress widget container with the given parent.

Member Function Documentation

◆ addWidget() [1/2]

void APD::ProgressWidgetContainer::addWidget ( ProgressWidget widget,
int  row,
int  column,
Qt::Alignment  alignment = 0 
)

Adds the given progress widget to the cell grid at row, column and starts forwarding progress events. See QGridLayout::addWidget() method for detailed description.

Note that the given widget is reparented.

To add a QWidget or QLayoutItem, which doesn't inherit from ProgressWidget, please use the layout() method and add the item directly into the layout.

◆ addWidget() [2/2]

void APD::ProgressWidgetContainer::addWidget ( ProgressWidget widget,
int  row,
int  column,
int  rowSpan,
int  columnSpan,
Qt::Alignment  alignment = 0 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

See QGridLayout::addWidget() method for detailed description.

Note that the given widget is reparented.

◆ gridLayout()

QGridLayout * APD::ProgressWidgetContainer::gridLayout ( ) const

Returns the underlying QGridLayout, which can be accessed to direcly to add layout items and widgets, which don't inherit from ProgressWidget.

◆ removeWidget()

void APD::ProgressWidgetContainer::removeWidget ( ProgressWidget widget)

Removes a progress widget from the container and stop forwarding progress events.

◆ setRange

void APD::ProgressWidgetContainer::setRange ( int  minimum,
int  maximum 
)
overrideslot

This reimplemented method calls ProgressWidget::setRange() method of all contained progress widgets.

◆ setText

void APD::ProgressWidgetContainer::setText ( const QString &  text)
overrideslot

This reimplemented method calls ProgressWidget::setText() method of all contained progress widgets.

◆ setValue

void APD::ProgressWidgetContainer::setValue ( int  value,
const QVariant &  userData,
const TimeStamp &  timeStamp 
)
overrideslot

This reimplemented method calls ProgressWidget::setValue() method of all contained progress widgets.


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