PythonQt.Qt.QPolygon
QPolygon
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
A QPolygon object is a QVector\<QPoint>. The easiest way to add points to a QPolygon is to use QVector's streaming operator, as illustrated below:
QPolygon polygon;
polygon << QPoint(10, 20) << QPoint(20, 30);
In addition to the functions provided by QVector, QPolygon provides some point-specific functions.
Each point in a polygon can be retrieved by passing its index to the point() function. To populate the polygon, QPolygon provides the setPoint() function to set the point at a given index, the setPoints() function to set all the points in the polygon (resizing it to the given number of points), and the putPoints() function which copies a number of given points into the polygon from a specified index (resizing the polygon if necessary).
QPolygon provides the boundingRect() and translate() functions for geometry functions. Use the QTransform::map() function for more general transformations of QPolygons.
The QPolygon class is implicitly shared.
Source: https://doc.qt.io/archives/qt-5.15/qpolygon.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 |
|---|---|---|---|
__init__ |
function | (self, *args: Any, **kwargs: Any) -> None |
Native constructor; consult class documentation for supported overloads. (shared captured text) |
append |
function | (self, t: Any) -> None |
(shared captured text) |
at |
function | (self, i: int) -> Any |
X.at(i) -> PythonQt.QtCore.QPoint (shared captured text) |
boundingRect |
function | (self) -> Any |
X.boundingRect() -> PythonQt.QtCore.QRect (shared captured text) |
capacity |
function | (self) -> int |
X.capacity() -> int (shared captured text) |
className |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the classname of the object (shared captured text) |
clear |
function | (self) -> None |
(shared captured text) |
constFirst |
function | (self) -> Any |
X.constFirst() -> PythonQt.QtCore.QPoint (shared captured text) |
constLast |
function | (self) -> Any |
X.constLast() -> PythonQt.QtCore.QPoint (shared captured text) |
contains |
function | (self, t: Any) -> bool |
X.contains(t) -> bool (shared captured text) |
containsPoint |
function | (self, pt: Any, fillRule: Any) -> bool |
X.containsPoint(pt, fillRule) -> bool (shared captured text) |
count |
function | (self, t: Any) -> int |
X.count(t) -> int (shared captured text) |
delete |
function | (self, *args: Any, **kwargs: Any) -> Any |
Deletes the C++ object (at your own risk, my friend!) (shared captured text) |
empty |
function | (self) -> bool |
X.empty() -> bool (shared captured text) |
endsWith |
function | (self, t: Any) -> bool |
X.endsWith(t) -> bool (shared captured text) |
fill |
function | (self, t: Any, size: int) -> tuple |
X.fill(t, size) -> tuple (shared captured text) |
first |
function | (self) -> Any |
X.first() -> PythonQt.QtCore.QPoint (shared captured text) |
fromList |
function | (self, list: Any) -> tuple |
X.fromList(list) -> tuple (shared captured text) |
help |
function | (self, *args: Any, **kwargs: Any) -> Any |
Shows the help of available methods for this class (shared captured text) |
indexOf |
function | (self, *args: Any, **kwargs: Any) -> int |
X.indexOf(t, from) -> int (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) |
intersected |
function | (self, r: Any) -> Any |
X.intersected(r) -> PythonQt.QtGui.QPolygon (shared captured text) |
isEmpty |
function | (self) -> bool |
X.isEmpty() -> bool (shared captured text) |
isSharedWith |
function | (self, other: Any) -> bool |
X.isSharedWith(other) -> bool (shared captured text) |
last |
function | (self) -> Any |
X.last() -> PythonQt.QtCore.QPoint (shared captured text) |
lastIndexOf |
function | (self, *args: Any, **kwargs: Any) -> int |
X.lastIndexOf(t, from) -> int (shared captured text) |
length |
function | (self) -> int |
X.length() -> int (shared captured text) |
mid |
function | (self, pos: int, len: int) -> tuple |
X.mid(pos, len) -> tuple (shared captured text) |
move |
function | (self, *args: Any, **kwargs: Any) -> None |
X.move(from, to) (shared captured text) |
operator_assign |
function | (self, other: Any) -> Any |
X.operator_assign(other) -> PythonQt.QtGui.QPolygon (shared captured text) |
pop_back |
function | (self) -> None |
(shared captured text) |
pop_front |
function | (self) -> None |
(shared captured text) |
prepend |
function | (self, t: Any) -> None |
(shared captured text) |
push_back |
function | (self, t: Any) -> None |
(shared captured text) |
push_front |
function | (self, t: Any) -> None |
(shared captured text) |
readFrom |
function | (self, stream: Any) -> Any |
(shared captured text) |
remove |
function | (self, i: int, n: Any) -> None |
X.remove(i, n) (shared captured text) |
removeAll |
function | (self, t: Any) -> int |
X.removeAll(t) -> int (shared captured text) |
removeAt |
function | (self, i: int) -> None |
(shared captured text) |
removeFirst |
function | (self) -> None |
(shared captured text) |
removeLast |
function | (self) -> None |
(shared captured text) |
removeOne |
function | (self, t: Any) -> bool |
X.removeOne(t) -> bool (shared captured text) |
replace |
function | (self, i: int, t: Any) -> None |
X.replace(i, t) (shared captured text) |
reserve |
function | (self, size: int) -> None |
(shared captured text) |
resize |
function | (self, size: int) -> None |
(shared captured text) |
setSharable |
function | (self, sharable: bool) -> None |
(shared captured text) |
size |
function | (self) -> int |
X.size() -> int (shared captured text) |
squeeze |
function | (self) -> None |
(shared captured text) |
startsWith |
function | (self, t: Any) -> bool |
X.startsWith(t) -> bool (shared captured text) |
subtracted |
function | (self, r: Any) -> Any |
X.subtracted(r) -> PythonQt.QtGui.QPolygon (shared captured text) |
swap |
function | (self, other: Any) -> None |
Swaps polygon other with this polygon. (shared captured text) |
takeAt |
function | (self, i: int) -> Any |
X.takeAt(i) -> PythonQt.QtCore.QPoint (shared captured text) |
takeFirst |
function | (self) -> Any |
X.takeFirst() -> PythonQt.QtCore.QPoint (shared captured text) |
takeLast |
function | (self) -> Any |
X.takeLast() -> PythonQt.QtCore.QPoint (shared captured text) |
toList |
function | (self) -> tuple |
X.toList() -> tuple (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.QtGui.QPolygon (shared captured text) |
united |
function | (self, r: Any) -> Any |
X.united(r) -> PythonQt.QtGui.QPolygon (shared captured text) |
value |
function | (self, i: int, defaultValue: Any) -> Any |
X.value(i, defaultValue) -> PythonQt.QtCore.QPoint (shared captured text) |
writeTo |
function | (self, stream: Any) -> Any |
(shared captured text) |