MythTV  master
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
MythDisplayMode Class Reference

#include <mythdisplaymode.h>

Collaboration diagram for MythDisplayMode:
Collaboration graph
[legend]

Public Member Functions

bool operator< (const MythDisplayMode &Other) const
 
bool operator== (const MythDisplayMode &Other) const
 
 MythDisplayMode ()=default
 
 MythDisplayMode (QSize Resolution, QSize PhysicalSize, double AspectRatio, double RefreshRate)
 
 MythDisplayMode (int Width, int Height, int MMWidth, int MMHeight, double AspectRatio, double RefreshRate)
 
void Init ()
 
QString ToString () const
 
QSize Resolution () const
 
int Width () const
 
int Height () const
 
int WidthMM () const
 
int HeightMM () const
 
double AspectRatio () const
 
double RefreshRate () const
 
void SetAspectRatio (double AspectRatio)
 
void AddRefreshRate (double Rate)
 
void ClearRefreshRates ()
 
void SetRefreshRate (double Rate)
 
const MythDisplayRatesRefreshRates () const
 

Static Public Member Functions

static int FindBestMatch (const MythDisplayModes &Modes, const MythDisplayMode &Mode, double &TargetRate)
 
static uint64_t CalcKey (QSize Size, double Rate)
 
static bool CompareRates (double First, double Second, double Precision=0.01)
 Determine whether two rates are considered equal with the given precision. More...
 
static uint64_t FindBestScreen (const DisplayModeMap &Map, int Width, int Height, double Rate)
 

Private Attributes

int m_width { 0 }
 
int m_height { 0 }
 
int m_widthMM { 0 }
 
int m_heightMM { 0 }
 
double m_aspect { -1.0 }
 
MythDisplayRates m_refreshRates { }
 

Detailed Description

Definition at line 22 of file mythdisplaymode.h.

Constructor & Destructor Documentation

◆ MythDisplayMode() [1/3]

MythDisplayMode::MythDisplayMode ( )
default

◆ MythDisplayMode() [2/3]

MythDisplayMode::MythDisplayMode ( QSize  Resolution,
QSize  PhysicalSize,
double  AspectRatio,
double  RefreshRate 
)

Definition at line 11 of file mythdisplaymode.cpp.

◆ MythDisplayMode() [3/3]

MythDisplayMode::MythDisplayMode ( int  Width,
int  Height,
int  MMWidth,
int  MMHeight,
double  AspectRatio,
double  RefreshRate 
)

Definition at line 22 of file mythdisplaymode.cpp.

Member Function Documentation

◆ operator<()

bool MythDisplayMode::operator< ( const MythDisplayMode Other) const

Definition at line 34 of file mythdisplaymode.cpp.

◆ operator==()

bool MythDisplayMode::operator== ( const MythDisplayMode Other) const

Definition at line 43 of file mythdisplaymode.cpp.

◆ Init()

void MythDisplayMode::Init ( )

Definition at line 48 of file mythdisplaymode.cpp.

◆ ToString()

QString MythDisplayMode::ToString ( ) const

Definition at line 261 of file mythdisplaymode.cpp.

◆ Resolution()

QSize MythDisplayMode::Resolution ( ) const

◆ Width()

int MythDisplayMode::Width ( ) const

◆ Height()

int MythDisplayMode::Height ( ) const

◆ WidthMM()

int MythDisplayMode::WidthMM ( ) const

Definition at line 69 of file mythdisplaymode.cpp.

◆ HeightMM()

int MythDisplayMode::HeightMM ( ) const

Definition at line 74 of file mythdisplaymode.cpp.

Referenced by SetAspectRatio().

◆ AspectRatio()

double MythDisplayMode::AspectRatio ( ) const

Definition at line 84 of file mythdisplaymode.cpp.

Referenced by MythDisplayMode(), SetAspectRatio(), and MythDisplay::SwitchToVideo().

◆ RefreshRate()

double MythDisplayMode::RefreshRate ( ) const

◆ SetAspectRatio()

void MythDisplayMode::SetAspectRatio ( double  AspectRatio)

Definition at line 102 of file mythdisplaymode.cpp.

Referenced by MythDisplayMode().

◆ AddRefreshRate()

void MythDisplayMode::AddRefreshRate ( double  Rate)

Definition at line 110 of file mythdisplaymode.cpp.

Referenced by SetRefreshRate().

◆ ClearRefreshRates()

void MythDisplayMode::ClearRefreshRates ( )

Definition at line 116 of file mythdisplaymode.cpp.

Referenced by SetRefreshRate().

◆ SetRefreshRate()

void MythDisplayMode::SetRefreshRate ( double  Rate)

Definition at line 121 of file mythdisplaymode.cpp.

Referenced by MythDisplay::SwitchToVideo().

◆ RefreshRates()

const MythDisplayRates & MythDisplayMode::RefreshRates ( ) const

Definition at line 79 of file mythdisplaymode.cpp.

◆ FindBestMatch()

int MythDisplayMode::FindBestMatch ( const MythDisplayModes Modes,
const MythDisplayMode Mode,
double &  TargetRate 
)
static

◆ CalcKey()

uint64_t MythDisplayMode::CalcKey ( QSize  Size,
double  Rate 
)
static

◆ CompareRates()

bool MythDisplayMode::CompareRates ( double  First,
double  Second,
double  Precision = 0.01 
)
static

Determine whether two rates are considered equal with the given precision.

Definition at line 135 of file mythdisplaymode.cpp.

Referenced by FindBestMatch(), FindBestScreen(), and MythDisplay::SwitchToVideo().

◆ FindBestScreen()

uint64_t MythDisplayMode::FindBestScreen ( const DisplayModeMap Map,
int  Width,
int  Height,
double  Rate 
)
static

Definition at line 223 of file mythdisplaymode.cpp.

Referenced by MythDisplay::SwitchToVideo().

Member Data Documentation

◆ m_width

int MythDisplayMode::m_width { 0 }
private

Definition at line 55 of file mythdisplaymode.h.

Referenced by Init(), operator<(), operator==(), Resolution(), ToString(), and Width().

◆ m_height

int MythDisplayMode::m_height { 0 }
private

Definition at line 56 of file mythdisplaymode.h.

Referenced by Height(), Init(), operator<(), operator==(), Resolution(), and ToString().

◆ m_widthMM

int MythDisplayMode::m_widthMM { 0 }
private

Definition at line 57 of file mythdisplaymode.h.

Referenced by AspectRatio(), Init(), SetAspectRatio(), and WidthMM().

◆ m_heightMM

int MythDisplayMode::m_heightMM { 0 }
private

Definition at line 58 of file mythdisplaymode.h.

Referenced by AspectRatio(), HeightMM(), Init(), and SetAspectRatio().

◆ m_aspect

double MythDisplayMode::m_aspect { -1.0 }
private

Definition at line 59 of file mythdisplaymode.h.

Referenced by AspectRatio(), Init(), and SetAspectRatio().

◆ m_refreshRates

MythDisplayRates MythDisplayMode::m_refreshRates { }
private

The documentation for this class was generated from the following files: