MythTV master
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
36
37// MythUI headers
39
40class QEventLoop;
41class MythUIButton;
42class MythUIText;
43class MythScreenStack;
44class MythUIStateType;
46class MythTimer;
47
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:
90 QEventLoop *m_loop {nullptr};
91 QEventLoop m_dlgLoop;
92 std::chrono::milliseconds m_total {0ms};
93 QTimer m_timer;
94};
95
96#endif
MythTimer * m_progressTimer
Definition: guistartup.h:89
QEventLoop * m_loop
Definition: guistartup.h:90
bool setMessageState(const QString &name)
Definition: guistartup.cpp:117
MythUIStateType * m_statusState
Definition: guistartup.h:86
bool m_Retry
Definition: guistartup.h:56
void updateProgress(void)
Definition: guistartup.cpp:167
MythUIButton * m_dummyButton
Definition: guistartup.h:81
std::chrono::milliseconds m_total
Definition: guistartup.h:92
void Retry(void)
Definition: guistartup.cpp:217
bool setStatusState(const QString &name)
Definition: guistartup.cpp:107
QEventLoop m_dlgLoop
Definition: guistartup.h:91
MythUIStateType * m_messageState
Definition: guistartup.h:87
void Search(void)
Definition: guistartup.cpp:225
void cancelPortCheck(void)
MythUIButton * m_setupButton
Definition: guistartup.h:84
bool m_Search
Definition: guistartup.h:57
MythUIButton * m_retryButton
Definition: guistartup.h:82
void setTotal(std::chrono::seconds total)
Definition: guistartup.cpp:128
~GUIStartup(void) override
Definition: guistartup.cpp:62
bool Create(void) override
Definition: guistartup.cpp:67
MythUIButton * m_exitButton
Definition: guistartup.h:85
GUIStartup(MythScreenStack *parent, QEventLoop *eventLoop)
Definition: guistartup.cpp:55
bool m_Exit
Definition: guistartup.h:54
MythUIButton * m_searchButton
Definition: guistartup.h:83
void Close(void) override
Definition: guistartup.cpp:172
bool m_Setup
Definition: guistartup.h:55
QTimer m_timer
Definition: guistartup.h:93
MythUIProgressBar * m_progressBar
Definition: guistartup.h:88
void Setup(void)
Definition: guistartup.cpp:233
void OnClosePromptReturn(bool submit)
Definition: guistartup.cpp:202
Screen in which all other widgets are contained and rendered.
A QElapsedTimer based timer to replace use of QTime as a timer.
Definition: mythtimer.h:14
A single button widget.
Definition: mythuibutton.h:22
Progress bar widget.
This widget is used for grouping other widgets for display when a particular named state is called.
All purpose text widget, displays a text string.
Definition: mythuitext.h:29