QGIS API Documentation 3.41.0-Master (181b2f43d8e)
|
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 30 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 122 of file qgsgeometrywidget.cpp.
|
slot |
Clears the current geometry value stored in the widget.
Definition at line 137 of file qgsgeometrywidget.cpp.
|
slot |
Copies the current geometry value to the clipboard, as a GeoJSON string.
Definition at line 153 of file qgsgeometrywidget.cpp.
|
slot |
Copies the current geometry value to the clipboard, as a WKT string.
Definition at line 145 of file qgsgeometrywidget.cpp.
QgsReferencedGeometry QgsGeometryWidget::geometryValue | ( | ) | const |
Returns the current geometry value for the widget.
Definition at line 112 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 127 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 117 of file qgsgeometrywidget.cpp.
void QgsGeometryWidget::setGeometryValue | ( | const QgsReferencedGeometry & | geometry | ) |
Sets the current geometry value for the widget.
Definition at line 97 of file qgsgeometrywidget.cpp.
|
slot |
Sets whether the widget should be in a read-only state.
Definition at line 132 of file qgsgeometrywidget.cpp.
|
readwrite |
Definition at line 46 of file qgsgeometrywidget.h.