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

#include <qgsrelationreferencewidget.h>

Inheritance diagram for QgsRelationReferenceWidget:
Inheritance graph
[legend]

Public Types

enum  CanvasExtent { Fixed, Pan, Scale }
 

Public Slots

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

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 More...
 
QVariant foreignKey ()
 returns the related feature foreign key More...
 
void setEditorContext (QgsAttributeEditorContext context, QgsMapCanvas *canvas, QgsMessageBar *messageBar)
 
bool embedForm ()
 determines if the form of the related feature will be shown More...
 
void setEmbedForm (bool display)
 
bool readOnlySelector ()
 determines if the foreign key is shown in a combox box or a read-only line edit More...
 
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) More...
 
void setAllowMapIdentification (bool allowMapIdentification)
 
bool openFormButtonVisible ()
 determines the open form button is visible in the widget More...
 
void setOpenFormButtonVisible (bool openFormButtonVisible)
 
QgsFeature referencedFeature ()
 return the related feature (from the referenced layer) if no feature is related, it returns an invalid feature More...
 

Protected Member Functions

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

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

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