MythTV
master
mythtv
libs
libmyth
guistartup.h
Go to the documentation of this file.
1
2
// 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
// MythBase headers
35
#include "
libmythbase/mythchrono.h
"
36
37
// MythUI headers
38
#include "
libmythui/mythscreentype.h
"
39
40
class
QEventLoop;
41
class
MythUIButton
;
42
class
MythUIText
;
43
class
MythScreenStack
;
44
class
MythUIStateType
;
45
class
MythUIProgressBar
;
46
class
MythTimer
;
47
48
class
GUIStartup
:
public
MythScreenType
49
{
50
Q_OBJECT
51
52
public
:
53
54
bool
m_Exit
{
false
};
55
bool
m_Setup
{
false
};
56
bool
m_Retry
{
false
};
57
bool
m_Search
{
false
};
58
59
GUIStartup
(
MythScreenStack
*parent, QEventLoop *eventLoop);
60
~GUIStartup
(
void
)
override
;
61
bool
Create
(
void
)
override
;
// MythScreenType
62
bool
setStatusState
(
const
QString &name);
63
bool
setMessageState
(
const
QString &name);
64
void
setTotal
(std::chrono::seconds total);
65
66
public
slots:
67
void
Close
(
void
)
override
;
// MythScreenType
68
bool
updateProgress
(
bool
finished);
69
void
updateProgress
(
void
);
70
71
private
slots:
72
void
Retry
(
void
);
73
void
Search
(
void
);
74
void
Setup
(
void
);
75
void
OnClosePromptReturn
(
bool
submit);
76
77
signals:
78
void
cancelPortCheck
(
void
);
79
80
private
:
81
MythUIButton
*
m_dummyButton
{
nullptr
};
82
MythUIButton
*
m_retryButton
{
nullptr
};
83
MythUIButton
*
m_searchButton
{
nullptr
};
84
MythUIButton
*
m_setupButton
{
nullptr
};
85
MythUIButton
*
m_exitButton
{
nullptr
};
86
MythUIStateType
*
m_statusState
{
nullptr
};
87
MythUIStateType
*
m_messageState
{
nullptr
};
88
MythUIProgressBar
*
m_progressBar
{
nullptr
};
89
MythTimer
*
m_progressTimer
{
nullptr
};
90
QEventLoop *
m_loop
{
nullptr
};
91
QEventLoop
m_dlgLoop
;
92
std::chrono::milliseconds
m_total
{0ms};
93
QTimer
m_timer
;
94
};
95
96
#endif
GUIStartup
Definition:
guistartup.h:49
GUIStartup::m_progressTimer
MythTimer * m_progressTimer
Definition:
guistartup.h:89
GUIStartup::m_loop
QEventLoop * m_loop
Definition:
guistartup.h:90
GUIStartup::setMessageState
bool setMessageState(const QString &name)
Definition:
guistartup.cpp:117
GUIStartup::m_statusState
MythUIStateType * m_statusState
Definition:
guistartup.h:86
GUIStartup::m_Retry
bool m_Retry
Definition:
guistartup.h:56
GUIStartup::updateProgress
void updateProgress(void)
Definition:
guistartup.cpp:167
GUIStartup::m_dummyButton
MythUIButton * m_dummyButton
Definition:
guistartup.h:81
GUIStartup::m_total
std::chrono::milliseconds m_total
Definition:
guistartup.h:92
GUIStartup::Retry
void Retry(void)
Definition:
guistartup.cpp:217
GUIStartup::setStatusState
bool setStatusState(const QString &name)
Definition:
guistartup.cpp:107
GUIStartup::m_dlgLoop
QEventLoop m_dlgLoop
Definition:
guistartup.h:91
GUIStartup::m_messageState
MythUIStateType * m_messageState
Definition:
guistartup.h:87
GUIStartup::Search
void Search(void)
Definition:
guistartup.cpp:225
GUIStartup::cancelPortCheck
void cancelPortCheck(void)
GUIStartup::m_setupButton
MythUIButton * m_setupButton
Definition:
guistartup.h:84
GUIStartup::m_Search
bool m_Search
Definition:
guistartup.h:57
GUIStartup::m_retryButton
MythUIButton * m_retryButton
Definition:
guistartup.h:82
GUIStartup::setTotal
void setTotal(std::chrono::seconds total)
Definition:
guistartup.cpp:128
GUIStartup::~GUIStartup
~GUIStartup(void) override
Definition:
guistartup.cpp:62
GUIStartup::Create
bool Create(void) override
Definition:
guistartup.cpp:67
GUIStartup::m_exitButton
MythUIButton * m_exitButton
Definition:
guistartup.h:85
GUIStartup::GUIStartup
GUIStartup(MythScreenStack *parent, QEventLoop *eventLoop)
Definition:
guistartup.cpp:55
GUIStartup::m_Exit
bool m_Exit
Definition:
guistartup.h:54
GUIStartup::m_searchButton
MythUIButton * m_searchButton
Definition:
guistartup.h:83
GUIStartup::Close
void Close(void) override
Definition:
guistartup.cpp:172
GUIStartup::m_Setup
bool m_Setup
Definition:
guistartup.h:55
GUIStartup::m_timer
QTimer m_timer
Definition:
guistartup.h:93
GUIStartup::m_progressBar
MythUIProgressBar * m_progressBar
Definition:
guistartup.h:88
GUIStartup::Setup
void Setup(void)
Definition:
guistartup.cpp:233
GUIStartup::OnClosePromptReturn
void OnClosePromptReturn(bool submit)
Definition:
guistartup.cpp:202
MythScreenStack
Definition:
mythscreenstack.h:17
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition:
mythscreentype.h:46
MythTimer
A QElapsedTimer based timer to replace use of QTime as a timer.
Definition:
mythtimer.h:14
MythUIButton
A single button widget.
Definition:
mythuibutton.h:22
MythUIProgressBar
Progress bar widget.
Definition:
mythuiprogressbar.h:13
MythUIStateType
This widget is used for grouping other widgets for display when a particular named state is called.
Definition:
mythuistatetype.h:23
MythUIText
All purpose text widget, displays a text string.
Definition:
mythuitext.h:29
mythchrono.h
mythscreentype.h
Generated on Tue Jul 28 2026 03:18:33 for MythTV by
1.9.4