16 #ifndef QGSRELATIONREFERENCEWIDGET_H
17 #define QGSRELATIONREFERENCEWIDGET_H
26 #include <QToolButton>
28 #include <QVBoxLayout>
36 Q_PROPERTY(
bool openFormButtonVisible READ openFormButtonVisible WRITE setOpenFormButtonVisible )
50 void setRelation(
QgsRelation relation,
bool allowNullValue );
52 void setRelationEditable(
bool editable );
55 void setForeignKey(
const QVariant &value );
58 QVariant foreignKey();
64 void setEmbedForm(
bool display );
68 void setReadOnlySelector(
bool readOnly );
72 void setAllowMapIdentification(
bool allowMapIdentification );
76 void setOpenFormButtonVisible(
bool openFormButtonVisible );
87 void mapIdentification();
90 void deleteForeignKey();
93 virtual void showEvent( QShowEvent* e );
98 void foreignKeyChanged( QVariant );
101 void highlightActionTriggered( QAction* action );
102 void deleteHighlight();
103 void comboReferenceChanged(
int index );
104 void featureIdentified(
const QgsFeature& feature );
106 void mapToolDeactivated();
110 void updateAttributeEditorFrame(
const QgsFeature feature );
116 QVariant mForeignKey;
123 QString mRelationName;
127 QWidget* mWindowWidget;
134 bool mReadOnlySelector;
135 bool mAllowMapIdentification;
136 bool mOpenFormButtonVisible;
139 QVBoxLayout* mTopLayout;
140 QHash<QgsFeatureId, QVariant> mFidFkMap;
141 QToolButton* mMapIdentificationButton;
142 QToolButton* mRemoveFKButton;
143 QToolButton* mOpenFormButton;
144 QToolButton* mHighlightFeatureButton;
145 QAction* mHighlightFeatureAction;
146 QAction* mScaleHighlightFeatureAction;
147 QAction* mPanHighlightFeatureAction;
148 QComboBox* mComboBox;
150 QVBoxLayout* mAttributeEditorLayout;
151 QLineEdit* mLineEdit;
152 QLabel* mInvalidLabel;
155 #endif // QGSRELATIONREFERENCEWIDGET_H