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
virtual void Reset(void)=0
virtual void Restore(void)=0
static Type kEventType
Definition: screensaver.h:23
Controls all instances of the screensaver.
Definition: screensaver.h:43
void Disable(void)
Definition: screensaver.cpp:55
ScreenSaverEvent(ScreenSaverEventKind type)
Definition: screensaver.h:13
ScreenSaverEventKind getSSEventType()
Definition: screensaver.h:18
virtual ~ScreenSaver()=default
void Restore(void)
Definition: screensaver.cpp:62
Base Class for screensavers.
Definition: screensaver.h:30
QList< ScreenSaver * > m_screenSavers
Definition: screensaver.h:54
virtual void Disable(void)=0
virtual bool Asleep(void)=0
ScreenSaverEventKind m_sset
Definition: screensaver.h:26
ScreenSaver()=default