MythTV  master
idlescreen.h
Go to the documentation of this file.
1 #ifndef _IDLESCREEN_H_
2 #define _IDLESCREEN_H_
3 
4 #include <mythscreentype.h>
5 // libmyth
6 #include "programinfo.h"
7 
8 class MythUIStateType;
9 class MythUIButtonList;
10 class QTimer;
11 
12 class IdleScreen : public MythScreenType
13 {
14  Q_OBJECT
15 
16  public:
17  explicit IdleScreen(MythScreenStack *parent);
18  virtual ~IdleScreen();
19 
20  bool Create(void) override; // MythScreenType
21  bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
22  void customEvent(QEvent *e) override; // MythUIType
23 
24 
25  public slots:
26  void UpdateStatus(void);
27  void UpdateScreen(void);
28  bool UpdateScheduledList();
29 
30  protected:
31  void Load(void) override; // MythScreenType
32  void Init(void) override; // MythScreenType
33 
34  private:
35  bool CheckConnectionToServer(void);
36  bool PendingSchedUpdate() const { return m_pendingSchedUpdate; }
37  void SetPendingSchedUpdate(bool newState) { m_pendingSchedUpdate = newState; }
38 
39  QTimer *m_updateScreenTimer {nullptr};
40 
46 
48 
50  bool m_pendingSchedUpdate {false};
52  bool m_hasConflicts {false};
53 };
54 
55 #endif
This widget is used for grouping other widgets for display when a particular named state is called.
virtual ~IdleScreen()
Definition: idlescreen.cpp:32
unsigned int slots[4]
Definition: element.c:38
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
IdleScreen(MythScreenStack *parent)
Definition: idlescreen.cpp:20
int m_secondsToShutdown
Definition: idlescreen.h:47
ProgramList m_scheduledList
Definition: idlescreen.h:51
bool UpdateScheduledList()
Definition: idlescreen.cpp:215
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
Definition: idlescreen.cpp:68
QMutex m_schedUpdateMutex
Definition: idlescreen.h:49
void Init(void) override
Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in...
Definition: idlescreen.cpp:73
bool CheckConnectionToServer(void)
Definition: idlescreen.cpp:78
void UpdateScreen(void)
Definition: idlescreen.cpp:139
MythUIButtonList * m_conflictingRecordings
Definition: idlescreen.h:44
QTimer * m_updateScreenTimer
Definition: idlescreen.h:39
MythUIButtonList * m_nextRecordings
Definition: idlescreen.h:43
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
MythUIButtonList * m_currentRecordings
Definition: idlescreen.h:42
bool m_pendingSchedUpdate
Definition: idlescreen.h:50
void UpdateStatus(void)
Definition: idlescreen.cpp:100
MythUIText * m_conflictWarning
Definition: idlescreen.h:45
bool m_hasConflicts
Definition: idlescreen.h:52
void SetPendingSchedUpdate(bool newState)
Definition: idlescreen.h:37
bool Create(void) override
Definition: idlescreen.cpp:41
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: idlescreen.cpp:239
MythUIStateType * m_statusState
Definition: idlescreen.h:41
Screen in which all other widgets are contained and rendered.
void customEvent(QEvent *e) override
Definition: idlescreen.cpp:244
bool PendingSchedUpdate() const
Definition: idlescreen.h:36