1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsgeometrywidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsGeometryWidget : QWidget
{
%Docstring(signature="appended")
A widget for storing and interacting with a :py:class:`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).
.. versionadded:: 3.30
%End
%TypeHeaderCode
#include "qgsgeometrywidget.h"
%End
public:
explicit QgsGeometryWidget( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsGeometryWidget, with the specified ``parent`` widget.
%End
void setGeometryValue( const QgsReferencedGeometry &geometry );
%Docstring
Sets the current ``geometry`` value for the widget.
.. warning::
This should not be confused with QWidget.setGeometry(), which
modifies the placement and size of the widget itself.
.. seealso:: :py:func:`geometryValue`
.. seealso:: :py:func:`geometryValueChanged`
%End
QgsReferencedGeometry geometryValue() const;
%Docstring
Returns the current geometry value for the widget.
.. warning::
This should not be confused with QWidget.geometry(), which
returns the placement and size of the widget itself.
.. seealso:: :py:func:`setGeometryValue`
.. seealso:: :py:func:`geometryValueChanged`
%End
void setAcceptedWkbTypes( const QList<Qgis::WkbType> &types );
%Docstring
Sets the list of WKB geometry ``types`` which are permitted for the
widget.
.. seealso:: :py:func:`acceptedWkbTypes`
%End
QList<Qgis::WkbType> acceptedWkbTypes() const;
%Docstring
Returns the list of WKB geometry types which are permitted for the
widget.
.. seealso:: :py:func:`setAcceptedWkbTypes`
%End
bool isReadOnly() const;
%Docstring
Returns whether the widget is in a read-only state.
.. seealso:: :py:func:`setReadOnly`
%End
public slots:
void setReadOnly( bool readOnly );
%Docstring
Sets whether the widget should be in a read-only state.
.. seealso:: :py:func:`isReadOnly`
%End
void clearGeometry();
%Docstring
Clears the current geometry value stored in the widget.
%End
void copyAsWkt();
%Docstring
Copies the current geometry value to the clipboard, as a WKT string.
.. seealso:: :py:func:`copyAsGeoJson`
%End
void copyAsGeoJson();
%Docstring
Copies the current geometry value to the clipboard, as a GeoJSON string.
.. seealso:: :py:func:`copyAsWkt`
%End
signals:
void geometryValueChanged( const QgsReferencedGeometry &value );
%Docstring
Emitted whenever the geometry value of the widget is changed.
.. seealso:: :py:func:`geometryValue`
.. seealso:: :py:func:`setGeometryValue`
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsgeometrywidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|