QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
QgsRelationReferenceWidget Class Reference

#include <qgsrelationreferencewidget.h>

Public Types

enum  CanvasExtent { Fixed, Pan, Scale }

Public Slots

void openForm ()
 open the form of the related feature in a new dialog
void mapIdentification ()
 activate the map tool to select a new related feature on the map
void deleteForeignKey ()
 unset the currently related feature

Signals

void foreignKeyChanged (QVariant)

Public Member Functions

 QgsRelationReferenceWidget (QWidget *parent)
 ~QgsRelationReferenceWidget ()
void setRelation (QgsRelation relation, bool allowNullValue)
void setRelationEditable (bool editable)
void setForeignKey (const QVariant &value)
 this sets the related feature using from the foreign key
QVariant foreignKey ()
 returns the related feature foreign key
void setEditorContext (QgsAttributeEditorContext context, QgsMapCanvas *canvas, QgsMessageBar *messageBar)
bool embedForm ()
 determines if the form of the related feature will be shown
void setEmbedForm (bool display)
bool readOnlySelector ()
 determines if the foreign key is shown in a combox box or a read-only line edit
void setReadOnlySelector (bool readOnly)
bool allowMapIdentification ()
 determines if the widge offers the possibility to select the related feature on the map (using a dedicated map tool)
void setAllowMapIdentification (bool allowMapIdentification)
bool openFormButtonVisible ()
 determines the open form button is visible in the widget
void setOpenFormButtonVisible (bool openFormButtonVisible)
QgsFeature referencedFeature ()
 return the related feature (from the referenced layer) if no feature is related, it returns an invalid feature

Protected Member Functions

virtual void showEvent (QShowEvent *e)
void init ()

Properties

bool openFormButtonVisible

Member Enumeration Documentation

Enumerator:
Fixed 
Pan 
Scale 

Constructor & Destructor Documentation

QgsRelationReferenceWidget::QgsRelationReferenceWidget ( QWidget *  parent)
explicit
QgsRelationReferenceWidget::~QgsRelationReferenceWidget ( )

Member Function Documentation

bool QgsRelationReferenceWidget::allowMapIdentification ( )
inline

determines if the widge offers the possibility to select the related feature on the map (using a dedicated map tool)

void QgsRelationReferenceWidget::deleteForeignKey ( )
slot

unset the currently related feature

bool QgsRelationReferenceWidget::embedForm ( )
inline

determines if the form of the related feature will be shown

QVariant QgsRelationReferenceWidget::foreignKey ( )

returns the related feature foreign key

void QgsRelationReferenceWidget::foreignKeyChanged ( QVariant  )
signal
void QgsRelationReferenceWidget::init ( )
protected
void QgsRelationReferenceWidget::mapIdentification ( )
slot

activate the map tool to select a new related feature on the map

void QgsRelationReferenceWidget::openForm ( )
slot

open the form of the related feature in a new dialog

bool QgsRelationReferenceWidget::openFormButtonVisible ( )
inline

determines the open form button is visible in the widget

bool QgsRelationReferenceWidget::readOnlySelector ( )
inline

determines if the foreign key is shown in a combox box or a read-only line edit

QgsFeature QgsRelationReferenceWidget::referencedFeature ( )

return the related feature (from the referenced layer) if no feature is related, it returns an invalid feature

void QgsRelationReferenceWidget::setAllowMapIdentification ( bool  allowMapIdentification)
void QgsRelationReferenceWidget::setEditorContext ( QgsAttributeEditorContext  context,
QgsMapCanvas canvas,
QgsMessageBar messageBar 
)
void QgsRelationReferenceWidget::setEmbedForm ( bool  display)
void QgsRelationReferenceWidget::setForeignKey ( const QVariant &  value)

this sets the related feature using from the foreign key

void QgsRelationReferenceWidget::setOpenFormButtonVisible ( bool  openFormButtonVisible)
void QgsRelationReferenceWidget::setReadOnlySelector ( bool  readOnly)
void QgsRelationReferenceWidget::setRelation ( QgsRelation  relation,
bool  allowNullValue 
)
void QgsRelationReferenceWidget::setRelationEditable ( bool  editable)
void QgsRelationReferenceWidget::showEvent ( QShowEvent *  e)
protectedvirtual

Property Documentation

bool QgsRelationReferenceWidget::openFormButtonVisible
readwrite

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