MythTV  master
mythscreensaverdrm.cpp
Go to the documentation of this file.
1 // MythTV
2 #include "mythlogging.h"
4 
5 #define LOC QString("ScreenSaverDRM: ")
6 
8 {
9  auto * result = new MythScreenSaverDRM(Parent, mDisplay);
10  if (result->m_valid)
11  return result;
12  result->setParent(nullptr);
13  delete result;
14  return nullptr;
15 }
16 
26  : MythScreenSaver(Parent),
27  m_display(dynamic_cast<MythDisplayDRM*>(mDisplay))
28 {
29  m_valid = m_display != nullptr;
30 }
31 
33 {
34 }
35 
37 {
38  Disable();
39 }
40 
42 {
43 }
44 
46 {
47  return false;
48 }
MythDisplayDRM
Definition: mythdisplaydrm.h:11
MythScreenSaverDRM::Restore
void Restore() override
Definition: mythscreensaverdrm.cpp:36
MythScreenSaver
Base Class for screensavers.
Definition: mythscreensaver.h:14
MythScreenSaverDRM::m_display
MythDisplayDRM * m_display
Definition: mythscreensaverdrm.h:24
MythScreenSaverDRM
Definition: mythscreensaverdrm.h:8
MythScreenSaverDRM::m_valid
bool m_valid
Definition: mythscreensaverdrm.h:23
mythlogging.h
MythScreenSaverDRM::MythScreenSaverDRM
MythScreenSaverDRM(QObject *Parent, MythDisplay *mDisplay)
Definition: mythscreensaverdrm.cpp:25
mythscreensaverdrm.h
MythScreenSaverDRM::Disable
void Disable() override
Definition: mythscreensaverdrm.cpp:32
MythDisplay
Definition: mythdisplay.h:22
MythScreenSaverDRM::Create
static MythScreenSaverDRM * Create(QObject *Parent, MythDisplay *mDisplay)
Definition: mythscreensaverdrm.cpp:7
MythScreenSaverDRM::Asleep
bool Asleep() override
Definition: mythscreensaverdrm.cpp:45
MythScreenSaverDRM::Reset
void Reset() override
Definition: mythscreensaverdrm.cpp:41