MythTV
master
libs
libmyth
guistartup.h
Go to the documentation of this file.
1
// Copyright (c) 2017 MythTV Developers <mythtv-dev@mythtv.org>
3
//
4
// This is part of MythTV (https://www.mythtv.org)
5
//
6
// This program is free software; you can redistribute it and/or modify
7
// it under the terms of the GNU General Public License as published by
8
// the Free Software Foundation; either version 2 of the License, or
9
// (at your option) any later version.
10
//
11
// This program is distributed in the hope that it will be useful,
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
// GNU General Public License for more details.
15
//
16
// You should have received a copy of the GNU General Public License
17
// along with this program; if not, write to the Free Software
18
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
//
20
// You should have received a copy of the GNU General Public License
21
// along with this program. If not, see <http://www.gnu.org/licenses/>.
22
//
24
25
#ifndef GUISTARTUP_H_
26
#define GUISTARTUP_H_
27
28
// QT headers
29
#include <QObject>
30
#include <QTranslator>
31
#include <QEventLoop>
32
#include <QTimer>
33
34
#include "
mythchrono.h
"
35
36
// MythDB headers
37
#include "
mythexp.h
"
38
39
// MythBase headers
40
#include "
mythchrono.h
"
41
42
// MythUI headers
43
#include "
mythscreentype.h
"
44
45
class
QEventLoop;
46
class
MythUIButton
;
47
class
MythUIText
;
48
class
MythScreenStack
;
49
class
MythUIStateType
;
50
class
MythUIProgressBar
;
51
class
MythTimer
;
52
53
class
MPUBLIC
GUIStartup
:
public
MythScreenType
54
{
55
Q_OBJECT
56
57
public
:
58
59
bool
m_Exit {
false
};
60
bool
m_Setup {
false
};
61
bool
m_Retry {
false
};
62
bool
m_Search {
false
};
63
64
GUIStartup
(
MythScreenStack
*parent, QEventLoop *eventLoop);
65
~
GUIStartup
(
void
)
override
;
66
bool
Create
(
void
)
override
;
// MythScreenType
67
bool
setStatusState(
const
QString &name);
68
bool
setMessageState(
const
QString &name);
69
void
setTotal(std::chrono::seconds total);
70
71
public
slots:
72
bool
updateProgress(
bool
finished);
73
void
updateProgress(
void
);
74
75
private
slots:
76
void
Retry(
void
);
77
void
Search
(
void
);
78
void
Setup(
void
);
79
void
Close
(
void
)
override
;
// MythScreenType
80
void
OnClosePromptReturn(
bool
submit);
81
82
signals:
83
void
cancelPortCheck(
void
);
84
85
private
:
86
MythUIButton
*m_dummyButton {
nullptr
};
87
MythUIButton
*m_retryButton {
nullptr
};
88
MythUIButton
*m_searchButton {
nullptr
};
89
MythUIButton
*m_setupButton {
nullptr
};
90
MythUIButton
*m_exitButton {
nullptr
};
91
MythUIStateType
*m_statusState {
nullptr
};
92
MythUIStateType
*m_messageState {
nullptr
};
93
MythUIProgressBar
*m_progressBar {
nullptr
};
94
MythTimer
*m_progressTimer {
nullptr
};
95
QEventLoop *m_loop {
nullptr
};
96
QEventLoop
m_dlgLoop
;
97
std::chrono::milliseconds m_total {0ms};
98
QTimer
m_timer
;
99
};
100
101
#endif
MPUBLIC
#define MPUBLIC
Definition:
mythexp.h:10
MythTimer
A QElapsedTimer based timer to replace use of QTime as a timer.
Definition:
mythtimer.h:13
MythScreenType::Close
virtual void Close()
Definition:
mythscreentype.cpp:402
mythexp.h
MythScreenStack
Definition:
mythscreenstack.h:16
MythScreenType::Create
virtual bool Create(void)
Definition:
mythscreentype.cpp:282
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition:
mythscreentype.h:44
GUIStartup::m_dlgLoop
QEventLoop m_dlgLoop
Definition:
guistartup.h:96
MythUIProgressBar
Progress bar widget.
Definition:
mythuiprogressbar.h:12
MythUIButton
A single button widget.
Definition:
mythuibutton.h:21
Search
Definition:
netgrabbermanager.h:137
MythUIText
All purpose text widget, displays a text string.
Definition:
mythuitext.h:30
GUIStartup
Definition:
guistartup.h:53
mythchrono.h
GUIStartup::m_timer
QTimer m_timer
Definition:
guistartup.h:98
MythUIStateType
This widget is used for grouping other widgets for display when a particular named state is called....
Definition:
mythuistatetype.h:22
mythscreentype.h
Generated on Wed Jan 27 2021 03:16:48 for MythTV by
1.8.17