Eneboo - Documentación para desarrolladores
|
The QwtDoublePoint class defines a point in double coordinates. Más...
#include <qwt_double_rect.h>
Métodos públicos | |
QwtDoublePoint () | |
QwtDoublePoint (double x, double y) | |
Constructs a point with coordinates specified by x and y. | |
QwtDoublePoint (const QPoint &) | |
QPoint | toPoint () const |
bool | isNull () const |
double | x () const |
Returns the x-coordinate of the point. | |
double | y () const |
Returns the y-coordinate of the point. | |
double & | rx () |
Returns a reference to the x-coordinate of the point. | |
double & | ry () |
Returns a reference to the y-coordinate of the point. | |
void | setX (double x) |
Sets the x-coordinate of the point to the value specified by x. | |
void | setY (double y) |
Sets the y-coordinate of the point to the value specified by y. | |
bool | operator== (const QwtDoublePoint &) const |
bool | operator!= (const QwtDoublePoint &) const |
Returns true if point1 is not equal to point2; otherwise returns false. | |
const QwtDoublePoint | operator- () const |
const QwtDoublePoint | operator+ (const QwtDoublePoint &) const |
const QwtDoublePoint | operator- (const QwtDoublePoint &) const |
const QwtDoublePoint | operator* (double) const |
const QwtDoublePoint | operator/ (double) const |
QwtDoublePoint & | operator+= (const QwtDoublePoint &) |
QwtDoublePoint & | operator-= (const QwtDoublePoint &) |
QwtDoublePoint & | operator*= (double) |
QwtDoublePoint & | operator/= (double) |
The QwtDoublePoint class defines a point in double coordinates.
QwtDoublePoint::QwtDoublePoint | ( | ) |
Constructs a null point.
QwtDoublePoint::QwtDoublePoint | ( | double | x, |
double | y | ||
) |
Constructs a point with coordinates specified by x and y.
QwtDoublePoint::QwtDoublePoint | ( | const QPoint & | p | ) |
Copy constructor.
Constructs a point using the values of the point specified.
bool QwtDoublePoint::isNull | ( | ) | const [inline] |
Returns true if the point is null; otherwise returns false.
A point is considered to be null if both the x- and y-coordinates are equal to zero.
bool QwtDoublePoint::operator!= | ( | const QwtDoublePoint & | other | ) | const |
Returns true if point1 is not equal to point2; otherwise returns false.
const QwtDoublePoint QwtDoublePoint::operator* | ( | double | factor | ) | const |
Multiplies the coordinates of the point by the given scale factor, and returns a point with the new coordinates. (Scalar multiplication of a vector.)
QwtDoublePoint & QwtDoublePoint::operator*= | ( | double | factor | ) |
Multiplies the coordinates of this point by the given scale factor, and returns a reference to this point with the new coordinates. This is equivalent to scalar multiplication of a vector.
const QwtDoublePoint QwtDoublePoint::operator+ | ( | const QwtDoublePoint & | other | ) | const |
Adds the coordinates of the point to the corresponding coordinates of the other point, and returns a point with the new coordinates. (Vector addition.)
QwtDoublePoint & QwtDoublePoint::operator+= | ( | const QwtDoublePoint & | other | ) |
Adds the coordinates of this point to the corresponding coordinates of the other point, and returns a reference to this point with the new coordinates. This is equivalent to vector addition.
const QwtDoublePoint QwtDoublePoint::operator- | ( | ) | const |
Negates the coordinates of the point, and returns a point with the new coordinates. (Inversion).
const QwtDoublePoint QwtDoublePoint::operator- | ( | const QwtDoublePoint & | other | ) | const |
Subtracts the coordinates of the other point from the corresponding coordinates of the given point, and returns a point with the new coordinates. (Vector subtraction.)
QwtDoublePoint & QwtDoublePoint::operator-= | ( | const QwtDoublePoint & | other | ) |
Subtracts the coordinates of the other point from the corresponding coordinates of this point, and returns a reference to this point with the new coordinates. This is equivalent to vector subtraction.
const QwtDoublePoint QwtDoublePoint::operator/ | ( | double | factor | ) | const |
Divides the coordinates of the point by the given scale factor, and returns a point with the new coordinates. (Scalar division of a vector.)
QwtDoublePoint & QwtDoublePoint::operator/= | ( | double | factor | ) |
Divides the coordinates of this point by the given scale factor, and returns a references to this point with the new coordinates. This is equivalent to scalar division of a vector.
bool QwtDoublePoint::operator== | ( | const QwtDoublePoint & | other | ) | const |
Returns true if point1 is equal to point2; otherwise returns false.
Two points are equal to each other if both x-coordinates and both y-coordinates are the same.
double & QwtDoublePoint::rx | ( | ) | [inline] |
Returns a reference to the x-coordinate of the point.
double & QwtDoublePoint::ry | ( | ) | [inline] |
Returns a reference to the y-coordinate of the point.
void QwtDoublePoint::setX | ( | double | x | ) | [inline] |
Sets the x-coordinate of the point to the value specified by x.
void QwtDoublePoint::setY | ( | double | y | ) | [inline] |
Sets the y-coordinate of the point to the value specified by y.
QPoint QwtDoublePoint::toPoint | ( | ) | const [inline] |
Rounds the coordinates of this point to the nearest integer and returns a QPoint with these rounded coordinates.
double QwtDoublePoint::x | ( | ) | const [inline] |
Returns the x-coordinate of the point.
double QwtDoublePoint::y | ( | ) | const [inline] |
Returns the y-coordinate of the point.