MythTV  master
mythuiscreenbounds.h
Go to the documentation of this file.
1 #ifndef MYTHUISCREENBOUNDS_H
2 #define MYTHUISCREENBOUNDS_H
3 
4 // Qt
5 #include <QWidget>
6 
7 // MythTV
8 #include "mythuiexp.h"
9 
10 class MythDisplay;
11 
12 class MUI_PUBLIC MythUIScreenBounds : public QWidget
13 {
14  Q_OBJECT
15 
16  signals:
17  void UIScreenRectChanged(const QRect& Rect);
18 
19  public:
20  static bool GeometryIsOverridden();
21  static void ParseGeometryOverride(const QString& Geometry);
22  static QRect GetGeometryOverride();
23  static bool WindowIsAlwaysFullscreen();
24 
25  void UpdateScreenSettings(MythDisplay* mDisplay);
26  QRect GetUIScreenRect();
27  void SetUIScreenRect(QRect Rect);
28  QRect GetScreenRect();
29  QSize NormSize(QSize Size) const;
30  int NormX(int X) const;
31  int NormY(int Y) const;
32  void GetScalingFactors(float& Horizontal, float& Vertical) const;
33  void SetScalingFactors(float Horizontal, float Vertical);
34  QSize GetThemeSize();
35  int GetFontStretch() const;
36  void SetFontStretch(int Stretch);
37 
38  protected:
40  void InitScreenBounds();
41 
42  QSize m_themeSize { 1920, 1080 };
43  QRect m_uiScreenRect { 0, 0, 1920, 1080 };
44  QRect m_screenRect { 0, 0, 1920, 1080 };
45  float m_screenHorizScale { 1.0 };
46  float m_screenVertScale { 1.0 };
47  bool m_wantWindow { false };
48  bool m_wantFullScreen { true };
49  bool m_qtFullScreen { false };
50  bool m_alwaysOnTop { false };
51  int m_fontStretch { 100 };
52  bool m_forceFullScreen { false };
53 
54  private:
55  static int s_XOverride;
56  static int s_YOverride;
57  static int s_WOverride;
58  static int s_HOverride;
59 };
60 
61 #endif
MUI_PUBLIC
#define MUI_PUBLIC
Definition: mythuiexp.h:9
MythUIScreenBounds
Definition: mythuiscreenbounds.h:12
MythUIScreenBounds::s_WOverride
static int s_WOverride
Definition: mythuiscreenbounds.h:57
MythUIScreenBounds::s_HOverride
static int s_HOverride
Definition: mythuiscreenbounds.h:58
ReflectAxis::Horizontal
@ Horizontal
MythDisplay
Definition: mythdisplay.h:22
MythUIScreenBounds::s_XOverride
static int s_XOverride
Definition: mythuiscreenbounds.h:55
ReflectAxis::Vertical
@ Vertical
MythUIScreenBounds::s_YOverride
static int s_YOverride
Definition: mythuiscreenbounds.h:56
mythuiexp.h