QGIS API Documentation  2.8.2-Wien
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Slots | Public Member Functions | List of all members
QgsAttributeDialog Class Reference

#include <qgsattributedialog.h>

Public Slots

void accept () override
void show (bool autoDelete=true)
 Show the dialog non-blocking.

Public Member Functions

 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.
 QgsAttributeDialog (QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, QWidget *parent=0, bool showDialogButtons=true, const QgsAttributeEditorContext &context=QgsAttributeEditorContext())
 Create an attribute dialog for a given layer and feature.
 ~QgsAttributeDialog ()
QgsAttributeFormattributeForm ()
Q_DECL_DEPRECATED QDialog * dialog ()
 Returns reference to self.
bool editable ()
 Is this dialog editable?
const QgsFeaturefeature ()
void restoreGeometry ()
 Restores the size and position from the last time this dialog box was used.
void saveGeometry ()
 Saves the size and position for the next time this dialog box will be used.
void setEditCommandMessage (const QString &message)
 Sets the edit command message (Undo) that will be used when the dialog is accepted.
void setHighlight (QgsHighlight *h)
 setHighlight
void setIsAddDialog (bool isAddDialog)
 Toggles the form mode between edit feature and add feature.

Detailed Description

Definition at line 35 of file qgsattributedialog.h.

Constructor & Destructor Documentation

QgsAttributeDialog::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.

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
myDaA QgsDistanceArea which will be used for expressions
parentA parent widget for the dialog
showDialogButtonsTrue: Show the dialog buttons accept/cancel
Deprecated:

Definition at line 28 of file qgsattributedialog.cpp.

QgsAttributeDialog::QgsAttributeDialog ( QgsVectorLayer vl,
QgsFeature thepFeature,
bool  featureOwner,
QWidget *  parent = 0,
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 42 of file qgsattributedialog.cpp.

QgsAttributeDialog::~QgsAttributeDialog ( )

Definition at line 53 of file qgsattributedialog.cpp.

Member Function Documentation

void QgsAttributeDialog::accept ( )
overrideslot

Definition at line 84 of file qgsattributedialog.cpp.

QgsAttributeForm* QgsAttributeDialog::attributeForm ( )
inline

Definition at line 94 of file qgsattributedialog.h.

Q_DECL_DEPRECATED QDialog* QgsAttributeDialog::dialog ( )
inline

Returns reference to self.

Only here for legacy compliance

Returns
this
Deprecated:
Do not use. Just use this object itself. Or QgsAttributeForm if you want to embed.

Definition at line 92 of file qgsattributedialog.h.

bool QgsAttributeDialog::editable ( )
inline

Is this dialog editable?

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

Definition at line 103 of file qgsattributedialog.h.

const QgsFeature* QgsAttributeDialog::feature ( )
inline

Definition at line 96 of file qgsattributedialog.h.

void QgsAttributeDialog::restoreGeometry ( )

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

Definition at line 72 of file qgsattributedialog.cpp.

void QgsAttributeDialog::saveGeometry ( )

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

Definition at line 67 of file qgsattributedialog.cpp.

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 119 of file qgsattributedialog.h.

void QgsAttributeDialog::setHighlight ( QgsHighlight h)

setHighlight

Parameters
hThe highlight. Ownership is taken.

Definition at line 77 of file qgsattributedialog.cpp.

void QgsAttributeDialog::setIsAddDialog ( bool  isAddDialog)
inline

Toggles the form mode between edit feature and add feature.

If set to true, the dialog will be editable even with an invalid feature. If set to true, the dialog will add a new feature when the form is accepted.

Parameters
isAddDialogIf set to true, turn this dialog into an add feature dialog.

Definition at line 112 of file qgsattributedialog.h.

void QgsAttributeDialog::show ( bool  autoDelete = true)
slot

Show the dialog non-blocking.

Reparents this dialog to be a child of the dialog form and is deleted when closed.

Definition at line 90 of file qgsattributedialog.cpp.


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