QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Slots | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
QgsAttributeDialog Class Reference

#include <qgsattributedialog.h>

Collaboration diagram for QgsAttributeDialog:
Collaboration graph
[legend]

Public Slots

void accept ()
int exec ()
void show ()
void dialogDestroyed ()

Public Member Functions

 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.
 QgsAttributeDialog (QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, QWidget *parent=0, bool showDialogButtons=true, QgsAttributeEditorContext context=QgsAttributeEditorContext())
 Create an attribute dialog for a given layer and feature.
 ~QgsAttributeDialog ()
void saveGeometry ()
 Saves the size and position for the next time this dialog box will be used.
void restoreGeometry ()
 Restores the size and position from the last time this dialog box was used.
void setHighlight (QgsHighlight *h)
QDialog * dialog ()
QgsFeaturefeature ()
bool editable ()
 Is this dialog editable?

Protected Member Functions

bool eventFilter (QObject *obj, QEvent *event)

Private Member Functions

void init ()

Private Attributes

QDialog * mDialog
QString mSettingsPath
QgsAttributeEditorContext mContext
QgsVectorLayermLayer
QgsFeaturemFeature
bool mFeatureOwner
QgsHighlightmHighlight
int mFormNr
bool mShowDialogButtons
QString mReturnvarname
bool mEditable

Static Private Attributes

static int sFormCounter = 0
static QString sSettingsPath = "/Windows/AttributeDialog/"

Detailed Description

Definition at line 33 of file qgsattributedialog.h.

Constructor & Destructor Documentation

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

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 65 of file qgsattributedialog.cpp.

References QgsAttributeEditorContext::adjustForLayer(), init(), mContext, mLayer, and QgsAttributeEditorContext::setDistanceArea().

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

References QgsAttributeEditorContext::adjustForLayer(), init(), mContext, and mLayer.

QgsAttributeDialog::~QgsAttributeDialog ( )

Member Function Documentation

void QgsAttributeDialog::accept ( )
slot
QDialog* QgsAttributeDialog::dialog ( )
inline
void QgsAttributeDialog::dialogDestroyed ( )
slot

Definition at line 632 of file qgsattributedialog.cpp.

References mDialog, mFormNr, mLayer, mReturnvarname, and QgsPythonRunner::run().

Referenced by init().

bool QgsAttributeDialog::editable ( )
inline

Is this dialog editable?

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

Definition at line 88 of file qgsattributedialog.h.

Referenced by QgsDualView::saveEditChanges().

bool QgsAttributeDialog::eventFilter ( QObject *  obj,
QEvent *  event 
)
protected

Definition at line 654 of file qgsattributedialog.cpp.

References mDialog, and mHighlight.

int QgsAttributeDialog::exec ( )
slot

Definition at line 578 of file qgsattributedialog.cpp.

References mDialog, and QgsDebugMsg.

QgsFeature* QgsAttributeDialog::feature ( )
inline
void QgsAttributeDialog::init ( )
private

Definition at line 81 of file qgsattributedialog.cpp.

References accept(), QgsAttributeEditorElement::AeTypeContainer, QgsFeature::attribute(), QgsVectorLayer::attributeAlias(), QgsVectorLayer::attributeDisplayName(), QgsVectorLayer::attributeEditorElements(), QgsFields::count(), QgsAttributeEditor::createAttributeEditor(), QgsRelationEditorWidget::createRelationEditor(), QgsAttributeEditor::createWidgetFromDef(), QgsVectorLayer::dataProvider(), QgsVectorLayer::dateFormat(), dialogDestroyed(), QgsAttributeEditorContext::distanceArea(), QgsVectorLayer::editForm(), QgsVectorLayer::editFormInit(), QgsVectorLayer::editorLayout(), QgsVectorLayer::EditorWidgetV2, QgsVectorLayer::editType(), QgsExpression::evalErrorString(), QgsExpression::evaluate(), feature(), QgsVectorLayer::fieldEditable(), file, GEO_NONE, QgsFeature::geometry(), QgsVectorLayer::getFeatures(), QgsExpression::hasEvalError(), QgsExpression::hasParserError(), QgsMapLayer::id(), QgsFeature::id(), QgsRelation::id(), QgsVectorLayer::Immutable, index, QgsProject::instance(), QgsVectorLayer::isEditable(), QgsFields::isEmpty(), QgsRelation::isValid(), QgsVectorLayer::labelOnTop(), mContext, mDialog, mEditable, mFeature, mFormNr, mLayer, mReturnvarname, mShowDialogButtons, QgsAttributeEditorElement::name(), QgsMapLayer::name(), QgsExpression::needsGeometry(), QgsFeatureIterator::nextFeature(), QgsVectorLayer::pendingFields(), QgsVectorLayer::Photo, QgsDebugMsg, QgsRelationManager::referencedRelations(), QgsRelationManager::relation(), QgsProject::relationManager(), restoreGeometry(), QgsPythonRunner::run(), QgsDistanceArea::setEllipsoid(), QgsDistanceArea::setEllipsoidalMode(), QgsExpression::setGeomCalculator(), QgsFeature::setGeometry(), QgsDistanceArea::setSourceCrs(), QgsVectorLayer::TabLayout, tr, QgsField::type(), QgsAttributeEditorElement::type(), QgsVectorLayer::UiFileLayout, and QgsVectorLayer::WebView.

Referenced by QgsAttributeDialog().

void QgsAttributeDialog::restoreGeometry ( )

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

Definition at line 612 of file qgsattributedialog.cpp.

References mDialog, and mSettingsPath.

Referenced by init().

void QgsAttributeDialog::saveGeometry ( )

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

Definition at line 603 of file qgsattributedialog.cpp.

References mDialog, and mSettingsPath.

Referenced by ~QgsAttributeDialog().

void QgsAttributeDialog::setHighlight ( QgsHighlight h)

Definition at line 621 of file qgsattributedialog.cpp.

References mHighlight.

void QgsAttributeDialog::show ( )
slot

Definition at line 591 of file qgsattributedialog.cpp.

References mDialog.

Member Data Documentation

QgsAttributeEditorContext QgsAttributeDialog::mContext
private

Definition at line 107 of file qgsattributedialog.h.

Referenced by accept(), init(), and QgsAttributeDialog().

QDialog* QgsAttributeDialog::mDialog
private
bool QgsAttributeDialog::mEditable
private

Definition at line 117 of file qgsattributedialog.h.

Referenced by init().

QgsFeature* QgsAttributeDialog::mFeature
private

Definition at line 109 of file qgsattributedialog.h.

Referenced by accept(), init(), and ~QgsAttributeDialog().

bool QgsAttributeDialog::mFeatureOwner
private

Definition at line 110 of file qgsattributedialog.h.

Referenced by ~QgsAttributeDialog().

int QgsAttributeDialog::mFormNr
private

Definition at line 112 of file qgsattributedialog.h.

Referenced by dialogDestroyed(), and init().

QgsHighlight* QgsAttributeDialog::mHighlight
private

Definition at line 111 of file qgsattributedialog.h.

Referenced by eventFilter(), setHighlight(), and ~QgsAttributeDialog().

QgsVectorLayer* QgsAttributeDialog::mLayer
private
QString QgsAttributeDialog::mReturnvarname
private

Definition at line 114 of file qgsattributedialog.h.

Referenced by dialogDestroyed(), and init().

QString QgsAttributeDialog::mSettingsPath
private

Definition at line 105 of file qgsattributedialog.h.

Referenced by restoreGeometry(), and saveGeometry().

bool QgsAttributeDialog::mShowDialogButtons
private

Definition at line 113 of file qgsattributedialog.h.

Referenced by init().

int QgsAttributeDialog::sFormCounter = 0
staticprivate

Definition at line 119 of file qgsattributedialog.h.

QString QgsAttributeDialog::sSettingsPath = "/Windows/AttributeDialog/"
staticprivate

Definition at line 120 of file qgsattributedialog.h.


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