31 , mOwnedFeature( featureOwner ? thepFeature : 0 )
36 init( vl, thepFeature, context, parent );
38 if ( !showDialogButtons )
45 , mOwnedFeature( featureOwner ? thepFeature : 0 )
47 init( vl, thepFeature, context, parent );
49 if ( !showDialogButtons )
69 QSettings().setValue( mSettingsPath +
"geometry", QDialog::saveGeometry() );
74 QDialog::restoreGeometry( QSettings().value( mSettingsPath +
"geometry" ).toByteArray() );
86 mAttributeForm->
save();
93 setAttribute( Qt::WA_DeleteOnClose );
102 setWindowTitle(
tr(
"%1 - Feature Attributes" ).arg( layer->
name() ) );
103 setLayout(
new QGridLayout() );
104 layout()->setMargin( 0 );
107 layout()->addWidget( mAttributeForm );
108 QDialogButtonBox* buttonBox = mAttributeForm->findChild<QDialogButtonBox*>();
109 connect( buttonBox, SIGNAL( rejected() ),
this, SLOT( reject() ) );
110 connect( buttonBox, SIGNAL( accepted() ),
this, SLOT(
accept() ) );
111 connect( layer, SIGNAL( layerDeleted() ),
this, SLOT( close() ) );
114 if ( menu->actions().size() > 0 )
116 QMenuBar* menuBar =
new QMenuBar(
this );
117 menuBar->addMenu( menu );
118 layout()->setMenuBar( menuBar );
void show(bool autoDelete=true)
Show the dialog non-blocking.
void restoreGeometry()
Restores the size and position from the last time this dialog box was used.
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.
QgsAttributeDialog(QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, const QgsDistanceArea &myDa, QWidget *parent=0, bool showDialogButtons=true)
Create an attribute dialog for a given layer and feature.
void setHighlight(QgsHighlight *h)
setHighlight
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
const QString & name() const
Get the display name of the layer.
A class for highlight features on the map.
void setDistanceArea(const QgsDistanceArea &distanceArea)
General purpose distance and area calculator.
const QgsFeature * feature()
Represents a vector layer which manages a vector based data sets.