Eneboo - Documentación para desarrolladores
|
#include <qwt_double_rect.h>
Métodos públicos | |
QwtDoubleRect () | |
Constructs an rectangle with all components set to 0.0. | |
QwtDoubleRect (double left, double top, double width, double height) | |
QwtDoubleRect (const QwtDoublePoint &, const QwtDoubleSize &) | |
QwtDoubleRect (const QRect &) | |
QRect | toRect () const |
bool | isNull () const |
bool | isEmpty () const |
bool | isValid () const |
QwtDoubleRect | normalized () const |
double | x () const |
Returns x. | |
double | y () const |
Returns y. | |
double | left () const |
Returns left. | |
double | right () const |
Returns right. | |
double | top () const |
Returns top. | |
double | bottom () const |
Returns bottom. | |
void | setX (double) |
Set left. | |
void | setY (double) |
Set left. | |
void | setLeft (double) |
Set left. | |
void | setRight (double) |
Set right. | |
void | setTop (double) |
Set top. | |
void | setBottom (double) |
Set bottom. | |
QwtDoublePoint | center () const |
Returns the center point of the rectangle. | |
void | moveLeft (double x) |
moves x1() to x, leaving the size unchanged | |
void | moveRight (double x) |
moves x1() to x, leaving the size unchanged | |
void | moveTop (double y) |
moves y1() to y, leaving the size unchanged | |
void | moveBottom (double y) |
moves y1() to y, leaving the size unchanged | |
void | moveTo (double x, double y) |
moves left() to x and top() to y, leaving the size unchanged | |
void | moveTo (const QwtDoublePoint &) |
void | moveBy (double dx, double dy) |
moves x1() by dx and y1() by dy. leaving the size unchanged | |
void | moveCenter (const QwtDoublePoint &) |
moves the center to pos, leaving the size unchanged | |
void | moveCenter (double dx, double dy) |
moves the center to (x, y), leaving the size unchanged | |
void | setRect (double x1, double x2, double width, double height) |
double | width () const |
Returns the width. | |
double | height () const |
Returns the height. | |
QwtDoubleSize | size () const |
Returns the size. | |
void | setWidth (double w) |
Set the width, by right = left + w;. | |
void | setHeight (double h) |
Set the height, by bottom = top + h;. | |
void | setSize (const QwtDoubleSize &) |
QwtDoubleRect | operator| (const QwtDoubleRect &r) const |
QwtDoubleRect | operator& (const QwtDoubleRect &r) const |
QwtDoubleRect & | operator|= (const QwtDoubleRect &r) |
Unites this rectangle with rectangle other. | |
QwtDoubleRect & | operator&= (const QwtDoubleRect &r) |
Intersects this rectangle with rectangle other. | |
bool | operator== (const QwtDoubleRect &) const |
Returns true if this rect and other are equal; otherwise returns false. | |
bool | operator!= (const QwtDoubleRect &) const |
Returns true if this rect and other are different; otherwise returns false. | |
bool | contains (const QwtDoublePoint &p, bool proper=false) const |
bool | contains (double x, double y, bool proper=false) const |
bool | contains (const QwtDoubleRect &r, bool proper=false) const |
QwtDoubleRect | unite (const QwtDoubleRect &) const |
QwtDoubleRect | intersect (const QwtDoubleRect &) const |
bool | intersects (const QwtDoubleRect &) const |
QwtDoublePoint | bottomRight () const |
QwtDoublePoint | topRight () const |
QwtDoublePoint | topLeft () const |
QwtDoublePoint | bottomLeft () const |
The QwtDoubleRect class defines a size in double coordinates.
QwtDoubleRect::QwtDoubleRect | ( | ) |
Constructs an rectangle with all components set to 0.0.
QwtDoubleRect::QwtDoubleRect | ( | double | left, |
double | top, | ||
double | width, | ||
double | height | ||
) |
Constructs an rectangle with x1 to x2 as x-range and, y1 to y2 as y-range.
QwtDoubleRect::QwtDoubleRect | ( | const QwtDoublePoint & | p, |
const QwtDoubleSize & | size | ||
) |
Constructs a rectangle with topLeft as the top-left corner and size as the rectangle size.
QwtDoubleRect::QwtDoubleRect | ( | const QRect & | rect | ) |
double QwtDoubleRect::bottom | ( | ) | const [inline] |
Returns bottom.
QwtDoublePoint QwtDoubleRect::bottomLeft | ( | ) | const [inline] |
QwtDoublePoint QwtDoubleRect::bottomRight | ( | ) | const [inline] |
QwtDoublePoint QwtDoubleRect::center | ( | ) | const |
Returns the center point of the rectangle.
Returns true if the point (x, y) is inside or on the edge of the rectangle; otherwise returns false.
If proper is true, this function returns true only if p is inside (not on the edge).
bool QwtDoubleRect::contains | ( | const QwtDoubleRect & | other, |
bool | proper = false |
||
) | const |
Returns true if the rectangle other is inside this rectangle; otherwise returns false.
If proper is true, this function returns true only if other is entirely inside (not on the edge).
bool QwtDoubleRect::contains | ( | const QwtDoublePoint & | p, |
bool | proper = false |
||
) | const |
Returns true if the point p is inside or on the edge of the rectangle; otherwise returns false.
If proper is true, this function returns true only if p is inside (not on the edge).
double QwtDoubleRect::height | ( | ) | const [inline] |
Returns the height.
QwtDoubleRect QwtDoubleRect::intersect | ( | const QwtDoubleRect & | other | ) | const |
Returns the intersection of this rectangle and rectangle other. r.intersect(s) is equivalent to r&s.
bool QwtDoubleRect::intersects | ( | const QwtDoubleRect & | other | ) | const |
Returns true if this rectangle intersects with rectangle other; otherwise returns false.
bool QwtDoubleRect::isEmpty | ( | void | ) | const [inline] |
Returns true if the rectangle is empty; otherwise returns false. An empty rectangle has a width() <= 0 or height() <= 0. An empty rectangle is not valid. isEmpty() == !isValid()
bool QwtDoubleRect::isNull | ( | ) | const [inline] |
Returns true if the rectangle is a null rectangle; otherwise returns false. A null rectangle has both the width and the height set to 0. A null rectangle is also empty and invalid.
bool QwtDoubleRect::isValid | ( | void | ) | const [inline] |
double QwtDoubleRect::left | ( | ) | const [inline] |
Returns left.
void QwtDoubleRect::moveBottom | ( | double | y | ) |
moves y1() to y, leaving the size unchanged
void QwtDoubleRect::moveBy | ( | double | dx, |
double | dy | ||
) |
moves x1() by dx and y1() by dy. leaving the size unchanged
void QwtDoubleRect::moveCenter | ( | const QwtDoublePoint & | pos | ) |
moves the center to pos, leaving the size unchanged
void QwtDoubleRect::moveCenter | ( | double | dx, |
double | dy | ||
) |
moves the center to (x, y), leaving the size unchanged
void QwtDoubleRect::moveLeft | ( | double | x | ) |
moves x1() to x, leaving the size unchanged
void QwtDoubleRect::moveRight | ( | double | x | ) |
moves x1() to x, leaving the size unchanged
void QwtDoubleRect::moveTo | ( | double | x, |
double | y | ||
) |
void QwtDoubleRect::moveTo | ( | const QwtDoublePoint & | p | ) | [inline] |
Moves the top left corner of the rectangle to p, without changing the rectangles size.
void QwtDoubleRect::moveTop | ( | double | y | ) |
moves y1() to y, leaving the size unchanged
QwtDoubleRect QwtDoubleRect::normalized | ( | ) | const |
Returns a normalized rectangle, i.e. a rectangle that has a non-negative width and height.
It swaps x1 and x2 if x1() > x2(), and swaps y1 and y2 if y1() > y2().
bool QwtDoubleRect::operator!= | ( | const QwtDoubleRect & | other | ) | const |
Returns true if this rect and other are different; otherwise returns false.
QwtDoubleRect QwtDoubleRect::operator& | ( | const QwtDoubleRect & | other | ) | const |
Returns the intersection of this rectangle and rectangle other. Returns an empty rectangle if there is no intersection.
QwtDoubleRect & QwtDoubleRect::operator&= | ( | const QwtDoubleRect & | r | ) |
Intersects this rectangle with rectangle other.
bool QwtDoubleRect::operator== | ( | const QwtDoubleRect & | other | ) | const |
Returns true if this rect and other are equal; otherwise returns false.
QwtDoubleRect QwtDoubleRect::operator| | ( | const QwtDoubleRect & | other | ) | const |
Returns the bounding rectangle of this rectangle and rectangle other. The bounding rectangle of a nonempty rectangle and an empty or invalid rectangle is defined to be the nonempty rectangle.
QwtDoubleRect & QwtDoubleRect::operator|= | ( | const QwtDoubleRect & | r | ) |
Unites this rectangle with rectangle other.
double QwtDoubleRect::right | ( | ) | const [inline] |
Returns right.
void QwtDoubleRect::setBottom | ( | double | y | ) | [inline] |
Set bottom.
void QwtDoubleRect::setHeight | ( | double | h | ) | [inline] |
Set the height, by bottom = top + h;.
void QwtDoubleRect::setLeft | ( | double | x | ) | [inline] |
Set left.
void QwtDoubleRect::setRect | ( | double | left, |
double | top, | ||
double | width, | ||
double | height | ||
) |
Set the x-range from x1 to x2 and the y-range from y1 to y2.
void QwtDoubleRect::setRight | ( | double | x | ) | [inline] |
Set right.
void QwtDoubleRect::setSize | ( | const QwtDoubleSize & | size | ) |
Sets the size of the rectangle to size. Changes x2 and y2 only.
void QwtDoubleRect::setTop | ( | double | y | ) | [inline] |
Set top.
void QwtDoubleRect::setWidth | ( | double | w | ) | [inline] |
Set the width, by right = left + w;.
void QwtDoubleRect::setX | ( | double | x | ) | [inline] |
Set left.
void QwtDoubleRect::setY | ( | double | y | ) | [inline] |
Set left.
QwtDoubleSize QwtDoubleRect::size | ( | ) | const [inline] |
Returns the size.
double QwtDoubleRect::top | ( | void | ) | const [inline] |
Returns top.
QwtDoublePoint QwtDoubleRect::topLeft | ( | ) | const [inline] |
QwtDoublePoint QwtDoubleRect::topRight | ( | ) | const [inline] |
QRect QwtDoubleRect::toRect | ( | ) | const |
QwtDoubleRect QwtDoubleRect::unite | ( | const QwtDoubleRect & | other | ) | const |
Returns the bounding rectangle of this rectangle and rectangle other. r.unite(s) is equivalent to r|s.
double QwtDoubleRect::width | ( | ) | const [inline] |
Returns the width.
double QwtDoubleRect::x | ( | ) | const [inline] |
Returns x.
double QwtDoubleRect::y | ( | ) | const [inline] |
Returns y.