MythTV  0.28pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
mythprogressdialog.h
Go to the documentation of this file.
1 #ifndef MYTHPROGRESSBOX_H_
2 #define MYTHPROGRESSBOX_H_
3 
4 #include <QEvent>
5 
6 #include "mythscreentype.h"
7 #include "mythmainwindow.h"
8 #include "mythuitext.h"
9 #include "mythuiprogressbar.h"
10 
11 class MUI_PUBLIC ProgressUpdateEvent : public QEvent
12 {
13  public:
14  ProgressUpdateEvent(uint count, uint total=0, QString message="") :
15  QEvent(kEventType), m_total(total), m_count(count),
16  m_message(message) { }
17 
18  QString GetMessage() { return m_message; }
19  uint GetTotal() { return m_total; }
20  uint GetCount() { return m_count; }
21 
22  static Type kEventType;
23 
24  private:
27  QString m_message;
28 };
29 
30 class MUI_PUBLIC MythUIBusyDialog : public MythScreenType
31 {
32  Q_OBJECT
33  public:
34  MythUIBusyDialog(const QString &message,
35  MythScreenStack *parent, const char *name);
36 
37  bool Create(void);
38  bool keyPressEvent(QKeyEvent *event);
39  void SetMessage(const QString &message);
40  void Reset(void);
41 
42  virtual void Pulse(void);
43 
44  protected:
45  QString m_origMessage;
46  QString m_message;
48  QString m_newMessage;
50 
52 };
53 
54 class MUI_PUBLIC MythUIProgressDialog : public MythScreenType
55 {
56  Q_OBJECT
57  public:
58  MythUIProgressDialog(const QString &message,
59  MythScreenStack *parent, const char *name);
60 
61  bool Create(void);
62  bool keyPressEvent(QKeyEvent *event);
63  void customEvent(QEvent *event);
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:27
virtual bool Create(void)
AllMusic * parent
unsigned int uint
Definition: compat.h:135
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:453
virtual void customEvent(QEvent *)
Definition: mythuitype.cpp:985
const char * name
Definition: ParseText.cpp:338
virtual void Reset(void)
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuitype.cpp:80
virtual bool keyPressEvent(QKeyEvent *)
Key event handler.
MUI_PUBLIC MythUIBusyDialog * ShowBusyPopup(const QString &message)
Screen in which all other widgets are contained and rendered.
Progress bar widget.