MythTV  0.28pre
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 
31 class MUI_PUBLIC MythUIBusyDialog : public MythScreenType
32 {
33  Q_OBJECT
34  public:
35  MythUIBusyDialog(const QString &message,
36  MythScreenStack *parent, const char *name);
37 
38  bool Create(void);
39  bool keyPressEvent(QKeyEvent *event);
40  void SetMessage(const QString &message);
41  void Reset(void);
42 
43  virtual void Pulse(void);
44 
45  protected:
46  QString m_origMessage;
47  QString m_message;
49  QString m_newMessage;
51 
53 };
54 
55 class MUI_PUBLIC MythUIProgressDialog : public MythScreenType
56 {
57  Q_OBJECT
58  public:
59  MythUIProgressDialog(const QString &message,
60  MythScreenStack *parent, const char *name);
61 
62  bool Create(void);
63  bool keyPressEvent(QKeyEvent *event);
64  void customEvent(QEvent *event);
65  void SetTotal(uint total);
66  void SetProgress(uint count);
67  void SetMessage(const QString &message);
68 
69  protected:
70  void UpdateProgress(void);
71 
72  QString m_message;
75 
79 };
80 
81 MUI_PUBLIC MythUIBusyDialog *ShowBusyPopup(const QString &message);
82 
83 #endif
ProgressUpdateEvent(uint count, uint total=0, QString message="")
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
virtual bool Create(void)
AllMusic * parent
unsigned int uint
Definition: compat.h:136
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:460
virtual void customEvent(QEvent *)
Definition: mythuitype.cpp:994
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:87
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.