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// MythDB headers
35#include "mythuiexp.h"
36
37// MythBase headers
39
40// MythUI headers
42
43class QEventLoop;
44class MythUIButton;
45class MythUIText;
46class MythScreenStack;
47class MythUIStateType;
49class MythTimer;
50
52{
53 Q_OBJECT
54
55 public:
56
57 bool m_Exit {false};
58 bool m_Setup {false};
59 bool m_Retry {false};
60 bool m_Search {false};
61
62 GUIStartup(MythScreenStack *parent, QEventLoop *eventLoop);
63 ~GUIStartup(void) override;
64 bool Create(void) override; // MythScreenType
65 bool setStatusState(const QString &name);
66 bool setMessageState(const QString &name);
67 void setTotal(std::chrono::seconds total);
68
69 public slots:
70 bool updateProgress(bool finished);
71 void updateProgress(void);
72
73 private slots:
74 void Retry(void);
75 void Search(void);
76 void Setup(void);
77 void Close(void) override; // MythScreenType
78 void OnClosePromptReturn(bool submit);
79
80 signals:
81 void cancelPortCheck(void);
82
83 private:
84 MythUIButton *m_dummyButton {nullptr};
85 MythUIButton *m_retryButton {nullptr};
86 MythUIButton *m_searchButton {nullptr};
87 MythUIButton *m_setupButton {nullptr};
88 MythUIButton *m_exitButton {nullptr};
89 MythUIStateType *m_statusState {nullptr};
90 MythUIStateType *m_messageState {nullptr};
91 MythUIProgressBar *m_progressBar {nullptr};
92 MythTimer *m_progressTimer {nullptr};
93 QEventLoop *m_loop {nullptr};
94 QEventLoop m_dlgLoop;
95 std::chrono::milliseconds m_total {0ms};
96 QTimer m_timer;
97};
98
99#endif
QEventLoop m_dlgLoop
Definition: guistartup.h:94
void cancelPortCheck(void)
QTimer m_timer
Definition: guistartup.h:96
Screen in which all other widgets are contained and rendered.
virtual bool Create(void)
virtual void Close()
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
#define MUI_PUBLIC
Definition: mythuiexp.h:9