24 #include <QGridLayout>
33 init( vl, thepFeature, context, parent );
35 if ( !showDialogButtons )
46 init( vl, thepFeature, context, parent );
48 if ( !showDialogButtons )
105 return QDialog::Accepted;
113 mDialog->setAttribute( Qt::WA_DeleteOnClose );
117 mDialog->installEventFilter(
this );
128 case QEvent::WindowActivate:
132 case QEvent::WindowDeactivate:
152 mDialog =
new QDialog( parent );
153 mDialog->setWindowTitle(
tr(
"Feature Attributes" ) );
154 mDialog->setLayout(
new QGridLayout() );
155 mDialog->layout()->setMargin( 0 );
158 QDialogButtonBox* buttonBox =
mAttributeForm->findChild<QDialogButtonBox*>();
159 connect( buttonBox, SIGNAL( rejected() ),
mDialog, SLOT( reject() ) );
160 connect( buttonBox, SIGNAL( accepted() ),
mDialog, SLOT(
accept() ) );
int exec()
Show the dialog and block the application until the dialog is closed. Ownership of this object is not...
void restoreGeometry()
Restores the size and position from the last time this dialog box was used.
QgsAttributeForm * mAttributeForm
This class contains context information for attribute editor widgets.
void saveGeometry()
Saves the size and position for the next time this dialog box will be used.
QgsHighlight * mHighlight
void setHighlight(QgsHighlight *h)
setHighlight
QgsAttributeDialog(QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, QgsDistanceArea myDa, QWidget *parent=0, bool showDialogButtons=true)
Create an attribute dialog for a given layer and feature.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
void show()
Show the dialog non-blocking.
A class for highlight features on the map.
void setDistanceArea(const QgsDistanceArea &distanceArea)
QPointer< QDialog > mDialog
General purpose distance and area calculator.
void onDialogFinished(int result)
bool eventFilter(QObject *obj, QEvent *e)
void init(QgsVectorLayer *layer, QgsFeature *feature, QgsAttributeEditorContext &context, QWidget *parent)
Represents a vector layer which manages a vector based data sets.