MythTV  master
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 // MythDB headers
35 #include "mythexp.h"
36 
37 // MythUI headers
38 #include "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 
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);
61  bool Create(void) override; // MythScreenType
62  bool setStatusState(const QString &name);
63  bool setMessageState(const QString &name);
64  void setTotal(int total);
65 
66  public slots:
67  bool updateProgress(bool finished = false);
68 
69  private slots:
70  void Retry(void);
71  void Search(void);
72  void Setup(void);
73  void Close(void) override; // MythScreenType
74  void OnClosePromptReturn(bool submit);
75 
76  signals:
77  void cancelPortCheck(void);
78 
79  private:
80  MythUIButton *m_dummyButton {nullptr};
81  MythUIButton *m_retryButton {nullptr};
82  MythUIButton *m_searchButton {nullptr};
83  MythUIButton *m_setupButton {nullptr};
84  MythUIButton *m_exitButton {nullptr};
85  MythUIStateType *m_statusState {nullptr};
86  MythUIStateType *m_messageState {nullptr};
87  MythUIProgressBar *m_progressBar {nullptr};
88  MythTimer *m_progressTimer {nullptr};
89  QEventLoop *m_loop {nullptr};
90  QEventLoop m_dlgLoop;
91  int m_total {0};
92  QTimer m_timer;
93 };
94 
95 #endif
This widget is used for grouping other widgets for display when a particular named state is called.
unsigned int slots[4]
Definition: element.c:38
A QElapsedTimer based timer to replace use of QTime as a timer.
Definition: mythtimer.h:13
#define MPUBLIC
Definition: mythexp.h:10
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
virtual bool Create(void)
virtual void Close()
QTimer m_timer
Definition: guistartup.h:92
A single button widget.
Definition: mythuibutton.h:21
QEventLoop m_dlgLoop
Definition: guistartup.h:90
Screen in which all other widgets are contained and rendered.
Progress bar widget.