Skip to content

Commit

Permalink
MythUIScreenBounds: Make certain methods const
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-kendall committed Oct 3, 2020
1 parent 901c1aa commit bf3f079
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions mythtv/libs/libmythui/mythuiscreenbounds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,25 +207,25 @@ QRect MythUIScreenBounds::GetScreenRect()
return m_screenRect;
}

QSize MythUIScreenBounds::NormSize(const QSize& Size)
QSize MythUIScreenBounds::NormSize(const QSize& Size) const
{
QSize result;
result.setWidth(static_cast<int>(Size.width() * m_screenHorizScale));
result.setHeight(static_cast<int>(Size.height() * m_screenVertScale));
return result;
}

int MythUIScreenBounds::NormX(int X)
int MythUIScreenBounds::NormX(int X) const
{
return qRound(X * m_screenHorizScale);
}

int MythUIScreenBounds::NormY(int Y)
int MythUIScreenBounds::NormY(int Y) const
{
return qRound(Y * m_screenVertScale);
}

void MythUIScreenBounds::GetScalingFactors(float& Horizontal, float& Vertical)
void MythUIScreenBounds::GetScalingFactors(float& Horizontal, float& Vertical) const
{
Horizontal = m_screenHorizScale;
Vertical = m_screenVertScale;
Expand All @@ -242,7 +242,7 @@ QSize MythUIScreenBounds::GetThemeSize()
return m_themeSize;
}

int MythUIScreenBounds::GetFontStretch()
int MythUIScreenBounds::GetFontStretch() const
{
return m_fontStretch;
}
Expand Down
10 changes: 5 additions & 5 deletions mythtv/libs/libmythui/mythuiscreenbounds.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ class MUI_PUBLIC MythUIScreenBounds
QRect GetUIScreenRect();
void SetUIScreenRect(const QRect& Rect);
QRect GetScreenRect();
QSize NormSize(const QSize& Size);
int NormX(int X);
int NormY(int Y);
void GetScalingFactors(float& Horizontal, float& Vertical);
QSize NormSize(const QSize& Size) const;
int NormX(int X) const;
int NormY(int Y) const;
void GetScalingFactors(float& Horizontal, float& Vertical) const;
void SetScalingFactors(float Horizontal, float Vertical);
QSize GetThemeSize();
int GetFontStretch();
int GetFontStretch() const;
void SetFontStretch(int Stretch);

protected:
Expand Down

0 comments on commit bf3f079

Please sign in to comment.