23 : QRect(x, y, width, height) {}
24 MythRect(
const QString &sX,
const QString &sY,
const QString &sWidth,
25 const QString &sHeight,
const QString &baseRes = QString());
32 void CalculateArea(QRect parentArea);
33 void CalculateArea(
const MythRect & parentArea);
37 void setRect(
const QString &sX,
const QString &sY,
const QString &sWidth,
38 const QString &sHeight,
const QString &baseRes = QString());
39 void setRect(
int X,
int Y,
int w,
int h) { QRect::setRect(X,Y,w,h); }
40 void setX(
const QString &sX);
41 void setX(
int X) { QRect::setX(X); }
42 void setY(
const QString &sY);
43 void setY(
int Y) { QRect::setY(Y); }
44 void setWidth(
const QString &sWidth);
45 void setWidth(
int width) { QRect::setWidth(width); }
46 void setHeight(
const QString &sHeight);
47 void setHeight(
int height) { QRect::setHeight(height); }
49 QString getX(
void)
const;
50 QString getY(
void)
const;
51 QString getWidth(
void)
const;
52 QString getHeight(
void)
const;
55 void moveTopLeft(QPoint point);
57 void moveLeft(
const QString &sX);
59 void moveTop(
const QString &sY);
60 void moveTop(
int Y) { QRect::moveTop(Y); }
62 QString
toString(
bool details =
false)
const;
63 QRect toQRect(
void)
const;
66 static bool parsePosition(
float &percent,
int &offset,
int &absolute,
67 const QString &value,
bool is_size);
69 float m_percentWidth {0.0F};
70 float m_percentHeight {0.0F};
71 float m_percentX {0.0F};
72 float m_percentY {0.0F};
73 int m_offsetWidth {0};
74 int m_offsetHeight {0};
78 bool m_needsUpdate {
true};
80 QRect m_parentArea {0,0,0,0};
96 MythPoint(
const QString &sX,
const QString &sY);
103 void CalculatePoint(QRect parentArea);
104 void CalculatePoint(
const MythRect & parentArea);
106 void NormPoint(
void);
108 void setX(
const QString &sX);
109 void setX(
int X) { QPoint::setX(X); }
110 void setY(
const QString &sY);
111 void setY(
int Y) { QPoint::setY(Y); }
113 QString getX(
void)
const;
114 QString getY(
void)
const;
116 QString
toString(
bool details =
false)
const;
117 QPoint toQPoint(
void)
const;
120 static bool parsePosition(
float &percent,
int &offset,
int &absolute,
121 const QString &value);
123 float m_percentX {0.0F};
124 float m_percentY {0.0F};
128 bool m_needsUpdate {
true};
Wrapper around QPoint allowing us to handle percentage and other relative values for positioning in m...
Wrapper around QRect allowing us to handle percentage and other relative values for areas in mythui.
MythRect(int x, int y, int width, int height)
void setHeight(int height)
void setRect(int X, int Y, int w, int h)
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.