MythTV  master
mythvrr.h
Go to the documentation of this file.
1 #ifndef MYTHVRR_H
2 #define MYTHVRR_H
3 
4 // Qt
5 #include <QString>
6 
7 // Std
8 #include <memory>
9 #include <tuple>
10 
11 using MythVRRPtr = std::shared_ptr<class MythVRR>;
12 using MythVRRRange = std::tuple<int,int,bool>;
13 
14 class MythVRR
15 {
16  public:
17  enum VRRType
18  {
19  Unknown = 0,
23  };
24 
25  static MythVRRPtr Create(class MythDisplay* _Display);
26  virtual ~MythVRR() = default;
27  virtual void SetEnabled(bool Enable = true) = 0;
28  QString TypeToString() const;
29  bool Enabled() const;
30  MythVRRRange GetRange() const;
31  QString RangeDescription() const;
32  bool IsControllable() const;
33 
34  protected:
35  MythVRR(bool Controllable, VRRType Type, bool Enabled, MythVRRRange Range);
36 
37  bool m_controllable { false };
39  bool m_enabled { false };
40  MythVRRRange m_range { 0, 0, false };
41 };
42 
43 #endif
MythVRR::Create
static MythVRRPtr Create(class MythDisplay *_Display)
Create a concrete implementation of MythVRR suitable for the given Display.
Definition: mythvrr.cpp:54
MythVRR::MythVRR
MythVRR(bool Controllable, VRRType Type, bool Enabled, MythVRRRange Range)
Definition: mythvrr.cpp:44
MythVRR::Unknown
@ Unknown
Definition: mythvrr.h:19
MythVRR::IsControllable
bool IsControllable() const
Definition: mythvrr.cpp:114
MythVRR::m_type
VRRType m_type
Definition: mythvrr.h:38
MythVRR::GetRange
MythVRRRange GetRange() const
Definition: mythvrr.cpp:109
MythVRR::m_range
MythVRRRange m_range
Definition: mythvrr.h:40
MythVRR
Definition: mythvrr.h:14
MythVRR::GSync
@ GSync
Definition: mythvrr.h:21
MythVRR::FreeSync
@ FreeSync
Definition: mythvrr.h:20
MythVRR::m_enabled
bool m_enabled
Definition: mythvrr.h:39
MythVRR::m_controllable
bool m_controllable
Definition: mythvrr.h:37
MythVRR::TypeToString
QString TypeToString() const
Definition: mythvrr.cpp:119
MythDisplay
Definition: mythdisplay.h:22
MythVRRRange
std::tuple< int, int, bool > MythVRRRange
Definition: mythedid.h:19
MythVRR::GSyncCompat
@ GSyncCompat
Definition: mythvrr.h:22
MythVRR::SetEnabled
virtual void SetEnabled(bool Enable=true)=0
MythVRR::Enabled
bool Enabled() const
Definition: mythvrr.cpp:104
MythVRR::~MythVRR
virtual ~MythVRR()=default
MythVRR::RangeDescription
QString RangeDescription() const
Definition: mythvrr.cpp:131
MythVRRPtr
std::shared_ptr< class MythVRR > MythVRRPtr
Definition: mythvrr.h:11
MythVRR::VRRType
VRRType
Definition: mythvrr.h:17