28 , mOwnedFeature( featureOwner ? thepFeature : nullptr )
30 init( vl, thepFeature, context, showDialogButtons );
46 void QgsAttributeDialog::saveGeometry()
53 void QgsAttributeDialog::restoreGeometry()
69 bool didSave = mAttributeForm->
save();
77 tr(
"Your JSON value is invalid and has not been saved" ),
78 Qgis::MessageLevel::Critical,
102 setWindowTitle( tr(
"%1 - Feature Attributes" ).arg( layer->
name() ) );
103 setLayout(
new QGridLayout() );
104 layout()->setMargin( 0 );
106 mMessageBar->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed );
107 layout()->addWidget( mMessageBar );
109 setLayout( layout() );
113 if ( showDialogButtons )
118 layout()->addWidget( mAttributeForm );
119 QDialogButtonBox *buttonBox = mAttributeForm->findChild<QDialogButtonBox *>();
122 connect( layer, &QObject::destroyed,
this, &QWidget::close );
124 mMenu =
new QgsActionMenu( layer, mAttributeForm->
feature(), QStringLiteral(
"Feature" ),
this );
127 QMenuBar *menuBar =
new QMenuBar(
this );
128 menuBar->addMenu( mMenu );
129 layout()->setMenuBar( menuBar );
138 mAttributeForm->
setMode( mode );
144 if ( e->type() == QEvent::WindowActivate && mHighlight )
146 else if ( e->type() == QEvent::WindowDeactivate && mHighlight )
149 return QDialog::event( e );