31#include "moc_qgsgeometrywidgetwrapper.cpp"
36 Q_UNUSED( messageBar )
49 return QVariant::fromValue( geomValue );
55 mWidget->setReadOnly( !enabled );
61 widget->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Minimum );
67 mWidget = qobject_cast<QgsGeometryWidget *>( editor );
80void QgsGeometryWidgetWrapper::updateValues(
const QVariant &value,
const QVariantList & )
85 if (
value.userType() == qMetaTypeId<QgsReferencedGeometry>() )
89 else if (
value.userType() == qMetaTypeId<QgsGeometry>() )
91 geom = QgsReferencedGeometry(
value.value<QgsGeometry>(), QgsCoordinateReferenceSystem() );
97 mWidget->setGeometryValue( geom );
A bar for displaying non-blocking messages to the user.
A QgsGeometry with associated coordinate reference system.
static bool isNull(const QVariant &variant, bool silenceNullWarnings=false)
Returns true if the specified variant should be considered a NULL value.
static QVariant createNullVariant(QMetaType::Type metaType)
Helper method to properly create a null QVariant from a metaType Returns the created QVariant.
Represents a vector layer which manages a vector based dataset.