QGIS API Documentation  2.8.2-Wien
 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 }
typedef QVector
< ValueRelationItem
ValueRelationCache
typedef QPair< QVariant,
QgsFeatureId
ValueRelationItem

Public Slots

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

Signals

void foreignKeyChanged (QVariant)

Public Member Functions

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

Protected Member Functions

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

Properties

bool openFormButtonVisible

Detailed Description

Definition at line 33 of file qgsrelationreferencewidget.h.

Member Typedef Documentation

Definition at line 40 of file qgsrelationreferencewidget.h.

Definition at line 39 of file qgsrelationreferencewidget.h.

Member Enumeration Documentation

Enumerator:
Fixed 
Pan 
Scale 

Definition at line 42 of file qgsrelationreferencewidget.h.

Constructor & Destructor Documentation

QgsRelationReferenceWidget::QgsRelationReferenceWidget ( QWidget *  parent)
explicit

Definition at line 55 of file qgsrelationreferencewidget.cpp.

QgsRelationReferenceWidget::~QgsRelationReferenceWidget ( )

Definition at line 165 of file qgsrelationreferencewidget.cpp.

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)

Definition at line 74 of file qgsrelationreferencewidget.h.

void QgsRelationReferenceWidget::deleteForeignKey ( )
slot

unset the currently related feature

Definition at line 280 of file qgsrelationreferencewidget.cpp.

bool QgsRelationReferenceWidget::embedForm ( )
inline

determines if the form of the related feature will be shown

Definition at line 66 of file qgsrelationreferencewidget.h.

QVariant QgsRelationReferenceWidget::foreignKey ( )

returns the related feature foreign key

Definition at line 329 of file qgsrelationreferencewidget.cpp.

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

Definition at line 402 of file qgsrelationreferencewidget.cpp.

void QgsRelationReferenceWidget::mapIdentification ( )
slot

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

Definition at line 571 of file qgsrelationreferencewidget.cpp.

void QgsRelationReferenceWidget::openForm ( )
slot

open the form of the related feature in a new dialog

Definition at line 486 of file qgsrelationreferencewidget.cpp.

bool QgsRelationReferenceWidget::openFormButtonVisible ( )
inline

determines the open form button is visible in the widget

Definition at line 83 of file qgsrelationreferencewidget.h.

bool QgsRelationReferenceWidget::orderByValue ( )
inline

If the widget will order the combobox entries by value.

Definition at line 78 of file qgsrelationreferencewidget.h.

bool QgsRelationReferenceWidget::readOnlySelector ( )
inline

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

Definition at line 70 of file qgsrelationreferencewidget.h.

QgsFeature QgsRelationReferenceWidget::referencedFeature ( )

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

Definition at line 310 of file qgsrelationreferencewidget.cpp.

void QgsRelationReferenceWidget::setAllowMapIdentification ( bool  allowMapIdentification)

Definition at line 375 of file qgsrelationreferencewidget.cpp.

void QgsRelationReferenceWidget::setEditorContext ( const QgsAttributeEditorContext context,
QgsMapCanvas canvas,
QgsMessageBar messageBar 
)

Definition at line 349 of file qgsrelationreferencewidget.cpp.

void QgsRelationReferenceWidget::setEmbedForm ( bool  display)

Definition at line 361 of file qgsrelationreferencewidget.cpp.

void QgsRelationReferenceWidget::setForeignKey ( const QVariant &  value)

this sets the related feature using from the foreign key

Definition at line 220 of file qgsrelationreferencewidget.cpp.

void QgsRelationReferenceWidget::setOpenFormButtonVisible ( bool  openFormButtonVisible)

Definition at line 387 of file qgsrelationreferencewidget.cpp.

void QgsRelationReferenceWidget::setOrderByValue ( bool  orderByValue)

Set if the widget will order the combobox entries by value.

Definition at line 382 of file qgsrelationreferencewidget.cpp.

void QgsRelationReferenceWidget::setReadOnlySelector ( bool  readOnly)

Definition at line 367 of file qgsrelationreferencewidget.cpp.

void QgsRelationReferenceWidget::setRelation ( QgsRelation  relation,
bool  allowNullValue 
)

Definition at line 173 of file qgsrelationreferencewidget.cpp.

void QgsRelationReferenceWidget::setRelationEditable ( bool  editable)

Definition at line 209 of file qgsrelationreferencewidget.cpp.

void QgsRelationReferenceWidget::showEvent ( QShowEvent *  e)
overrideprotectedvirtual

Definition at line 393 of file qgsrelationreferencewidget.cpp.

Property Documentation

bool QgsRelationReferenceWidget::openFormButtonVisible
readwrite

Definition at line 36 of file qgsrelationreferencewidget.h.


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