MythPoint Class Reference

Wrapper around QPoint allowing us to handle percentage and other relative values for positioning in mythui. More...

#include <mythrect.h>

List of all members.

Public Member Functions

 MythPoint ()
 MythPoint (int x, int y)
 MythPoint (const QString &sX, const QString &sY)
 MythPoint (QPoint point)
void Init (void)
bool isValid (void) const
void CalculatePoint (const MythRect &parentArea)
void NormPoint (void)
void setX (const QString &sX)
void setX (int X)
void setY (const QString &sY)
void setY (int Y)
QString getX (void) const
QString getY (void) const
QString toString (bool details=false) const
QPoint toQPoint (void) const

Private Member Functions

bool parsePosition (float &percent, int &offset, int &absolute, const QString &value)
 parse the position

Private Attributes

float m_percentX
float m_percentY
int m_offsetX
int m_offsetY
bool m_needsUpdate
QRect m_parentArea
bool valid

Detailed Description

Wrapper around QPoint allowing us to handle percentage and other relative values for positioning in mythui.

Definition at line 84 of file mythrect.h.


Constructor & Destructor Documentation

MythPoint::MythPoint (  ) 

Definition at line 338 of file mythrect.cpp.

MythPoint::MythPoint ( int  x,
int  y 
)

Definition at line 345 of file mythrect.cpp.

MythPoint::MythPoint ( const QString &  sX,
const QString &  sY 
)

Definition at line 351 of file mythrect.cpp.

MythPoint::MythPoint ( QPoint  point  ) 

Definition at line 359 of file mythrect.cpp.


Member Function Documentation

void MythPoint::Init ( void   ) 

Definition at line 365 of file mythrect.cpp.

Referenced by MythPoint().

bool MythPoint::isValid ( void   )  const [inline]
void MythPoint::CalculatePoint ( const MythRect parentArea  ) 

Definition at line 373 of file mythrect.cpp.

Referenced by MythUIType::SetMinSize(), and MythUIType::SetPosition().

void MythPoint::NormPoint ( void   ) 
void MythPoint::setX ( const QString &  sX  ) 
void MythPoint::setX ( int  X  )  [inline]

Definition at line 100 of file mythrect.h.

void MythPoint::setY ( const QString &  sY  ) 
void MythPoint::setY ( int  Y  )  [inline]

Definition at line 102 of file mythrect.h.

QString MythPoint::getX ( void   )  const

Definition at line 475 of file mythrect.cpp.

Referenced by MythRect::moveTopLeft(), and toString().

QString MythPoint::getY ( void   )  const

Definition at line 491 of file mythrect.cpp.

Referenced by MythRect::moveTopLeft(), and toString().

QString MythPoint::toString ( bool  details = false  )  const

Definition at line 507 of file mythrect.cpp.

QPoint MythPoint::toQPoint ( void   )  const

Definition at line 519 of file mythrect.cpp.

Referenced by MythUIText::CursorPosition(), and MythUIType::HandleMovementPulse().

bool MythPoint::parsePosition ( float &  percent,
int &  offset,
int &  absolute,
const QString &  value 
) [private]

parse the position

Returns:
true of position is absolute

Definition at line 413 of file mythrect.cpp.

Referenced by setX(), and setY().


Member Data Documentation

float MythPoint::m_percentX [private]

Definition at line 114 of file mythrect.h.

Referenced by CalculatePoint(), getX(), Init(), NormPoint(), and setX().

float MythPoint::m_percentY [private]

Definition at line 115 of file mythrect.h.

Referenced by CalculatePoint(), getY(), Init(), NormPoint(), and setY().

int MythPoint::m_offsetX [private]

Definition at line 116 of file mythrect.h.

Referenced by CalculatePoint(), getX(), Init(), NormPoint(), and setX().

int MythPoint::m_offsetY [private]

Definition at line 117 of file mythrect.h.

Referenced by CalculatePoint(), getY(), Init(), NormPoint(), and setY().

Definition at line 119 of file mythrect.h.

Referenced by CalculatePoint(), Init(), setX(), and setY().

QRect MythPoint::m_parentArea [private]

Definition at line 121 of file mythrect.h.

Referenced by CalculatePoint().

Definition at line 123 of file mythrect.h.

Referenced by CalculatePoint(), Init(), and MythPoint().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Mon May 28 06:42:16 2012 for MythTV by  doxygen 1.6.3