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

#include <DisplayResScreen.h>

Public Member Functions

 DisplayResScreen ()=default
 
 DisplayResScreen (int w, int h, int mw, int mh, double aspectRatio, double refreshRate)
 
 DisplayResScreen (int w, int h, int mw, int mh, const std::vector< double > &refreshRates)
 
 DisplayResScreen (int w, int h, int mw, int mh, const std::vector< double > &refreshRates, const std::map< double, short > &realrates)
 
 DisplayResScreen (int w, int h, int mw, int mh, const double *refreshRates, uint rr_length)
 
 DisplayResScreen (int w, int h, int mw, int mh, const short *refreshRates, uint rr_length)
 
 DisplayResScreen (const QString &str)
 
void Init ()
 
int Width () const
 
int Height () const
 
int Width_mm () const
 
int Height_mm () const
 
bool Custom () const
 
double AspectRatio () const
 
double RefreshRate () const
 
const std::vector< double > & RefreshRates () const
 
void SetAspectRatio (double a)
 
void AddRefreshRate (double rr)
 
void ClearRefreshRates (void)
 
void SetRefreshRate (double rr)
 
void SetCustom (bool b)
 
QString toString () const
 
bool operator< (const DisplayResScreen &b) const
 
bool operator== (const DisplayResScreen &b) const
 

Static Public Member Functions

static QStringList Convert (const DisplayResVector &dsr)
 
static DisplayResVector Convert (const QStringList &slist)
 
static int FindBestMatch (const DisplayResVector &dsr, const DisplayResScreen &d, double &target_rate)
 
static uint64_t CalcKey (int w, int h, double rate)
 
static bool compare_rates (double f1, double f2, double precision=0.01)
 
static uint64_t FindBestScreen (const DisplayResMap &resmap, int iwidth, int iheight, double frate)
 

Public Attributes

std::map< double, short > realRates
 

Private Attributes

int m_width {0}
 
int m_height {0}
 
int m_width_mm {0}
 
int m_height_mm {0}
 
double m_aspect {-1.0}
 
std::vector< double > m_refreshRates
 
bool m_custom {false}
 

Detailed Description

Definition at line 23 of file DisplayResScreen.h.

Constructor & Destructor Documentation

◆ DisplayResScreen() [1/7]

DisplayResScreen::DisplayResScreen ( )
default

◆ DisplayResScreen() [2/7]

DisplayResScreen::DisplayResScreen ( int  w,
int  h,
int  mw,
int  mh,
double  aspectRatio,
double  refreshRate 
)

Definition at line 11 of file DisplayResScreen.cpp.

◆ DisplayResScreen() [3/7]

DisplayResScreen::DisplayResScreen ( int  w,
int  h,
int  mw,
int  mh,
const std::vector< double > &  refreshRates 
)

Definition at line 20 of file DisplayResScreen.cpp.

◆ DisplayResScreen() [4/7]

DisplayResScreen::DisplayResScreen ( int  w,
int  h,
int  mw,
int  mh,
const std::vector< double > &  refreshRates,
const std::map< double, short > &  realrates 
)

Definition at line 27 of file DisplayResScreen.cpp.

◆ DisplayResScreen() [5/7]

DisplayResScreen::DisplayResScreen ( int  w,
int  h,
int  mw,
int  mh,
const double *  refreshRates,
uint  rr_length 
)

Definition at line 36 of file DisplayResScreen.cpp.

◆ DisplayResScreen() [6/7]

DisplayResScreen::DisplayResScreen ( int  w,
int  h,
int  mw,
int  mh,
const short *  refreshRates,
uint  rr_length 
)

Definition at line 47 of file DisplayResScreen.cpp.

◆ DisplayResScreen() [7/7]

DisplayResScreen::DisplayResScreen ( const QString &  str)
explicit

Definition at line 57 of file DisplayResScreen.cpp.

Member Function Documentation

◆ Init()

void DisplayResScreen::Init ( void  )
inline

Definition at line 98 of file DisplayResScreen.h.

Referenced by DisplayRes::Initialize().

◆ Width()

int DisplayResScreen::Width ( ) const
inline

Definition at line 43 of file DisplayResScreen.h.

Referenced by FindBestMatch(), and DisplayResX::GetVideoModes().

◆ Height()

int DisplayResScreen::Height ( ) const
inline

Definition at line 44 of file DisplayResScreen.h.

Referenced by DisplayResX::GetVideoModes().

◆ Width_mm()

int DisplayResScreen::Width_mm ( ) const
inline

Definition at line 45 of file DisplayResScreen.h.

Referenced by DisplayResX::GetVideoModes(), and SetAspectRatio().

◆ Height_mm()

int DisplayResScreen::Height_mm ( ) const
inline

Definition at line 46 of file DisplayResScreen.h.

Referenced by DisplayResX::GetVideoModes(), and SetAspectRatio().

◆ Custom()

bool DisplayResScreen::Custom ( ) const
inline

Definition at line 47 of file DisplayResScreen.h.

◆ AspectRatio()

double DisplayResScreen::AspectRatio ( ) const
inline

Definition at line 104 of file DisplayResScreen.h.

◆ RefreshRate()

double DisplayResScreen::RefreshRate ( ) const
inline

Definition at line 115 of file DisplayResScreen.h.

Referenced by DisplayRes::SwitchToGUI(), and DisplayRes::SwitchToVideo().

◆ RefreshRates()

const std::vector<double>& DisplayResScreen::RefreshRates ( ) const
inline

Definition at line 51 of file DisplayResScreen.h.

Referenced by DisplayResX::GetVideoModes().

◆ SetAspectRatio()

void DisplayResScreen::SetAspectRatio ( double  a)

Definition at line 75 of file DisplayResScreen.cpp.

Referenced by DisplayResScreen().

◆ AddRefreshRate()

void DisplayResScreen::AddRefreshRate ( double  rr)
inline

Definition at line 55 of file DisplayResScreen.h.

Referenced by DisplayResOSX::GetVideoModes().

◆ ClearRefreshRates()

void DisplayResScreen::ClearRefreshRates ( void  )
inline

Definition at line 60 of file DisplayResScreen.h.

◆ SetRefreshRate()

void DisplayResScreen::SetRefreshRate ( double  rr)
inline

Definition at line 61 of file DisplayResScreen.h.

Referenced by DisplayRes::SwitchToGUI(), and DisplayRes::SwitchToVideo().

◆ SetCustom()

void DisplayResScreen::SetCustom ( bool  b)
inline

Definition at line 67 of file DisplayResScreen.h.

◆ toString()

QString DisplayResScreen::toString ( void  ) const

Definition at line 83 of file DisplayResScreen.cpp.

Referenced by Convert().

◆ operator<()

bool DisplayResScreen::operator< ( const DisplayResScreen b) const
inline

Definition at line 122 of file DisplayResScreen.h.

◆ operator==()

bool DisplayResScreen::operator== ( const DisplayResScreen b) const
inline

Definition at line 131 of file DisplayResScreen.h.

◆ Convert() [1/2]

QStringList DisplayResScreen::Convert ( const DisplayResVector dsr)
static

Definition at line 92 of file DisplayResScreen.cpp.

◆ Convert() [2/2]

DisplayResVector DisplayResScreen::Convert ( const QStringList &  slist)
static

Definition at line 100 of file DisplayResScreen.cpp.

◆ FindBestMatch()

int DisplayResScreen::FindBestMatch ( const DisplayResVector dsr,
const DisplayResScreen d,
double &  target_rate 
)
static

◆ CalcKey()

uint64_t DisplayResScreen::CalcKey ( int  w,
int  h,
double  rate 
)
inlinestatic

◆ compare_rates()

bool DisplayResScreen::compare_rates ( double  f1,
double  f2,
double  precision = 0.01 
)
static

◆ FindBestScreen()

uint64_t DisplayResScreen::FindBestScreen ( const DisplayResMap resmap,
int  iwidth,
int  iheight,
double  frate 
)
static

Definition at line 199 of file DisplayResScreen.cpp.

Referenced by DisplayRes::SwitchToVideo().

Member Data Documentation

◆ realRates

std::map<double, short> DisplayResScreen::realRates

Definition at line 70 of file DisplayResScreen.h.

◆ m_width

int DisplayResScreen::m_width {0}
private

Definition at line 89 of file DisplayResScreen.h.

Referenced by DisplayResScreen(), Init(), operator<(), operator==(), and toString().

◆ m_height

int DisplayResScreen::m_height {0}
private

Definition at line 90 of file DisplayResScreen.h.

Referenced by DisplayResScreen(), Init(), operator<(), operator==(), and toString().

◆ m_width_mm

int DisplayResScreen::m_width_mm {0}
private

Definition at line 91 of file DisplayResScreen.h.

Referenced by AspectRatio(), DisplayResScreen(), Init(), and toString().

◆ m_height_mm

int DisplayResScreen::m_height_mm {0}
private

Definition at line 92 of file DisplayResScreen.h.

Referenced by AspectRatio(), DisplayResScreen(), Init(), and toString().

◆ m_aspect

double DisplayResScreen::m_aspect {-1.0}
private

Definition at line 93 of file DisplayResScreen.h.

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

◆ m_refreshRates

std::vector<double> DisplayResScreen::m_refreshRates
private

Definition at line 94 of file DisplayResScreen.h.

Referenced by DisplayResScreen(), RefreshRate(), and toString().

◆ m_custom

bool DisplayResScreen::m_custom {false}
private

Definition at line 95 of file DisplayResScreen.h.


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