QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
|
A widget for storing and interacting with a QgsGeometry object. More...
#include <qgsgeometrywidget.h>
Public Slots | |
void | clearGeometry () |
Clears the current geometry value stored in the widget. | |
void | copyAsGeoJson () |
Copies the current geometry value to the clipboard, as a GeoJSON string. | |
void | copyAsWkt () |
Copies the current geometry value to the clipboard, as a WKT string. | |
void | setReadOnly (bool readOnly) |
Sets whether the widget should be in a read-only state. | |
Signals | |
void | geometryValueChanged (const QgsReferencedGeometry &value) |
Emitted whenever the geometry value of the widget is changed. | |
Public Member Functions | |
QgsGeometryWidget (QWidget *parent=nullptr) | |
Constructor for QgsGeometryWidget, with the specified parent widget. | |
QList< Qgis::WkbType > | acceptedWkbTypes () const |
Returns the list of WKB geometry types which are permitted for the widget. | |
QgsReferencedGeometry | geometryValue () const |
Returns the current geometry value for the widget. | |
bool | isReadOnly () const |
Returns whether the widget is in a read-only state. | |
void | setAcceptedWkbTypes (const QList< Qgis::WkbType > &types) |
Sets the list of WKB geometry types which are permitted for the widget. | |
void | setGeometryValue (const QgsReferencedGeometry &geometry) |
Sets the current geometry value for the widget. | |
Properties | |
QgsReferencedGeometry | geometryValue |
A widget for storing and interacting with a QgsGeometry object.
This widget can be used in places where an dialog needs to expose a geometry value to users, and allow them to safely interact with it (such as changing the stored geometry value).
Definition at line 42 of file qgsgeometrywidget.h.
|
explicit |
Constructor for QgsGeometryWidget, with the specified parent widget.
Definition at line 29 of file qgsgeometrywidget.cpp.
QList< Qgis::WkbType > QgsGeometryWidget::acceptedWkbTypes | ( | ) | const |
Returns the list of WKB geometry types which are permitted for the widget.
Definition at line 121 of file qgsgeometrywidget.cpp.
|
slot |
Clears the current geometry value stored in the widget.
Definition at line 136 of file qgsgeometrywidget.cpp.
|
slot |
Copies the current geometry value to the clipboard, as a GeoJSON string.
Definition at line 152 of file qgsgeometrywidget.cpp.
|
slot |
Copies the current geometry value to the clipboard, as a WKT string.
Definition at line 144 of file qgsgeometrywidget.cpp.
QgsReferencedGeometry QgsGeometryWidget::geometryValue | ( | ) | const |
Returns the current geometry value for the widget.
Definition at line 111 of file qgsgeometrywidget.cpp.
|
signal |
Emitted whenever the geometry value of the widget is changed.
bool QgsGeometryWidget::isReadOnly | ( | ) | const |
Returns whether the widget is in a read-only state.
Definition at line 126 of file qgsgeometrywidget.cpp.
void QgsGeometryWidget::setAcceptedWkbTypes | ( | const QList< Qgis::WkbType > & | types | ) |
Sets the list of WKB geometry types which are permitted for the widget.
Definition at line 116 of file qgsgeometrywidget.cpp.
void QgsGeometryWidget::setGeometryValue | ( | const QgsReferencedGeometry & | geometry | ) |
Sets the current geometry value for the widget.
Definition at line 96 of file qgsgeometrywidget.cpp.
|
slot |
Sets whether the widget should be in a read-only state.
Definition at line 131 of file qgsgeometrywidget.cpp.
|
readwrite |
Definition at line 46 of file qgsgeometrywidget.h.