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
12using MythVRRPtr = std::shared_ptr<class MythVRR>;
13using MythVRRRange = std::tuple<int,int,bool>;
14
16{
17 public:
18 enum VRRType : std::uint8_t
19 {
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
MythVRRRange m_range
Definition: mythvrr.h:41
virtual void SetEnabled(bool Enable=true)=0
bool m_enabled
Definition: mythvrr.h:40
MythVRR(bool Controllable, VRRType Type, bool Enabled, MythVRRRange Range)
Definition: mythvrr.cpp:47
VRRType
Definition: mythvrr.h:19
@ Unknown
Definition: mythvrr.h:20
@ FreeSync
Definition: mythvrr.h:21
@ GSyncCompat
Definition: mythvrr.h:23
@ GSync
Definition: mythvrr.h:22
MythVRRRange GetRange() const
Definition: mythvrr.cpp:112
bool Enabled() const
Definition: mythvrr.cpp:107
virtual ~MythVRR()=default
static MythVRRPtr Create(class MythDisplay *MDisplay)
Create a concrete implementation of MythVRR suitable for the given Display.
Definition: mythvrr.cpp:57
bool m_controllable
Definition: mythvrr.h:38
QString RangeDescription() const
Definition: mythvrr.cpp:134
VRRType m_type
Definition: mythvrr.h:39
QString TypeToString() const
Definition: mythvrr.cpp:122
bool IsControllable() const
Definition: mythvrr.cpp:117
std::tuple< int, int, bool > MythVRRRange
Definition: mythedid.h:19
std::shared_ptr< class MythVRR > MythVRRPtr
Definition: mythvrr.h:12