MythTV  master
mythprogressdialog.h
Go to the documentation of this file.
1 #ifndef MYTHPROGRESSBOX_H_
2 #define MYTHPROGRESSBOX_H_
3 
4 #include <QEvent>
5 #include <QMutex>
6 
7 #include "mythscreentype.h"
8 
9 class MythUIText;
10 class MythUIProgressBar;
11 
12 class MUI_PUBLIC ProgressUpdateEvent : public QEvent
13 {
14  public:
15  ProgressUpdateEvent(uint count, uint total=0, QString message="") :
16  QEvent(kEventType), m_total(total), m_count(count),
17  m_message(message) { }
18 
19  QString GetMessage() { return m_message; }
20  uint GetTotal() { return m_total; }
21  uint GetCount() { return m_count; }
22 
23  static Type kEventType;
24 
25  private:
28  QString m_message;
29 };
30 
32 {
33  Q_OBJECT
34  public:
35  MythUIBusyDialog(const QString &message,
36  MythScreenStack *parent, const char *name);
37 
38  bool Create(void) override; // MythScreenType
39  bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
40  void SetMessage(const QString &message);
41  void Reset(void) override; // MythUIType
42  void Pulse(void) override; // MythUIType
43 
44  protected:
45  QString m_origMessage;
46  QString m_message;
48  QString m_newMessage;
50 
52 };
53 
55 {
56  Q_OBJECT
57  public:
58  MythUIProgressDialog(const QString &message,
59  MythScreenStack *parent, const char *name);
60 
61  bool Create(void) override; // MythScreenType
62  bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
63  void customEvent(QEvent *event) override; // MythUIType
64  void SetTotal(uint total);
65  void SetProgress(uint count);
66  void SetMessage(const QString &message);
67 
68  protected:
69  void UpdateProgress(void);
70 
71  QString m_message;
74 
78 };
79 
80 MUI_PUBLIC MythUIBusyDialog *ShowBusyPopup(const QString &message);
81 
82 #endif
ProgressUpdateEvent(uint count, uint total=0, QString message="")
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
void customEvent(QEvent *event) override
Definition: mythuitype.cpp:999
virtual bool Create(void)
unsigned int uint
Definition: compat.h:140
MythUIText * m_messageText
MythUIProgressBar * m_progressBar
virtual void Pulse(void)
Pulse is called 70 times a second to trigger a single frame of an animation.
Definition: mythuitype.cpp:465
const char * name
Definition: ParseText.cpp:339
bool keyPressEvent(QKeyEvent *) override
Key event handler.
virtual void Reset(void)
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuitype.cpp:92
MUI_PUBLIC MythUIBusyDialog * ShowBusyPopup(const QString &message)
#define MUI_PUBLIC
Definition: mythuiexp.h:9
Screen in which all other widgets are contained and rendered.
Progress bar widget.