62 if ( qobject_cast<QgsRelationReferenceWidget *>( sipCpp ) )
63 sipType = sipType_QgsRelationReferenceWidget;
70 Q_PROPERTY(
bool openFormButtonVisible READ openFormButtonVisible WRITE setOpenFormButtonVisible )
85 void setRelation(
const QgsRelation &relation,
bool allowNullValue );
87 void setRelationEditable(
bool editable );
93 Q_DECL_DEPRECATED
void setForeignKey(
const QVariant &value )
SIP_DEPRECATED;
99 void setForeignKeys(
const QVariantList &values );
113 QVariantList foreignKeys() const;
123 bool embedForm() {
return mEmbedForm; }
124 void setEmbedForm(
bool display );
128 void setReadOnlySelector(
bool readOnly );
132 void setAllowMapIdentification(
bool allowMapIdentification );
135 void setFilterFields(
const QStringList &filterFields );
139 void setOpenFormButtonVisible(
bool openFormButtonVisible );
154 void setChainFilters(
bool chainFilters );
165 void setFilterExpression(
const QString &filterExpression );
176 void showIndeterminateState();
182 bool allowAddFeatures()
const;
188 void setAllowAddFeatures(
bool allowAddFeatures );
201 void setFormFeature(
const QgsFeature &formFeature );
207 QString referencedLayerDataSource()
const;
213 void setReferencedLayerDataSource(
const QString &referencedLayerDataSource );
219 QString referencedLayerProviderKey()
const;
225 void setReferencedLayerProviderKey(
const QString &referencedLayerProviderKey );
231 QString referencedLayerId()
const;
237 void setReferencedLayerId(
const QString &referencedLayerId );
243 QString referencedLayerName()
const;
249 void setReferencedLayerName(
const QString &referencedLayerName );
269 void mapIdentification();
272 void deleteForeignKeys();
275 void showEvent( QShowEvent *e )
override;
294 void highlightActionTriggered( QAction *action );
295 void deleteHighlight();
296 void comboReferenceChanged();
297 void comboReferenceFoundChanged(
bool found );
298 void featureIdentified(
const QgsFeature &feature );
301 void mapToolDeactivated();
302 void filterChanged();
304 void updateAddEntryButton();
306 void onKeyPressed( QKeyEvent *e );
310 void updateAttributeEditorFrame(
const QgsFeature &feature );
311 void disableChainedComboBoxes(
const QComboBox *cb );
312 void emitForeignKeysChanged(
const QVariantList &foreignKeys,
bool force =
false );
318 QVariantList mForeignKeys;
322 QStringList mReferencedFields;
323 bool mAllowNull =
true;
333 QList<QComboBox *> mFilterComboBoxes;
334 QString mFilterExpression;
335 QWidget *mWindowWidget =
nullptr;
338 bool mIsEditable =
true;
339 QStringList mFilterFields;
340 QMap<QString, QMap<QString, QSet<QString> > > mFilterCache;
341 bool mInitialized =
false;
345 bool mEmbedForm =
false;
346 bool mReadOnlySelector =
false;
347 bool mAllowMapIdentification =
false;
348 bool mOpenFormButtonVisible =
true;
349 bool mChainFilters =
false;
350 bool mAllowAddFeatures =
false;
351 QString mReferencedLayerId;
352 QString mReferencedLayerName;
353 QString mReferencedLayerDataSource;
354 QString mReferencedLayerProviderKey;
357 QVBoxLayout *mTopLayout =
nullptr;
358 QToolButton *mMapIdentificationButton =
nullptr;
359 QToolButton *mRemoveFKButton =
nullptr;
360 QToolButton *mOpenFormButton =
nullptr;
361 QToolButton *mHighlightFeatureButton =
nullptr;
362 QToolButton *mAddEntryButton =
nullptr;
363 QAction *mHighlightFeatureAction =
nullptr;
364 QAction *mScaleHighlightFeatureAction =
nullptr;
365 QAction *mPanHighlightFeatureAction =
nullptr;
366 QWidget *mChooserContainer =
nullptr;
367 QWidget *mFilterContainer =
nullptr;
368 QHBoxLayout *mFilterLayout =
nullptr;
370 QVBoxLayout *mAttributeEditorLayout =
nullptr;
371 QLabel *mInvalidLabel =
nullptr;
373 friend class TestQgsRelationReferenceWidget;
This class contains context information for attribute editor widgets.