61 if ( qobject_cast<QgsRelationReferenceWidget *>( sipCpp ) )
62 sipType = sipType_QgsRelationReferenceWidget;
69 Q_PROPERTY(
bool openFormButtonVisible READ openFormButtonVisible WRITE setOpenFormButtonVisible )
83 void setRelation(
const QgsRelation &relation,
bool allowNullValue );
85 void setRelationEditable(
bool editable );
91 Q_DECL_DEPRECATED
void setForeignKey(
const QVariant &value )
SIP_DEPRECATED;
97 void setForeignKeys(
const QVariantList &values );
111 QVariantList foreignKeys() const;
121 bool embedForm() {
return mEmbedForm; }
122 void setEmbedForm(
bool display );
126 void setReadOnlySelector(
bool readOnly );
130 void setAllowMapIdentification(
bool allowMapIdentification );
133 void setFilterFields(
const QStringList &filterFields );
137 void setOpenFormButtonVisible(
bool openFormButtonVisible );
152 void setChainFilters(
bool chainFilters );
163 void setFilterExpression(
const QString &filterExpression );
174 void showIndeterminateState();
180 bool allowAddFeatures()
const;
186 void setAllowAddFeatures(
bool allowAddFeatures );
199 void setFormFeature(
const QgsFeature &formFeature );
205 QString referencedLayerDataSource()
const;
211 void setReferencedLayerDataSource(
const QString &referencedLayerDataSource );
217 QString referencedLayerProviderKey()
const;
223 void setReferencedLayerProviderKey(
const QString &referencedLayerProviderKey );
229 QString referencedLayerId()
const;
235 void setReferencedLayerId(
const QString &referencedLayerId );
241 QString referencedLayerName()
const;
247 void setReferencedLayerName(
const QString &referencedLayerName );
267 void mapIdentification();
270 void deleteForeignKeys();
273 void showEvent( QShowEvent *e )
override;
292 void highlightActionTriggered( QAction *action );
293 void deleteHighlight();
294 void comboReferenceChanged();
295 void comboReferenceFoundChanged(
bool found );
296 void featureIdentified(
const QgsFeature &feature );
299 void mapToolDeactivated();
300 void filterChanged();
302 void updateAddEntryButton();
304 void onKeyPressed( QKeyEvent *e );
308 void updateAttributeEditorFrame(
const QgsFeature &feature );
309 void disableChainedComboBoxes(
const QComboBox *cb );
310 void emitForeignKeysChanged(
const QVariantList &foreignKeys,
bool force =
false );
316 QVariantList mForeignKeys;
320 QStringList mReferencedFields;
321 bool mAllowNull =
true;
331 QList<QComboBox *> mFilterComboBoxes;
332 QString mFilterExpression;
333 QWidget *mWindowWidget =
nullptr;
336 bool mIsEditable =
true;
337 QStringList mFilterFields;
338 QMap<QString, QMap<QString, QSet<QString>>> mFilterCache;
339 bool mInitialized =
false;
343 bool mEmbedForm =
false;
344 bool mReadOnlySelector =
false;
345 bool mAllowMapIdentification =
false;
346 bool mOpenFormButtonVisible =
true;
347 bool mChainFilters =
false;
348 bool mAllowAddFeatures =
false;
349 QString mReferencedLayerId;
350 QString mReferencedLayerName;
351 QString mReferencedLayerDataSource;
352 QString mReferencedLayerProviderKey;
355 QVBoxLayout *mTopLayout =
nullptr;
356 QToolButton *mMapIdentificationButton =
nullptr;
357 QToolButton *mRemoveFKButton =
nullptr;
358 QToolButton *mOpenFormButton =
nullptr;
359 QToolButton *mHighlightFeatureButton =
nullptr;
360 QToolButton *mAddEntryButton =
nullptr;
361 QAction *mHighlightFeatureAction =
nullptr;
362 QAction *mScaleHighlightFeatureAction =
nullptr;
363 QAction *mPanHighlightFeatureAction =
nullptr;
364 QWidget *mChooserContainer =
nullptr;
365 QWidget *mFilterContainer =
nullptr;
366 QHBoxLayout *mFilterLayout =
nullptr;
368 QVBoxLayout *mAttributeEditorLayout =
nullptr;
369 QLabel *mInvalidLabel =
nullptr;
371 friend class TestQgsRelationReferenceWidget;
This class contains context information for attribute editor widgets.