My Project
Public Member Functions | Friends | List of all members
ParaEngine::QRectF Class Reference

Public Member Functions

 QRectF (const QPointF &topleft, const QSizeF &size)
 
 QRectF (const QPointF &topleft, const QPointF &bottomRight)
 
 QRectF (float left, float top, float width, float height)
 
 QRectF (const QRect &rect)
 
 QRectF (const RECT &r)
 
 operator RECT () const
 
bool isNull () const
 
bool isEmpty () const
 
bool isValid () const
 
QRectF normalized () const
 
float left () const
 
float top () const
 
float right () const
 
float bottom () const
 
float x () const
 
float y () const
 
void setLeft (float pos)
 
void setTop (float pos)
 
void setRight (float pos)
 
void setBottom (float pos)
 
void setX (float pos)
 
void setY (float pos)
 
QPointF topLeft () const
 
QPointF bottomRight () const
 
QPointF topRight () const
 
QPointF bottomLeft () const
 
QPointF center () const
 
void setTopLeft (const QPointF &p)
 
void setBottomRight (const QPointF &p)
 
void setTopRight (const QPointF &p)
 
void setBottomLeft (const QPointF &p)
 
void moveLeft (float pos)
 
void moveTop (float pos)
 
void moveRight (float pos)
 
void moveBottom (float pos)
 
void moveTopLeft (const QPointF &p)
 
void moveBottomRight (const QPointF &p)
 
void moveTopRight (const QPointF &p)
 
void moveBottomLeft (const QPointF &p)
 
void moveCenter (const QPointF &p)
 
void translate (float dx, float dy)
 
void translate (const QPointF &p)
 
QRectF translated (float dx, float dy) const
 
QRectF translated (const QPointF &p) const
 
void moveTo (float x, float y)
 
void moveTo (const QPointF &p)
 
void setRect (float x, float y, float w, float h)
 
void getRect (float *x, float *y, float *w, float *h) const
 
void setCoords (float x1, float y1, float x2, float y2)
 
void getCoords (float *x1, float *y1, float *x2, float *y2) const
 
void adjust (float x1, float y1, float x2, float y2)
 
QRectF adjusted (float x1, float y1, float x2, float y2) const
 
QSizeF size () const
 
float width () const
 
float height () const
 
void setWidth (float w)
 
void setHeight (float h)
 
void setSize (const QSizeF &s)
 
QRectF operator| (const QRectF &r) const
 
QRectF operator & (const QRectF &r) const
 
QRectFoperator|= (const QRectF &r)
 
QRectFoperator &= (const QRectF &r)
 
bool contains (const QRectF &r) const
 
bool contains (const QPointF &p) const
 
bool contains (float x, float y) const
 
QRectF united (const QRectF &other) const
 
QRectF intersected (const QRectF &other) const
 
bool intersects (const QRectF &r) const
 
QRectF marginsAdded (const QMarginsF &margins) const
 
QRectF marginsRemoved (const QMarginsF &margins) const
 
QRectFoperator+= (const QMarginsF &margins)
 
QRectFoperator-= (const QMarginsF &margins)
 
QRect toRect () const
 
QRect toAlignedRect () const
 

Friends

bool operator== (const QRectF &, const QRectF &)
 
bool operator!= (const QRectF &, const QRectF &)
 

Member Function Documentation

§ contains() [1/3]

bool QRectF::contains ( const QRectF rectangle) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns true if the given rectangle is inside this rectangle; otherwise returns false.

§ contains() [2/3]

bool QRectF::contains ( const QPointF point) const

Returns true if the given point is inside or on the edge of the rectangle; otherwise returns false.

See also
intersects()

§ contains() [3/3]

bool ParaEngine::QRectF::contains ( float  x,
float  y 
) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns true if the point (x, y) is inside or on the edge of the rectangle; otherwise returns false.

§ intersects()

bool QRectF::intersects ( const QRectF rectangle) const

Returns true if this rectangle intersects with the given rectangle (i.e. there is a non-empty area of overlap between them), otherwise returns false.

The intersection rectangle can be retrieved using the intersected() function.

See also
contains()

§ operator &()

QRectF QRectF::operator& ( const QRectF rectangle) const

Returns the intersection of this rectangle and the given rectangle. Returns an empty rectangle if there is no intersection.

See also
operator&=(), intersected()

§ operator|()

QRectF QRectF::operator| ( const QRectF rectangle) const

Returns the bounding rectangle of this rectangle and the given rectangle.

See also
united(), operator|=()

The documentation for this class was generated from the following files: