Wrapper around QRect allowing us to handle percentage and other relative values for areas in mythui. More...
#include <mythrect.h>
Public Member Functions | |
| MythRect () | |
| MythRect (int x, int y, int width, int height) | |
| MythRect (const QString &sX, const QString &sY, const QString &sWidth, const QString &sHeight) | |
| MythRect (QRect rect) | |
| bool | operator== (const MythRect &other) const |
| void | Init (void) |
| void | Reset (void) |
| void | CalculateArea (const MythRect &parentArea) |
| void | NormRect (void) |
| void | setRect (const QString &sX, const QString &sY, const QString &sWidth, const QString &sHeight) |
| void | setRect (int X, int Y, int w, int h) |
| void | setX (const QString &sX) |
| void | setX (int X) |
| void | setY (const QString &sY) |
| void | setY (int Y) |
| void | setWidth (const QString &sWidth) |
| void | setWidth (int width) |
| void | setHeight (const QString &sHeight) |
| void | setHeight (int height) |
| QString | getX (void) const |
| QString | getY (void) const |
| QString | getWidth (void) const |
| QString | getHeight (void) const |
| MythPoint | topLeft (void) const |
| void | moveTopLeft (const MythPoint &point) |
| void | moveLeft (const QString &sX) |
| void | moveLeft (int X) |
| void | moveTop (const QString &sX) |
| void | moveTop (int Y) |
| QString | toString (bool details=false) const |
| QRect | toQRect (void) const |
Private Member Functions | |
| bool | parsePosition (float &percent, int &offset, int &absolute, const QString &value, bool is_size) |
| parse the position | |
Private Attributes | |
| float | m_percentWidth |
| float | m_percentHeight |
| float | m_percentX |
| float | m_percentY |
| int | m_offsetWidth |
| int | m_offsetHeight |
| int | m_offsetX |
| int | m_offsetY |
| bool | m_needsUpdate |
| QRect | m_parentArea |
Wrapper around QRect allowing us to handle percentage and other relative values for areas in mythui.
Definition at line 17 of file mythrect.h.
| MythRect::MythRect | ( | ) |
Definition at line 7 of file mythrect.cpp.
| MythRect::MythRect | ( | int | x, | |
| int | y, | |||
| int | width, | |||
| int | height | |||
| ) |
Definition at line 13 of file mythrect.cpp.
| MythRect::MythRect | ( | const QString & | sX, | |
| const QString & | sY, | |||
| const QString & | sWidth, | |||
| const QString & | sHeight | |||
| ) |
Definition at line 19 of file mythrect.cpp.
| MythRect::MythRect | ( | QRect | rect | ) |
Definition at line 27 of file mythrect.cpp.
Definition at line 33 of file mythrect.cpp.
| void MythRect::Init | ( | void | ) |
Definition at line 46 of file mythrect.cpp.
Referenced by MythRect().
| void MythRect::Reset | ( | void | ) |
Definition at line 53 of file mythrect.cpp.
Referenced by MythUIStateType::RecalculateArea().
| void MythRect::CalculateArea | ( | const MythRect & | parentArea | ) |
Definition at line 58 of file mythrect.cpp.
Referenced by MythUIStateType::AddObject(), MythUIShape::DrawSelf(), MythUIImage::DrawSelf(), MythUIButtonList::Init(), MythUIType::RecalculateArea(), MythUIStateType::RecalculateArea(), and MythUIButtonList::SetButtonArea().
| void MythRect::NormRect | ( | void | ) |
Definition at line 91 of file mythrect.cpp.
Referenced by XMLParseBase::parseRect().
| void MythRect::setRect | ( | const QString & | sX, | |
| const QString & | sY, | |||
| const QString & | sWidth, | |||
| const QString & | sHeight | |||
| ) |
Definition at line 118 of file mythrect.cpp.
Referenced by CalculateArea(), MythUIText::FillCutMessage(), MythRect(), and MythUIType::SetMinAreaParent().
| void MythRect::setRect | ( | int | X, | |
| int | Y, | |||
| int | w, | |||
| int | h | |||
| ) | [inline] |
Definition at line 36 of file mythrect.h.
| void MythRect::setX | ( | const QString & | sX | ) |
Definition at line 179 of file mythrect.cpp.
Referenced by MythUIText::CursorPosition(), MythUIText::FillCutMessage(), and setRect().
| void MythRect::setX | ( | int | X | ) | [inline] |
Definition at line 38 of file mythrect.h.
| void MythRect::setY | ( | const QString & | sY | ) |
Definition at line 189 of file mythrect.cpp.
Referenced by MythUIText::CursorPosition(), MythUIText::FillCutMessage(), and setRect().
| void MythRect::setY | ( | int | Y | ) | [inline] |
Definition at line 40 of file mythrect.h.
| void MythRect::setWidth | ( | const QString & | sWidth | ) |
Definition at line 199 of file mythrect.cpp.
Referenced by MythUIScrollBar::CalculatePosition(), MythUIText::FillCutMessage(), MythUIText::GetNarrowWidth(), MythUIText::LayoutParagraphs(), NormRect(), MythMainWindow::NormRect(), setRect(), and MythUIType::VanishSibling().
| void MythRect::setWidth | ( | int | width | ) | [inline] |
Definition at line 42 of file mythrect.h.
| void MythRect::setHeight | ( | const QString & | sHeight | ) |
Definition at line 210 of file mythrect.cpp.
Referenced by MythUIScrollBar::CalculatePosition(), MythUIText::FillCutMessage(), MythUIText::Layout(), NormRect(), MythMainWindow::NormRect(), setRect(), and MythUIType::VanishSibling().
| void MythRect::setHeight | ( | int | height | ) | [inline] |
Definition at line 44 of file mythrect.h.
| QString MythRect::getX | ( | void | ) | const |
Definition at line 255 of file mythrect.cpp.
Referenced by topLeft(), and toString().
| QString MythRect::getY | ( | void | ) | const |
Definition at line 271 of file mythrect.cpp.
Referenced by topLeft(), and toString().
| QString MythRect::getWidth | ( | void | ) | const |
Definition at line 287 of file mythrect.cpp.
Referenced by toString().
| QString MythRect::getHeight | ( | void | ) | const |
Definition at line 303 of file mythrect.cpp.
Referenced by toString().
| MythPoint MythRect::topLeft | ( | void | ) | const |
Definition at line 221 of file mythrect.cpp.
Referenced by MythUIText::CursorPosition(), MythUIButtonList::gestureEvent(), MythUIType::GetPosition(), MythUIType::HandleMovementPulse(), MythUIText::SetCanvasPosition(), MythUIType::SetMinAreaParent(), MythUIType::SetPosition(), and MythUIText::SetPosition().
| void MythRect::moveTopLeft | ( | const MythPoint & | point | ) |
Definition at line 229 of file mythrect.cpp.
Referenced by MythUIVirtualKeyboard::Create(), MythUIText::CursorPosition(), MythUIType::HandleMovementPulse(), NormRect(), MythMainWindow::NormRect(), MythUIText::SetCanvasPosition(), MythUIType::SetPosition(), and MythUIText::SetPosition().
| void MythRect::moveLeft | ( | const QString & | sX | ) |
Definition at line 235 of file mythrect.cpp.
Referenced by MythUIText::FillCutMessage(), moveTopLeft(), MythScreenType::ParseElement(), MythUIType::SetMinAreaParent(), MythUIText::ShiftCanvas(), and MythUIType::VanishSibling().
| void MythRect::moveLeft | ( | int | X | ) | [inline] |
Definition at line 54 of file mythrect.h.
| void MythRect::moveTop | ( | const QString & | sX | ) |
Definition at line 245 of file mythrect.cpp.
Referenced by MythUIText::FillCutMessage(), moveTopLeft(), MythScreenType::ParseElement(), MythUIType::SetMinAreaParent(), MythUIText::ShiftCanvas(), and MythUIType::VanishSibling().
| void MythRect::moveTop | ( | int | Y | ) | [inline] |
Definition at line 56 of file mythrect.h.
| QString MythRect::toString | ( | bool | details = false |
) | const |
Definition at line 319 of file mythrect.cpp.
| QRect MythRect::toQRect | ( | void | ) | const |
Definition at line 331 of file mythrect.cpp.
Referenced by CalculateArea(), MythPoint::CalculatePoint(), MythUIType::Draw(), MythUIText::DrawSelf(), MythUISimpleText::DrawSelf(), MythUIShape::DrawSelf(), MythUIImage::DrawSelf(), MythUIType::HandleMovementPulse(), MythUIType::SetArea(), MythUIType::SetChildNeedsRedraw(), MythUIType::SetPosition(), MythUIType::SetRedraw(), and MythUIType::SetSize().
| bool MythRect::parsePosition | ( | float & | percent, | |
| int & | offset, | |||
| int & | absolute, | |||
| const QString & | value, | |||
| bool | is_size | |||
| ) | [private] |
parse the position
Definition at line 132 of file mythrect.cpp.
Referenced by moveLeft(), moveTop(), setHeight(), setWidth(), setX(), and setY().
float MythRect::m_percentWidth [private] |
Definition at line 65 of file mythrect.h.
Referenced by CalculateArea(), getWidth(), Init(), NormRect(), operator==(), and setWidth().
float MythRect::m_percentHeight [private] |
Definition at line 66 of file mythrect.h.
Referenced by CalculateArea(), getHeight(), Init(), NormRect(), operator==(), and setHeight().
float MythRect::m_percentX [private] |
Definition at line 67 of file mythrect.h.
Referenced by CalculateArea(), getX(), Init(), moveLeft(), NormRect(), operator==(), and setX().
float MythRect::m_percentY [private] |
Definition at line 68 of file mythrect.h.
Referenced by CalculateArea(), getY(), Init(), moveTop(), NormRect(), operator==(), and setY().
int MythRect::m_offsetWidth [private] |
Definition at line 69 of file mythrect.h.
Referenced by CalculateArea(), getWidth(), Init(), NormRect(), operator==(), and setWidth().
int MythRect::m_offsetHeight [private] |
Definition at line 70 of file mythrect.h.
Referenced by CalculateArea(), getHeight(), Init(), NormRect(), operator==(), and setHeight().
int MythRect::m_offsetX [private] |
Definition at line 71 of file mythrect.h.
Referenced by CalculateArea(), getX(), Init(), moveLeft(), NormRect(), operator==(), and setX().
int MythRect::m_offsetY [private] |
Definition at line 72 of file mythrect.h.
Referenced by CalculateArea(), getY(), Init(), moveTop(), NormRect(), operator==(), and setY().
bool MythRect::m_needsUpdate [private] |
Definition at line 74 of file mythrect.h.
Referenced by CalculateArea(), Init(), moveLeft(), moveTop(), setHeight(), setWidth(), setX(), and setY().
QRect MythRect::m_parentArea [private] |
Definition at line 76 of file mythrect.h.
Referenced by CalculateArea(), and Reset().
1.6.3