AsyncProgressDialog
ProgressWidgetContainer.h
1 #pragma once
2 
3 #include "ProgressWidget.h"
4 
5 #include <memory>
6 
7 class QGridLayout;
8 
9 namespace APD
10 {
11 
13 {
14  Q_OBJECT
15 
16 public:
17  explicit ProgressWidgetContainer(QWidget* parent = nullptr);
19 
20  void addWidget(ProgressWidget* widget, int row, int column, Qt::Alignment alignment = 0);
21  void addWidget(ProgressWidget* widget, int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment = 0);
22  void removeWidget(ProgressWidget* widget);
23 
24  QGridLayout* gridLayout() const;
25 
26 public slots:
27  void setValue(int value, const QVariant& userData, const TimeStamp& timeStamp) override;
28  void setRange(int minimum, int maximum) override;
29  void setText(const QString& text) override;
30 
31 private:
32  Q_DISABLE_COPY(ProgressWidgetContainer)
33 
34  class Impl;
35  std::unique_ptr<Impl> m_impl;
36 };
37 
38 }
A progress widget, which is a container for other progress widget.
Definition: ProgressWidgetContainer.h:12
QGridLayout * gridLayout() const
Definition: ProgressWidgetContainer.cpp:94
void setValue(int value, const QVariant &userData, const TimeStamp &timeStamp) override
Definition: ProgressWidgetContainer.cpp:102
void setRange(int minimum, int maximum) override
Definition: ProgressWidgetContainer.cpp:111
Base class for all widgets capable of displaying progress for a TaskThread.
Definition: ProgressWidget.h:10
void removeWidget(ProgressWidget *widget)
Definition: ProgressWidgetContainer.cpp:84
ProgressWidgetContainer(QWidget *parent=nullptr)
Definition: ProgressWidgetContainer.cpp:42
void setText(const QString &text) override
Definition: ProgressWidgetContainer.cpp:120
void addWidget(ProgressWidget *widget, int row, int column, Qt::Alignment alignment=0)
Definition: ProgressWidgetContainer.cpp:60