MythTV  master
screensaver.h
Go to the documentation of this file.
1 #ifndef MYTH_SCREENSAVER_H
2 #define MYTH_SCREENSAVER_H
3 
4 // Qt
5 #include <QEvent>
6 #include <QList>
7 
8 class ScreenSaverEvent : public QEvent
9 {
10 public:
12 
14  QEvent(kEventType), m_sset(type)
15  {
16  }
17 
19  {
20  return m_sset;
21  }
22 
23  static Type kEventType;
24 
25 protected:
27 };
28 
31 {
32  public:
33  ScreenSaver() = default;
34  virtual ~ScreenSaver() = default;
35 
36  virtual void Disable(void) = 0;
37  virtual void Restore(void) = 0;
38  virtual void Reset(void) = 0;
39  virtual bool Asleep(void) = 0;
40 };
41 
44 {
45  public:
48 
49  void Disable(void);
50  void Restore(void);
51  void Reset(void);
52  bool Asleep(void);
53  private:
54  QList<ScreenSaver *> m_screenSavers;
55 };
56 
57 #endif // MYTH_SCREENSAVER_H
ScreenSaverEvent::ssetDisable
@ ssetDisable
Definition: screensaver.h:11
ScreenSaverControl::Restore
void Restore(void)
Definition: screensaver.cpp:62
ScreenSaver::Reset
virtual void Reset(void)=0
ScreenSaverControl::Reset
void Reset(void)
Definition: screensaver.cpp:69
ScreenSaverControl::Asleep
bool Asleep(void)
Definition: screensaver.cpp:76
ScreenSaver::Restore
virtual void Restore(void)=0
ScreenSaverControl::m_screenSavers
QList< ScreenSaver * > m_screenSavers
Definition: screensaver.h:54
ScreenSaverEvent::ScreenSaverEventKind
ScreenSaverEventKind
Definition: screensaver.h:11
ScreenSaver::~ScreenSaver
virtual ~ScreenSaver()=default
ScreenSaverControl::ScreenSaverControl
ScreenSaverControl()
Definition: screensaver.cpp:26
ScreenSaverControl::Disable
void Disable(void)
Definition: screensaver.cpp:55
ScreenSaverEvent::ssetRestore
@ ssetRestore
Definition: screensaver.h:11
ScreenSaverControl
Controls all instances of the screensaver.
Definition: screensaver.h:44
ScreenSaverEvent
Definition: screensaver.h:9
ScreenSaverEvent::m_sset
ScreenSaverEventKind m_sset
Definition: screensaver.h:26
ScreenSaverEvent::kEventType
static Type kEventType
Definition: screensaver.h:23
ScreenSaver
Base Class for screensavers.
Definition: screensaver.h:31
ScreenSaver::Disable
virtual void Disable(void)=0
ScreenSaverEvent::ssetReset
@ ssetReset
Definition: screensaver.h:11
ScreenSaverEvent::ScreenSaverEvent
ScreenSaverEvent(ScreenSaverEventKind type)
Definition: screensaver.h:13
ScreenSaver::Asleep
virtual bool Asleep(void)=0
ScreenSaverEvent::getSSEventType
ScreenSaverEventKind getSSEventType()
Definition: screensaver.h:18
ScreenSaver::ScreenSaver
ScreenSaver()=default
ScreenSaverControl::~ScreenSaverControl
~ScreenSaverControl()
Definition: screensaver.cpp:49