16 #ifndef QGSRELATIONREFERENCEWIDGET_H 17 #define QGSRELATIONREFERENCEWIDGET_H 25 #include <QToolButton> 27 #include <QHBoxLayout> 28 #include <QStandardItemModel> 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 );
105 Q_DECL_DEPRECATED QVariant foreignKey() const SIP_DEPRECATED;
113 QVariantList foreignKeys() const;
118 bool embedForm() {
return mEmbedForm; }
119 void setEmbedForm(
bool display );
123 void setReadOnlySelector(
bool readOnly );
127 void setAllowMapIdentification(
bool allowMapIdentification );
132 void setOrderByValue(
bool orderByValue );
134 void setFilterFields(
const QStringList &filterFields );
138 void setOpenFormButtonVisible(
bool openFormButtonVisible );
153 void setChainFilters(
bool chainFilters );
165 void showIndeterminateState();
172 bool allowAddFeatures()
const;
179 void setAllowAddFeatures(
bool allowAddFeatures );
192 void setFormFeature(
const QgsFeature &formFeature );
199 void mapIdentification();
202 void deleteForeignKeys();
205 void showEvent( QShowEvent *e )
override;
215 Q_DECL_DEPRECATED
void foreignKeyChanged(
const QVariant & )
SIP_DEPRECATED;
221 void foreignKeysChanged(
const QVariantList & );
224 void highlightActionTriggered( QAction *action );
225 void deleteHighlight();
226 void comboReferenceChanged(
int index );
227 void featureIdentified(
const QgsFeature &feature );
230 void mapToolDeactivated();
231 void filterChanged();
233 void updateAddEntryButton();
235 void onKeyPressed( QKeyEvent *e );
245 void updateAttributeEditorFrame(
const QgsFeature &feature );
246 void disableChainedComboBoxes(
const QComboBox *cb );
247 void emitForeignKeysChanged(
const QVariantList &foreignKeys,
bool force =
false );
253 QVariantList mForeignKeys;
257 QStringList mReferencedFields;
258 bool mAllowNull =
true;
268 QList<QComboBox *> mFilterComboBoxes;
269 QWidget *mWindowWidget =
nullptr;
272 bool mIsEditable =
true;
273 QStringList mFilterFields;
274 QMap<QString, QMap<QString, QSet<QString> > > mFilterCache;
275 bool mInitialized =
false;
278 bool mEmbedForm =
false;
279 bool mReadOnlySelector =
false;
280 bool mAllowMapIdentification =
false;
281 bool mOrderByValue =
false;
282 bool mOpenFormButtonVisible =
true;
283 bool mChainFilters =
false;
284 bool mAllowAddFeatures =
false;
287 QVBoxLayout *mTopLayout =
nullptr;
288 QToolButton *mMapIdentificationButton =
nullptr;
289 QToolButton *mRemoveFKButton =
nullptr;
290 QToolButton *mOpenFormButton =
nullptr;
291 QToolButton *mHighlightFeatureButton =
nullptr;
292 QToolButton *mAddEntryButton =
nullptr;
293 QAction *mHighlightFeatureAction =
nullptr;
294 QAction *mScaleHighlightFeatureAction =
nullptr;
295 QAction *mPanHighlightFeatureAction =
nullptr;
296 QWidget *mChooserContainer =
nullptr;
297 QWidget *mFilterContainer =
nullptr;
298 QHBoxLayout *mFilterLayout =
nullptr;
300 QVBoxLayout *mAttributeEditorLayout =
nullptr;
301 QLineEdit *mLineEdit =
nullptr;
302 QLabel *mInvalidLabel =
nullptr;
304 friend class TestQgsRelationReferenceWidget;
307 #endif // QGSRELATIONREFERENCEWIDGET_H
This offers a combobox with autocompleter that allows selecting features from a layer.
A groupbox that collapses/expands when toggled and can save its collapsed and checked states...
This class contains context information for attribute editor widgets.
A bar for displaying non-blocking messages to the user.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Map canvas is a class for displaying all GIS data types on a canvas.
A class for highlight features on the map.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Represents a vector layer which manages a vector based data sets.