16 #ifndef QGSRELATIONREFERENCEWIDGET_H
17 #define QGSRELATIONREFERENCEWIDGET_H
26 #include <QToolButton>
28 #include <QVBoxLayout>
36 Q_PROPERTY(
bool openFormButtonVisible READ openFormButtonVisible WRITE setOpenFormButtonVisible )
53 void setRelation(
QgsRelation relation,
bool allowNullValue );
55 void setRelationEditable(
bool editable );
58 void setForeignKey(
const QVariant &value );
61 QVariant foreignKey();
67 void setEmbedForm(
bool display );
71 void setReadOnlySelector(
bool readOnly );
75 void setAllowMapIdentification(
bool allowMapIdentification );
80 void setOrderByValue(
bool orderByValue );
84 void setOpenFormButtonVisible(
bool openFormButtonVisible );
95 void mapIdentification();
98 void deleteForeignKey();
101 virtual void showEvent( QShowEvent* e )
override;
106 void foreignKeyChanged( QVariant );
109 void highlightActionTriggered( QAction* action );
110 void deleteHighlight();
111 void comboReferenceChanged(
int index );
112 void featureIdentified(
const QgsFeature& feature );
114 void mapToolDeactivated();
118 void updateAttributeEditorFrame(
const QgsFeature feature );
124 QVariant mForeignKey;
131 QString mRelationName;
135 QWidget* mWindowWidget;
142 bool mReadOnlySelector;
143 bool mAllowMapIdentification;
145 bool mOpenFormButtonVisible;
148 QVBoxLayout* mTopLayout;
149 QHash<QgsFeatureId, QVariant> mFidFkMap;
150 QToolButton* mMapIdentificationButton;
151 QToolButton* mRemoveFKButton;
152 QToolButton* mOpenFormButton;
153 QToolButton* mHighlightFeatureButton;
154 QAction* mHighlightFeatureAction;
155 QAction* mScaleHighlightFeatureAction;
156 QAction* mPanHighlightFeatureAction;
157 QComboBox* mComboBox;
159 QVBoxLayout* mAttributeEditorLayout;
160 QLineEdit* mLineEdit;
161 QLabel* mInvalidLabel;
164 #endif // QGSRELATIONREFERENCEWIDGET_H