QLine Class Reference
|
The positions of the line's start and end points can be retrieved using the p1(), x1(), y1(), p2(), x2(), and y2() functions. The dx() and dy() functions return the horizontal and vertical components of the line. Use isNull() to determine whether the QLine represents a valid line or a null line.
Finally, the line can be translated a given offset using the translate() function.
See also QLineF, QPolygon, and QRect.
Constructs a null line.
Constructs a line object that represents the line between p1 and p2.
Constructs a line object that represents the line between (x1, y1) and (x2, y2).
Returns the line's start point.
See also x1(), y1(), and p2().
Returns the line's end point.
See also x2(), y2(), and p1().
Returns the x-coordinate of the line's start point.
See also p1().
Returns the x-coordinate of the line's end point.
See also p2().
Returns the y-coordinate of the line's start point.
See also p1().
Returns the y-coordinate of the line's end point.
See also p2().
Returns the horizontal component of the line's vector.
See also dy().
Returns the vertical component of the line's vector.
See also dx().
Returns true if the line is not set up with valid start and end point; otherwise returns false.
Translates this line by the given offset.
Это перегруженная функция, предоставленная для удобства.
Translates this line the distance specified by dx and dy.
Returns true if the given line is not the same as this line.
A line is different from another line if any of their start or end points differ, or the internal order of the points is different.
Returns true if the given line is the same as this line.
A line is identical to another line if the start and end points are identical, and the internal order of the points is the same.
Это перегруженная функция, предоставленная для удобства.
Writes the given line to the given stream and returns a reference to the stream.
Смотрите также Формат операторов QDataStream.
Это перегруженная функция, предоставленная для удобства.
Reads a line from the given stream into the given line and returns a reference to the stream.
Смотрите также Формат операторов QDataStream.
Copyright © 2008 Trolltech | Торговые марки | Qt 4.3.5 |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |