MythTV  master
mythscreensaver.h
Go to the documentation of this file.
1 #ifndef MYTH_SCREENSAVER_H
2 #define MYTH_SCREENSAVER_H
3 
4 // Qt
5 #include <QObject>
6 
7 // Std
8 #include <vector>
9 
10 class MythDisplay;
11 class MythMainWindow;
12 
14 class MythScreenSaver : public QObject
15 {
16  Q_OBJECT
17 
18  public:
19  explicit MythScreenSaver(QObject* Parent) : QObject(Parent) {}
20  ~MythScreenSaver() override = default;
21 
22  public slots:
23  virtual void Disable() = 0;
24  virtual void Restore() = 0;
25  virtual void Reset() = 0;
26  virtual bool Asleep() = 0;
27 
28  private:
29  Q_DISABLE_COPY(MythScreenSaver)
30 };
31 
33 class MythScreenSaverControl : public QObject
34 {
35  Q_OBJECT
36 
37  public:
39  ~MythScreenSaverControl() override = default;
40 
41  signals:
42  void Disable();
43  void Restore();
44  void Reset();
45 
46  public slots:
47  bool Asleep();
48 
49  private:
50  Q_DISABLE_COPY(MythScreenSaverControl)
52 };
53 
54 #endif
MythScreenSaverControl::MythScreenSaverControl
MythScreenSaverControl(MythMainWindow *MainWin, MythDisplay *mDisplay)
Definition: mythscreensaver.cpp:40
MythScreenSaverControl::Reset
void Reset()
MythScreenSaver
Base Class for screensavers.
Definition: mythscreensaver.h:14
MythScreenSaver::~MythScreenSaver
~MythScreenSaver() override=default
MythScreenSaverControl::Restore
void Restore()
MythScreenSaver::Asleep
virtual bool Asleep()=0
MythScreenSaverControl::Asleep
bool Asleep()
Definition: mythscreensaver.cpp:77
MythScreenSaverControl::m_screenSavers
std::vector< MythScreenSaver * > m_screenSavers
Definition: mythscreensaver.h:51
MythScreenSaverControl::~MythScreenSaverControl
~MythScreenSaverControl() override=default
MythScreenSaver::Disable
virtual void Disable()=0
MythScreenSaverControl
Controls all instances of the screensaver.
Definition: mythscreensaver.h:33
MythDisplay
Definition: mythdisplay.h:22
MythScreenSaver::MythScreenSaver
MythScreenSaver(QObject *Parent)
Definition: mythscreensaver.h:19
MythScreenSaverControl::Disable
void Disable()
MythScreenSaver::Restore
virtual void Restore()=0
MythScreenSaver::Reset
virtual void Reset()=0
MythMainWindow
Definition: mythmainwindow.h:28