PythonQt.Qt.QLineF
QLineF
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
A QLineF describes a finite length line (or line segment) on a two-dimensional surface. QLineF defines the start and end points of the line using floating point accuracy for coordinates. Use the toLine() function to retrieve an integer based copy of this line.
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, respectively.
The line's length can be retrieved using the length() function, and altered using the setLength() function. Similarly, angle() and setAngle() are respectively used for retrieving and altering the angle of the line. Use the isNull() function to determine whether the QLineF represents a valid line or a null line.
The intersects() function determines the IntersectionType for this line and a given line, while the angleTo() function returns the angle between the lines. In addition, the unitVector() function returns a line that has the same starting point as this line, but with a length of only 1, while the normalVector() function returns a line that is perpendicular to this line with the same starting point and length.
Finally, the line can be translated a given offset using the translate() function, and can be traversed using the pointAt() function.
Constraints
QLine is limited to the minimum and
maximum values for the int type. Operations on a
QLine that could potentially result in
values outside this range will result in undefined behavior.
Source: https://doc.qt.io/archives/qt-5.15/qlinef.html
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
BoundedIntersection |
attribute | Any |
(shared captured text) |
IntersectType |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
NoIntersection |
attribute | Any |
(shared captured text) |
UnboundedIntersection |
attribute | Any |
(shared captured text) |
__init__ |
function | (self, *args: Any, **kwargs: Any) -> None |
Native constructor; consult class documentation for supported overloads. (shared captured text) |
angle |
function | (self, l: Any) -> float |
X.angle(l) -> float (shared captured text) |
angleTo |
function | (self, l: Any) -> float |
X.angleTo(l) -> float (shared captured text) |
className |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the classname of the object (shared captured text) |
delete |
function | (self, *args: Any, **kwargs: Any) -> Any |
Deletes the C++ object (at your own risk, my friend!) (shared captured text) |
dx |
function | (self) -> float |
X.dx() -> float (shared captured text) |
dy |
function | (self) -> float |
X.dy() -> float (shared captured text) |
fromPolar |
function | (self, length: float, angle: float) -> Any |
X.fromPolar(length, angle) -> PythonQt.QtCore.QLineF (shared captured text) |
help |
function | (self, *args: Any, **kwargs: Any) -> Any |
Shows the help of available methods for this class (shared captured text) |
inherits |
function | (self, *args: Any, **kwargs: Any) -> Any |
Returns if the class inherits or is of given type name (shared captured text) |
intersect |
function | (self, l: Any, intersectionPoint: Any) -> Any |
X.intersect(l, intersectionPoint) (shared captured text) |
isNull |
function | (self) -> bool |
X.isNull() -> bool (shared captured text) |
length |
function | (self) -> float |
X.length() -> float (shared captured text) |
normalVector |
function | (self) -> Any |
X.normalVector() -> PythonQt.QtCore.QLineF (shared captured text) |
p1 |
function | (self) -> Any |
X.p1() -> PythonQt.QtCore.QPointF (shared captured text) |
p2 |
function | (self) -> Any |
X.p2() -> PythonQt.QtCore.QPointF (shared captured text) |
pointAt |
function | (self, t: float) -> Any |
X.pointAt(t) -> PythonQt.QtCore.QPointF (shared captured text) |
readFrom |
function | (self, arg__1: Any) -> Any |
(shared captured text) |
setAngle |
function | (self, angle: float) -> None |
Sets the angle of the line to the given angle (in degrees). (shared captured text) |
setLength |
function | (self, len: float) -> None |
Sets the length of the line to the given length. (shared captured text) |
setLine |
function | (self, x1: float, y1: float, x2: float, y2: float) -> None |
X.setLine(x1, y1, x2, y2) (shared captured text) |
setP1 |
function | (self, p1: Any) -> None |
Sets the starting point of this line to p1. (shared captured text) |
setP2 |
function | (self, p2: Any) -> None |
Sets the end point of this line to p2. (shared captured text) |
setPoints |
function | (self, p1: Any, p2: Any) -> None |
X.setPoints(p1, p2) (shared captured text) |
toLine |
function | (self) -> Any |
X.toLine() -> PythonQt.QtCore.QLine (shared captured text) |
translate |
function | (self, dx: Any, dy: Any) -> None |
X.translate(dx, dy) (shared captured text) |
translated |
function | (self, dx: Any, dy: Any) -> Any |
X.translated(dx, dy) -> PythonQt.QtCore.QLineF (shared captured text) |
unitVector |
function | (self) -> Any |
X.unitVector() -> PythonQt.QtCore.QLineF (shared captured text) |
writeTo |
function | (self, arg__1: Any) -> Any |
(shared captured text) |
x1 |
function | (self) -> float |
X.x1() -> float (shared captured text) |
x2 |
function | (self) -> float |
X.x2() -> float (shared captured text) |
y1 |
function | (self) -> float |
X.y1() -> float (shared captured text) |
y2 |
function | (self) -> float |
X.y2() -> float (shared captured text) |