MythTV  master
welcomedialog.h
Go to the documentation of this file.
1 #ifndef WELCOMEDIALOG_H_
2 #define WELCOMEDIALOG_H_
3 
4 // qt
5 #include <QDateTime>
6 
7 // myth
12 #include "libmythui/mythuibutton.h"
13 #include "libmythui/mythuitext.h"
14 
15 class GroupSetting;
16 
18 {
19 
20  Q_OBJECT
21 
22  public:
23 
24  WelcomeDialog(MythScreenStack *parent, const char *name);
25  ~WelcomeDialog() override;
26 
27  bool Create(void) override; // MythScreenType
28  bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
29  void customEvent(QEvent *e) override; // MythUIType
30 
31  protected slots:
32  void startFrontendClick(void);
33  void startFrontend(void);
34  void updateAll(void);
35  void updateStatus(void);
36  void updateScreen(void);
37  void closeDialog(void);
38  void ShowMenu(void) override; // MythScreenType
39  void shutdownNow(void);
40  void runEPGGrabber(void);
41  void lockShutdown(void);
42  void unlockShutdown(void);
43  bool updateRecordingList(void);
44  bool updateScheduledList(void);
45 
46  private:
47  void updateStatusMessage(void);
48  bool checkConnectionToServer(void);
49  void checkAutoStart(void);
50  static void runMythFillDatabase(void);
51  static void ShowSettings(GroupSetting* screen);
52 
53  //
54  // GUI stuff
55  //
56  MythUIText *m_statusText { nullptr };
59  MythUIText *m_warningText { nullptr };
60 
62 
63  MythDialogBox *m_menuPopup { nullptr };
64 
65  QTimer *m_updateStatusTimer { nullptr }; // audited ref #5318
66  QTimer *m_updateScreenTimer { nullptr }; // audited ref #5318
67 
68  QString m_appBinDir;
69  bool m_isRecording { false };
70  bool m_hasConflicts { false };
71  bool m_willShutdown { false };
72  int m_secondsToShutdown { -1 };
74  std::chrono::seconds m_preRollSeconds { 0s };
75  std::chrono::seconds m_idleWaitForRecordingTime { 0s };
76  std::chrono::seconds m_idleTimeoutSecs { 0s };
80  QStringList m_statusList;
81  bool m_frontendIsRunning { false };
82 
83  std::vector<TunerStatus> m_tunerList;
84  std::vector<ProgramInfo> m_scheduledList;
85 
87  bool m_pendingRecListUpdate { false };
88 
90  void setPendingRecListUpdate(bool newState) { m_pendingRecListUpdate = newState; }
91 
93  bool m_pendingSchedUpdate { false };
94 
95  bool pendingSchedUpdate() const { return m_pendingSchedUpdate; }
96  void setPendingSchedUpdate(bool newState) { m_pendingSchedUpdate = newState; }
97 
98 };
99 
100 #endif
WelcomeDialog::m_idleTimeoutSecs
std::chrono::seconds m_idleTimeoutSecs
Definition: welcomedialog.h:76
WelcomeDialog::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: welcomedialog.cpp:225
WelcomeDialog::m_updateScreenTimer
QTimer * m_updateScreenTimer
Definition: welcomedialog.h:66
mythuitext.h
WelcomeDialog::m_statusList
QStringList m_statusList
Definition: welcomedialog.h:80
WelcomeDialog::updateRecordingList
bool updateRecordingList(void)
Definition: welcomedialog.cpp:458
WelcomeDialog::m_statusListNo
uint m_statusListNo
Definition: welcomedialog.h:79
WelcomeDialog::customEvent
void customEvent(QEvent *e) override
Definition: welcomedialog.cpp:137
WelcomeDialog::updateScreen
void updateScreen(void)
Definition: welcomedialog.cpp:329
mythdialogbox.h
MythScreenStack
Definition: mythscreenstack.h:16
WelcomeDialog::m_scheduledList
std::vector< ProgramInfo > m_scheduledList
Definition: welcomedialog.h:84
WelcomeDialog::unlockShutdown
void unlockShutdown(void)
Definition: welcomedialog.cpp:624
WelcomeDialog::m_recordingText
MythUIText * m_recordingText
Definition: welcomedialog.h:57
WelcomeDialog::pendingRecListUpdate
bool pendingRecListUpdate() const
Definition: welcomedialog.h:89
WelcomeDialog::m_appBinDir
QString m_appBinDir
Definition: welcomedialog.h:68
WelcomeDialog::m_frontendIsRunning
bool m_frontendIsRunning
Definition: welcomedialog.h:81
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
WelcomeDialog::~WelcomeDialog
~WelcomeDialog() override
Definition: welcomedialog.cpp:311
WelcomeDialog::shutdownNow
void shutdownNow(void)
Definition: welcomedialog.cpp:641
WelcomeDialog::m_updateStatusTimer
QTimer * m_updateStatusTimer
Definition: welcomedialog.h:65
WelcomeDialog::updateScheduledList
bool updateScheduledList(void)
Definition: welcomedialog.cpp:479
WelcomeDialog::closeDialog
void closeDialog(void)
Definition: welcomedialog.cpp:306
WelcomeDialog::m_preRollSeconds
std::chrono::seconds m_preRollSeconds
Definition: welcomedialog.h:74
programinfo.h
WelcomeDialog::m_schedUpdateMuxtex
QMutex m_schedUpdateMuxtex
Definition: welcomedialog.h:92
WelcomeDialog::Create
bool Create(void) override
Definition: welcomedialog.cpp:56
WelcomeDialog::pendingSchedUpdate
bool pendingSchedUpdate() const
Definition: welcomedialog.h:95
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:166
WelcomeDialog::checkConnectionToServer
bool checkConnectionToServer(void)
Definition: welcomedialog.cpp:561
WelcomeDialog
Definition: welcomedialog.h:17
WelcomeDialog::m_isRecording
bool m_isRecording
Definition: welcomedialog.h:69
MythUIButton
A single button widget.
Definition: mythuibutton.h:21
WelcomeDialog::m_nextRecordingStart
QDateTime m_nextRecordingStart
Definition: welcomedialog.h:73
WelcomeDialog::updateAll
void updateAll(void)
Definition: welcomedialog.cpp:452
WelcomeDialog::m_screenTunerNo
uint m_screenTunerNo
Definition: welcomedialog.h:77
WelcomeDialog::lockShutdown
void lockShutdown(void)
Definition: welcomedialog.cpp:615
WelcomeDialog::updateStatusMessage
void updateStatusMessage(void)
Definition: welcomedialog.cpp:506
WelcomeDialog::m_pendingRecListUpdate
bool m_pendingRecListUpdate
Definition: welcomedialog.h:87
WelcomeDialog::m_startFrontendButton
MythUIButton * m_startFrontendButton
Definition: welcomedialog.h:61
WelcomeDialog::m_screenScheduledNo
uint m_screenScheduledNo
Definition: welcomedialog.h:78
uint
unsigned int uint
Definition: compat.h:81
WelcomeDialog::startFrontend
void startFrontend(void)
Definition: welcomedialog.cpp:92
WelcomeDialog::m_statusText
MythUIText * m_statusText
Definition: welcomedialog.h:56
tvremoteutil.h
WelcomeDialog::runMythFillDatabase
static void runMythFillDatabase(void)
Definition: welcomedialog.cpp:433
WelcomeDialog::startFrontendClick
void startFrontendClick(void)
Definition: welcomedialog.cpp:106
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
WelcomeDialog::updateStatus
void updateStatus(void)
Definition: welcomedialog.cpp:322
WelcomeDialog::m_scheduledText
MythUIText * m_scheduledText
Definition: welcomedialog.h:58
WelcomeDialog::m_menuPopup
MythDialogBox * m_menuPopup
Definition: welcomedialog.h:63
WelcomeDialog::setPendingRecListUpdate
void setPendingRecListUpdate(bool newState)
Definition: welcomedialog.h:90
WelcomeDialog::checkAutoStart
void checkAutoStart(void)
Definition: welcomedialog.cpp:117
WelcomeDialog::m_warningText
MythUIText * m_warningText
Definition: welcomedialog.h:59
WelcomeDialog::ShowMenu
void ShowMenu(void) override
Definition: welcomedialog.cpp:590
mythuibutton.h
WelcomeDialog::ShowSettings
static void ShowSettings(GroupSetting *screen)
Definition: welcomedialog.cpp:215
WelcomeDialog::setPendingSchedUpdate
void setPendingSchedUpdate(bool newState)
Definition: welcomedialog.h:96
WelcomeDialog::m_tunerList
std::vector< TunerStatus > m_tunerList
Definition: welcomedialog.h:83
WelcomeDialog::m_pendingSchedUpdate
bool m_pendingSchedUpdate
Definition: welcomedialog.h:93
WelcomeDialog::m_hasConflicts
bool m_hasConflicts
Definition: welcomedialog.h:70
WelcomeDialog::m_recListUpdateMuxtex
QMutex m_recListUpdateMuxtex
Definition: welcomedialog.h:86
WelcomeDialog::m_willShutdown
bool m_willShutdown
Definition: welcomedialog.h:71
WelcomeDialog::m_secondsToShutdown
int m_secondsToShutdown
Definition: welcomedialog.h:72
mythscreentype.h
GroupSetting
Definition: standardsettings.h:435
WelcomeDialog::runEPGGrabber
void runEPGGrabber(void)
Definition: welcomedialog.cpp:633
WelcomeDialog::m_idleWaitForRecordingTime
std::chrono::seconds m_idleWaitForRecordingTime
Definition: welcomedialog.h:75
WelcomeDialog::WelcomeDialog
WelcomeDialog(MythScreenStack *parent, const char *name)
Definition: welcomedialog.cpp:32