MythTV
master
libs
libmythui
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
:
26
uint
m_total
;
27
uint
m_count
;
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
)
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
;
47
bool
m_haveNewMessage
;
48
QString
m_newMessage
;
49
QMutex
m_newMessageLock
;
50
51
MythUIText
*
m_messageText
;
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
)
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
;
72
uint
m_total
;
73
uint
m_count
;
74
75
MythUIText
*
m_messageText
;
76
MythUIText
*
m_progressText
;
77
MythUIProgressBar
*
m_progressBar
;
78
};
79
80
MUI_PUBLIC
MythUIBusyDialog
*
ShowBusyPopup
(
const
QString &message);
81
82
#endif
ProgressUpdateEvent::ProgressUpdateEvent
ProgressUpdateEvent(uint count, uint total=0, QString message="")
Definition:
mythprogressdialog.h:15
MythScreenStack
Definition:
mythscreenstack.h:15
ProgressUpdateEvent::m_count
uint m_count
Definition:
mythprogressdialog.h:27
MythUIBusyDialog::m_haveNewMessage
bool m_haveNewMessage
Definition:
mythprogressdialog.h:47
MythUIProgressDialog::m_count
uint m_count
Definition:
mythprogressdialog.h:73
MythUIText
All purpose text widget, displays a text string.
Definition:
mythuitext.h:28
ProgressUpdateEvent::kEventType
static Type kEventType
Definition:
mythprogressdialog.h:23
MythUIType::customEvent
void customEvent(QEvent *event) override
Definition:
mythuitype.cpp:999
MythUIBusyDialog::m_newMessage
QString m_newMessage
Definition:
mythprogressdialog.h:48
MythScreenType::Create
virtual bool Create(void)
Definition:
mythscreentype.cpp:303
mythscreentype.h
uint
unsigned int uint
Definition:
compat.h:140
ProgressUpdateEvent
Definition:
mythprogressdialog.h:12
MythUIBusyDialog::m_origMessage
QString m_origMessage
Definition:
mythprogressdialog.h:45
MythUIBusyDialog::m_messageText
MythUIText * m_messageText
Definition:
mythprogressdialog.h:51
ProgressUpdateEvent::GetTotal
uint GetTotal()
Definition:
mythprogressdialog.h:20
MythUIBusyDialog::m_message
QString m_message
Definition:
mythprogressdialog.h:46
MythUIProgressDialog::m_total
uint m_total
Definition:
mythprogressdialog.h:72
MythUIProgressDialog::m_progressBar
MythUIProgressBar * m_progressBar
Definition:
mythprogressdialog.h:77
MythUIProgressDialog::m_messageText
MythUIText * m_messageText
Definition:
mythprogressdialog.h:75
MythUIType::Pulse
virtual void Pulse(void)
Pulse is called 70 times a second to trigger a single frame of an animation.
Definition:
mythuitype.cpp:465
MythUIBusyDialog
Definition:
mythprogressdialog.h:31
ProgressUpdateEvent::m_total
uint m_total
Definition:
mythprogressdialog.h:26
ProgressUpdateEvent::GetMessage
QString GetMessage()
Definition:
mythprogressdialog.h:19
name
const char * name
Definition:
ParseText.cpp:339
MythScreenType::keyPressEvent
bool keyPressEvent(QKeyEvent *) override
Key event handler.
Definition:
mythscreentype.cpp:435
MythUIType::Reset
virtual void Reset(void)
Reset the widget to it's original state, should not reset changes made by the theme.
Definition:
mythuitype.cpp:92
MythUIProgressDialog::m_message
QString m_message
Definition:
mythprogressdialog.h:71
ProgressUpdateEvent::m_message
QString m_message
Definition:
mythprogressdialog.h:28
ShowBusyPopup
MUI_PUBLIC MythUIBusyDialog * ShowBusyPopup(const QString &message)
Definition:
mythprogressdialog.cpp:90
MUI_PUBLIC
#define MUI_PUBLIC
Definition:
mythuiexp.h:9
ProgressUpdateEvent::GetCount
uint GetCount()
Definition:
mythprogressdialog.h:21
MythUIBusyDialog::m_newMessageLock
QMutex m_newMessageLock
Definition:
mythprogressdialog.h:49
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition:
mythscreentype.h:40
MythUIProgressDialog::m_progressText
MythUIText * m_progressText
Definition:
mythprogressdialog.h:76
MythUIProgressBar
Progress bar widget.
Definition:
mythuiprogressbar.h:12
MythUIProgressDialog
Definition:
mythprogressdialog.h:54
Generated on Sat Oct 5 2019 05:30:17 for MythTV by
1.8.15