File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -306,6 +306,18 @@ QString MythRect::getHeight(void) const
306306 return stringHeight;
307307}
308308
309+ QString MythRect::toString (bool details) const
310+ {
311+ QString result = QString (" (%1,%2,%3,%4)" )
312+ .arg (x ()).arg (y ()).arg (width ()).arg (height ());
313+
314+ if (details)
315+ result += QString (" [%1,%2,%3,%4]" )
316+ .arg (getX ()).arg (getY ()).arg (getWidth ()).arg (getHeight ());
317+
318+ return result;
319+ }
320+
309321QRect MythRect::toQRect () const
310322{
311323 return QRect (x (),y (),width (),height ());
@@ -479,6 +491,18 @@ QString MythPoint::getY(void) const
479491 return stringY;
480492}
481493
494+ QString MythPoint::toString (bool details) const
495+ {
496+ QString result = QString (" (%1,%2)" )
497+ .arg (x ()).arg (y ());
498+
499+ if (details)
500+ result += QString (" [%1,%2]" )
501+ .arg (getX ()).arg (getY ());
502+
503+ return result;
504+ }
505+
482506QPoint MythPoint::toQPoint () const
483507{
484508 return QPoint (x (),y ());
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ class MUI_PUBLIC MythRect : public QRect
5454 void moveTop (const QString &sX );
5555 void moveTop (int Y) { QRect::moveTop (Y); }
5656
57+ QString toString (bool details = false ) const ;
5758 QRect toQRect (void ) const ;
5859
5960 private:
@@ -102,6 +103,7 @@ class MUI_PUBLIC MythPoint : public QPoint
102103 QString getX (void ) const ;
103104 QString getY (void ) const ;
104105
106+ QString toString (bool details = false ) const ;
105107 QPoint toQPoint (void ) const ;
106108
107109 private:
You can’t perform that action at this time.
0 commit comments