QGIS API Documentation
3.6.0-Noosa (5873452)
|
#include <qgsrelationreferencewidget.h>
Public Types | |
enum | CanvasExtent { Fixed, Pan, Scale } |
Public Slots | |
void | deleteForeignKey () |
unset the currently related feature More... | |
void | mapIdentification () |
activate the map tool to select a new related feature on the map More... | |
void | openForm () |
open the form of the related feature in a new dialog More... | |
Signals | |
void | foreignKeyChanged (const QVariant &) |
Public Member Functions | |
QgsRelationReferenceWidget (QWidget *parent) | |
~QgsRelationReferenceWidget () override | |
bool | allowAddFeatures () const |
Determines if a button for adding new features should be shown. More... | |
bool | allowMapIdentification () |
determines if the widge offers the possibility to select the related feature on the map (using a dedicated map tool) More... | |
bool | chainFilters () const |
Determines if the filters are chained. More... | |
bool | embedForm () |
determines if the form of the related feature will be shown More... | |
QVariant | foreignKey () const |
returns the related feature foreign key More... | |
bool | openFormButtonVisible () |
determines the open form button is visible in the widget More... | |
bool | orderByValue () |
If the widget will order the combobox entries by value. More... | |
bool | readOnlySelector () |
determines if the foreign key is shown in a combox box or a read-only line edit More... | |
QgsFeature | referencedFeature () const |
Returns the related feature (from the referenced layer) if no feature is related, it returns an invalid feature. More... | |
void | setAllowAddFeatures (bool allowAddFeatures) |
Determines if a button for adding new features should be shown. More... | |
void | setAllowMapIdentification (bool allowMapIdentification) |
void | setChainFilters (bool chainFilters) |
Set if filters are chained. More... | |
void | setEditorContext (const QgsAttributeEditorContext &context, QgsMapCanvas *canvas, QgsMessageBar *messageBar) |
void | setEmbedForm (bool display) |
void | setFilterFields (const QStringList &filterFields) |
Sets the fields for which filter comboboxes will be created. More... | |
void | setForeignKey (const QVariant &value) |
this sets the related feature using from the foreign key More... | |
void | setOpenFormButtonVisible (bool openFormButtonVisible) |
void | setOrderByValue (bool orderByValue) |
Sets if the widget will order the combobox entries by value. More... | |
void | setReadOnlySelector (bool readOnly) |
void | setRelation (const QgsRelation &relation, bool allowNullValue) |
void | setRelationEditable (bool editable) |
void | showIndeterminateState () |
Sets the widget to display in an indeterminate "mixed value" state. More... | |
Protected Member Functions | |
void | init () |
void | showEvent (QShowEvent *e) override |
Properties | |
bool | openFormButtonVisible |
Friends | |
class | TestQgsRelationReferenceWidget |
Definition at line 54 of file qgsrelationreferencewidget.h.
Enumerator | |
---|---|
Fixed | |
Pan | |
Scale |
Definition at line 71 of file qgsrelationreferencewidget.h.
|
explicit |
Definition at line 46 of file qgsrelationreferencewidget.cpp.
|
override |
Definition at line 152 of file qgsrelationreferencewidget.cpp.
bool QgsRelationReferenceWidget::allowAddFeatures | ( | ) | const |
Determines if a button for adding new features should be shown.
Definition at line 719 of file qgsrelationreferencewidget.cpp.
|
inline |
determines if the widge offers the possibility to select the related feature on the map (using a dedicated map tool)
Definition at line 103 of file qgsrelationreferencewidget.h.
|
inline |
Determines if the filters are chained.
Definition at line 122 of file qgsrelationreferencewidget.h.
|
slot |
unset the currently related feature
Definition at line 321 of file qgsrelationreferencewidget.cpp.
|
inline |
determines if the form of the related feature will be shown
Definition at line 95 of file qgsrelationreferencewidget.h.
QVariant QgsRelationReferenceWidget::foreignKey | ( | ) | const |
returns the related feature foreign key
Definition at line 386 of file qgsrelationreferencewidget.cpp.
|
signal |
|
protected |
Definition at line 466 of file qgsrelationreferencewidget.cpp.
|
slot |
activate the map tool to select a new related feature on the map
Definition at line 667 of file qgsrelationreferencewidget.cpp.
|
slot |
open the form of the related feature in a new dialog
Definition at line 582 of file qgsrelationreferencewidget.cpp.
|
inline |
determines the open form button is visible in the widget
Definition at line 114 of file qgsrelationreferencewidget.h.
|
inline |
If the widget will order the combobox entries by value.
Definition at line 107 of file qgsrelationreferencewidget.h.
|
inline |
determines if the foreign key is shown in a combox box or a read-only line edit
Definition at line 99 of file qgsrelationreferencewidget.h.
QgsFeature QgsRelationReferenceWidget::referencedFeature | ( | ) | const |
Returns the related feature (from the referenced layer) if no feature is related, it returns an invalid feature.
Definition at line 353 of file qgsrelationreferencewidget.cpp.
void QgsRelationReferenceWidget::setAllowAddFeatures | ( | bool | allowAddFeatures | ) |
Determines if a button for adding new features should be shown.
Definition at line 724 of file qgsrelationreferencewidget.cpp.
void QgsRelationReferenceWidget::setAllowMapIdentification | ( | bool | allowMapIdentification | ) |
Definition at line 429 of file qgsrelationreferencewidget.cpp.
void QgsRelationReferenceWidget::setChainFilters | ( | bool | chainFilters | ) |
Set if filters are chained.
Chained filters restrict the option of subsequent filters based on the selection of a previous filter.
chainFilters | If chaining should be enabled |
Definition at line 452 of file qgsrelationreferencewidget.cpp.
void QgsRelationReferenceWidget::setEditorContext | ( | const QgsAttributeEditorContext & | context, |
QgsMapCanvas * | canvas, | ||
QgsMessageBar * | messageBar | ||
) |
Definition at line 398 of file qgsrelationreferencewidget.cpp.
void QgsRelationReferenceWidget::setEmbedForm | ( | bool | display | ) |
Definition at line 409 of file qgsrelationreferencewidget.cpp.
void QgsRelationReferenceWidget::setFilterFields | ( | const QStringList & | filterFields | ) |
Sets the fields for which filter comboboxes will be created.
Definition at line 441 of file qgsrelationreferencewidget.cpp.
void QgsRelationReferenceWidget::setForeignKey | ( | const QVariant & | value | ) |
this sets the related feature using from the foreign key
Definition at line 249 of file qgsrelationreferencewidget.cpp.
void QgsRelationReferenceWidget::setOpenFormButtonVisible | ( | bool | openFormButtonVisible | ) |
Definition at line 446 of file qgsrelationreferencewidget.cpp.
void QgsRelationReferenceWidget::setOrderByValue | ( | bool | orderByValue | ) |
Sets if the widget will order the combobox entries by value.
Definition at line 436 of file qgsrelationreferencewidget.cpp.
void QgsRelationReferenceWidget::setReadOnlySelector | ( | bool | readOnly | ) |
Definition at line 421 of file qgsrelationreferencewidget.cpp.
void QgsRelationReferenceWidget::setRelation | ( | const QgsRelation & | relation, |
bool | allowNullValue | ||
) |
Definition at line 191 of file qgsrelationreferencewidget.cpp.
void QgsRelationReferenceWidget::setRelationEditable | ( | bool | editable | ) |
Definition at line 236 of file qgsrelationreferencewidget.cpp.
|
overrideprotected |
Definition at line 457 of file qgsrelationreferencewidget.cpp.
void QgsRelationReferenceWidget::showIndeterminateState | ( | ) |
Sets the widget to display in an indeterminate "mixed value" state.
Definition at line 372 of file qgsrelationreferencewidget.cpp.
|
friend |
Definition at line 254 of file qgsrelationreferencewidget.h.
|
readwrite |
Definition at line 67 of file qgsrelationreferencewidget.h.