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