QGIS API Documentation  2.99.0-Master (6a61179)
Public Slots | Public Member Functions | List of all members
QgsAttributeDialog Class Reference

#include <qgsattributedialog.h>

Inheritance diagram for QgsAttributeDialog:
Inheritance graph
[legend]

Public Slots

void accept () override
 
void reject () override
 
void show ()
 Show the dialog non-blocking. Reparents this dialog to be a child of the dialog form. More...
 

Public Member Functions

 QgsAttributeDialog (QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, QWidget *parent=nullptr, bool showDialogButtons=true, const QgsAttributeEditorContext &context=QgsAttributeEditorContext())
 Create an attribute dialog for a given layer and feature. More...
 
 ~QgsAttributeDialog ()
 
QgsAttributeFormattributeForm ()
 
bool editable ()
 Is this dialog editable? More...
 
virtual bool event (QEvent *e) override
 Intercept window activate/deactive events to show/hide the highlighted feature. More...
 
const QgsFeaturefeature ()
 
void restoreGeometry ()
 Restores the size and position from the last time this dialog box was used. More...
 
void saveGeometry ()
 Saves the size and position for the next time this dialog box will be used. More...
 
void setEditCommandMessage (const QString &message)
 Sets the edit command message (Undo) that will be used when the dialog is accepted. More...
 
void setHighlight (QgsHighlight *h)
 setHighlight More...
 
void setMode (QgsAttributeForm::Mode mode)
 Toggles the form mode. More...
 

Detailed Description

Definition at line 34 of file qgsattributedialog.h.

Constructor & Destructor Documentation

§ QgsAttributeDialog()

QgsAttributeDialog::QgsAttributeDialog ( QgsVectorLayer vl,
QgsFeature thepFeature,
bool  featureOwner,
QWidget *  parent = nullptr,
bool  showDialogButtons = true,
const QgsAttributeEditorContext context = QgsAttributeEditorContext() 
)

Create an attribute dialog for a given layer and feature.

Parameters
vlThe layer for which the dialog will be generated
thepFeatureA feature for which the dialog will be generated
featureOwnerSet to true, if the dialog should take ownership of the feature
parentA parent widget for the dialog
showDialogButtonsTrue: Show the dialog buttons accept/cancel
contextThe context in which this dialog is created

Definition at line 27 of file qgsattributedialog.cpp.

§ ~QgsAttributeDialog()

QgsAttributeDialog::~QgsAttributeDialog ( )

Definition at line 35 of file qgsattributedialog.cpp.

Member Function Documentation

§ accept

void QgsAttributeDialog::accept ( )
overrideslot

Definition at line 66 of file qgsattributedialog.cpp.

§ attributeForm()

QgsAttributeForm* QgsAttributeDialog::attributeForm ( )
inline

Definition at line 71 of file qgsattributedialog.h.

§ editable()

bool QgsAttributeDialog::editable ( )
inline

Is this dialog editable?

Returns
returns true, if this dialog was created in an editable manner.

Definition at line 80 of file qgsattributedialog.h.

§ event()

bool QgsAttributeDialog::event ( QEvent *  e)
overridevirtual

Intercept window activate/deactive events to show/hide the highlighted feature.

Parameters
eThe event
Returns
The same as the parent QDialog

Definition at line 123 of file qgsattributedialog.cpp.

§ feature()

const QgsFeature* QgsAttributeDialog::feature ( )
inline

Definition at line 73 of file qgsattributedialog.h.

§ reject

void QgsAttributeDialog::reject ( )
overrideslot

Definition at line 79 of file qgsattributedialog.cpp.

§ restoreGeometry()

void QgsAttributeDialog::restoreGeometry ( )

Restores the size and position from the last time this dialog box was used.

Definition at line 54 of file qgsattributedialog.cpp.

§ saveGeometry()

void QgsAttributeDialog::saveGeometry ( )

Saves the size and position for the next time this dialog box will be used.

Definition at line 49 of file qgsattributedialog.cpp.

§ setEditCommandMessage()

void QgsAttributeDialog::setEditCommandMessage ( const QString &  message)
inline

Sets the edit command message (Undo) that will be used when the dialog is accepted.

Parameters
messageThe message

Definition at line 94 of file qgsattributedialog.h.

§ setHighlight()

void QgsAttributeDialog::setHighlight ( QgsHighlight h)

setHighlight

Parameters
hThe highlight. Ownership is taken.

Definition at line 59 of file qgsattributedialog.cpp.

§ setMode()

void QgsAttributeDialog::setMode ( QgsAttributeForm::Mode  mode)
inline

Toggles the form mode.

Parameters
modeform mode. Eg if set to QgsAttributeForm::AddFeatureMode, the dialog will be editable even with an invalid feature and will add a new feature when the form is accepted.

Definition at line 87 of file qgsattributedialog.h.

§ show

void QgsAttributeDialog::show ( )
slot

Show the dialog non-blocking. Reparents this dialog to be a child of the dialog form.

Definition at line 72 of file qgsattributedialog.cpp.


The documentation for this class was generated from the following files: