AsyncProgressDialog
ProgressEstimate.h
1 #pragma once
2 
3 #include "ProgressWidget.h"
4 
5 #include <memory>
6 
7 namespace APD
8 {
9 
11 {
12  Q_OBJECT
13 public:
14  explicit ProgressEstimate(QWidget* parent = nullptr);
15  ~ProgressEstimate() override;
16 
18  {
21  };
22 
23  QString remainingTimeText() const;
24  void setRemainingTimeText(const QString& text);
25 
26  bool isRemainingTimeHidden() const;
27  void setRemainingTimeHidden(bool hide);
28 
30  void setRemainingTimeFormat(TimeFormat format) const;
31 
32  QString elapsedTimeText() const;
33  void setElapsedTimeText(const QString& text);
34 
35  bool isElapsedTimeHidden() const;
36  void setElapsedTimeHidden(bool hide);
37 
39  void setElapsedTimeFormat(TimeFormat format) const;
40 
41 public slots:
42  void setValue(int value, const QVariant&, const TimeStamp& timeStamp) override;
43  void setRange(int minimum, int maximum) override;
44 
45 private:
46  Q_DISABLE_COPY(ProgressEstimate)
47 
48  class Impl;
49  std::unique_ptr<Impl> m_impl;
50 };
51 
52 }
TimeFormat remainingTimeFormat() const
Definition: ProgressEstimate.cpp:285
ProgressEstimate(QWidget *parent=nullptr)
Definition: ProgressEstimate.cpp:225
Definition: ProgressEstimate.h:20
Base class for all widgets capable of displaying progress for a TaskThread.
Definition: ProgressWidget.h:10
bool isElapsedTimeHidden() const
Definition: ProgressEstimate.cpp:333
QString elapsedTimeText() const
Definition: ProgressEstimate.cpp:311
bool isRemainingTimeHidden() const
Definition: ProgressEstimate.cpp:262
TimeFormat
Definition: ProgressEstimate.h:17
void setRemainingTimeText(const QString &text)
Definition: ProgressEstimate.cpp:250
void setRange(int minimum, int maximum) override
Definition: ProgressEstimate.cpp:386
QString remainingTimeText() const
Definition: ProgressEstimate.cpp:240
void setRemainingTimeHidden(bool hide)
Definition: ProgressEstimate.cpp:272
A widget capable of showing elapsed and remaining time.
Definition: ProgressEstimate.h:10
void setElapsedTimeFormat(TimeFormat format) const
Definition: ProgressEstimate.cpp:366
void setElapsedTimeHidden(bool hide)
Definition: ProgressEstimate.cpp:343
TimeFormat elapsedTimeFormat() const
Definition: ProgressEstimate.cpp:356
void setElapsedTimeText(const QString &text)
Definition: ProgressEstimate.cpp:321
Definition: ProgressEstimate.h:19
void setRemainingTimeFormat(TimeFormat format) const
Definition: ProgressEstimate.cpp:295
void setValue(int value, const QVariant &, const TimeStamp &timeStamp) override
Definition: ProgressEstimate.cpp:378