15 #ifndef QGSVECTORLAYERJOININFO_H
16 #define QGSVECTORLAYERJOININFO_H
20 #include <QStringList>
48 void setJoinLayerId(
const QString &layerId ) { mJoinLayerRef =
QgsVectorLayerRef( layerId ); }
50 QString joinLayerId()
const {
return mJoinLayerRef.layerId; }
53 void setTargetFieldName(
const QString &fieldName ) { mTargetFieldName = fieldName; }
55 QString targetFieldName()
const {
return mTargetFieldName; }
58 void setJoinFieldName(
const QString &fieldName ) { mJoinFieldName = fieldName; }
60 QString joinFieldName()
const {
return mJoinFieldName; }
63 void setPrefix(
const QString &prefix ) { mPrefix = prefix; }
65 QString prefix()
const {
return mPrefix; }
68 void setUsingMemoryCache(
bool enabled );
74 bool isUsingMemoryCache()
const;
81 bool isDynamicFormEnabled()
const {
return mDynamicForm; }
88 void setDynamicFormEnabled(
bool enabled ) { mDynamicForm = enabled; }
95 bool isEditable()
const {
return mEditable; }
101 void setEditable(
bool enabled );
108 bool hasUpsertOnEdit()
const {
return mUpsertOnEdit; }
115 void setUpsertOnEdit(
bool enabled ) { mUpsertOnEdit = enabled; }
122 bool hasCascadedDelete()
const {
return mCascadedDelete; }
129 void setCascadedDelete(
bool enabled ) { mCascadedDelete = enabled; }
153 Q_DECL_DEPRECATED
void setJoinFieldNamesBlackList(
const QStringList &blackList )
SIP_DEPRECATED { mBlockList = blackList; }
160 Q_DECL_DEPRECATED QStringList joinFieldNamesBlackList() const
SIP_DEPRECATED {
return mBlockList; }
168 void setJoinFieldNamesBlockList(
const QStringList &list ) { mBlockList = list; }
176 QStringList joinFieldNamesBlockList()
const {
return mBlockList; }
184 bool hasSubset(
bool blocklisted =
true )
const;
212 void setJoinFieldNamesSubset( QStringList *fieldNamesSubset
SIP_TRANSFER ) { mJoinFieldsSubset = std::shared_ptr<QStringList>( fieldNamesSubset ); }
223 QStringList *joinFieldNamesSubset()
const {
return mJoinFieldsSubset.get(); }
227 QString mTargetFieldName;
231 QString mJoinFieldName;
240 bool mMemoryCache =
false;
243 std::shared_ptr<QStringList> mJoinFieldsSubset;
251 bool cacheDirty =
true;
253 bool mDynamicForm =
false;
255 bool mEditable =
false;
257 bool mUpsertOnEdit =
false;
259 bool mCascadedDelete =
false;
261 QStringList mBlockList;
264 QHash< QString, QgsAttributes> cachedAttributes;
269 #endif // QGSVECTORLAYERJOININFO_H