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 (void)
 
QSize Resolution (void) const
 
int Width (void) const
 
int Height (void) const
 
int WidthMM (void) const
 
int HeightMM (void) const
 
double AspectRatio (void) const
 
double RefreshRate (void) const
 
void SetAspectRatio (double AspectRatio)
 
void AddRefreshRate (double Rate)
 
void ClearRefreshRates (void)
 
void SetRefreshRate (double Rate)
 
const std::vector< double > & RefreshRates (void) const
 

Static Public Member Functions

static int FindBestMatch (const vector< MythDisplayMode > &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 }
 
vector< double > m_refreshRates { }
 

Detailed Description

Definition at line 21 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 10 of file mythdisplaymode.cpp.

◆ MythDisplayMode() [3/3]

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

Definition at line 21 of file mythdisplaymode.cpp.

Member Function Documentation

◆ operator<()

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

Definition at line 33 of file mythdisplaymode.cpp.

◆ operator==()

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

Definition at line 42 of file mythdisplaymode.cpp.

◆ Init()

void MythDisplayMode::Init ( void  )

Definition at line 47 of file mythdisplaymode.cpp.

◆ Resolution()

QSize MythDisplayMode::Resolution ( void  ) const

◆ Width()

int MythDisplayMode::Width ( void  ) const

Definition at line 58 of file mythdisplaymode.cpp.

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

◆ Height()

int MythDisplayMode::Height ( void  ) const

Definition at line 63 of file mythdisplaymode.cpp.

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

◆ WidthMM()

int MythDisplayMode::WidthMM ( void  ) const

Definition at line 68 of file mythdisplaymode.cpp.

◆ HeightMM()

int MythDisplayMode::HeightMM ( void  ) const

Definition at line 73 of file mythdisplaymode.cpp.

Referenced by SetAspectRatio().

◆ AspectRatio()

double MythDisplayMode::AspectRatio ( void  ) const

Definition at line 83 of file mythdisplaymode.cpp.

Referenced by MythDisplayMode(), and SetAspectRatio().

◆ RefreshRate()

double MythDisplayMode::RefreshRate ( void  ) const

◆ SetAspectRatio()

void MythDisplayMode::SetAspectRatio ( double  AspectRatio)

Definition at line 101 of file mythdisplaymode.cpp.

Referenced by MythDisplayMode().

◆ AddRefreshRate()

void MythDisplayMode::AddRefreshRate ( double  Rate)

◆ ClearRefreshRates()

void MythDisplayMode::ClearRefreshRates ( void  )

Definition at line 115 of file mythdisplaymode.cpp.

Referenced by SetRefreshRate().

◆ SetRefreshRate()

void MythDisplayMode::SetRefreshRate ( double  Rate)

Definition at line 120 of file mythdisplaymode.cpp.

◆ RefreshRates()

const std::vector< double > & MythDisplayMode::RefreshRates ( void  ) const

Definition at line 78 of file mythdisplaymode.cpp.

◆ FindBestMatch()

int MythDisplayMode::FindBestMatch ( const vector< MythDisplayMode > &  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 134 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 222 of file mythdisplaymode.cpp.

Referenced by MythDisplay::SwitchToVideo().

Member Data Documentation

◆ m_width

int MythDisplayMode::m_width { 0 }
private

Definition at line 53 of file mythdisplaymode.h.

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

◆ m_height

int MythDisplayMode::m_height { 0 }
private

Definition at line 54 of file mythdisplaymode.h.

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

◆ m_widthMM

int MythDisplayMode::m_widthMM { 0 }
private

Definition at line 55 of file mythdisplaymode.h.

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

◆ m_heightMM

int MythDisplayMode::m_heightMM { 0 }
private

Definition at line 56 of file mythdisplaymode.h.

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

◆ m_aspect

double MythDisplayMode::m_aspect { -1.0 }
private

Definition at line 57 of file mythdisplaymode.h.

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

◆ m_refreshRates

vector<double> MythDisplayMode::m_refreshRates { }
private

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