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 <cstdint>
9 #include <memory>
10 #include <tuple>
11 
12 using MythVRRPtr = std::shared_ptr<class MythVRR>;
13 using MythVRRRange = std::tuple<int,int,bool>;
14 
15 class MythVRR
16 {
17  public:
18  enum VRRType : std::uint8_t
19  {
20  Unknown = 0,
24  };
25 
26  static MythVRRPtr Create(class MythDisplay* MDisplay);
27  virtual ~MythVRR() = default;
28  virtual void SetEnabled(bool Enable = true) = 0;
29  QString TypeToString() const;
30  bool Enabled() const;
31  MythVRRRange GetRange() const;
32  QString RangeDescription() const;
33  bool IsControllable() const;
34 
35  protected:
36  MythVRR(bool Controllable, VRRType Type, bool Enabled, MythVRRRange Range);
37 
38  bool m_controllable { false };
40  bool m_enabled { false };
41  MythVRRRange m_range { 0, 0, false };
42 };
43 
44 #endif
MythVRR::MythVRR
MythVRR(bool Controllable, VRRType Type, bool Enabled, MythVRRRange Range)
Definition: mythvrr.cpp:46
MythVRR::IsControllable
bool IsControllable() const
Definition: mythvrr.cpp:116
MythVRR::m_type
VRRType m_type
Definition: mythvrr.h:39
MythVRR::GetRange
MythVRRRange GetRange() const
Definition: mythvrr.cpp:111
MythVRR::m_range
MythVRRRange m_range
Definition: mythvrr.h:41
MythVRR::FreeSync
@ FreeSync
Definition: mythvrr.h:21
MythVRR::GSyncCompat
@ GSyncCompat
Definition: mythvrr.h:23
MythVRR
Definition: mythvrr.h:15
MythVRR::m_enabled
bool m_enabled
Definition: mythvrr.h:40
MythVRR::m_controllable
bool m_controllable
Definition: mythvrr.h:38
MythVRR::Create
static MythVRRPtr Create(class MythDisplay *MDisplay)
Create a concrete implementation of MythVRR suitable for the given Display.
Definition: mythvrr.cpp:56
MythVRR::VRRType
VRRType
Definition: mythvrr.h:18
MythVRR::GSync
@ GSync
Definition: mythvrr.h:22
MythVRR::TypeToString
QString TypeToString() const
Definition: mythvrr.cpp:121
MythDisplay
Definition: mythdisplay.h:22
MythVRRRange
std::tuple< int, int, bool > MythVRRRange
Definition: mythedid.h:19
MythVRR::SetEnabled
virtual void SetEnabled(bool Enable=true)=0
MythVRR::Enabled
bool Enabled() const
Definition: mythvrr.cpp:106
MythVRR::~MythVRR
virtual ~MythVRR()=default
MythVRR::Unknown
@ Unknown
Definition: mythvrr.h:20
MythVRR::RangeDescription
QString RangeDescription() const
Definition: mythvrr.cpp:133
MythVRRPtr
std::shared_ptr< class MythVRR > MythVRRPtr
Definition: mythvrr.h:12