16#ifndef QGSATTRIBUTESFORMPROPERTIES_H
17#define QGSATTRIBUTESFORMPROPERTIES_H
24#include <QTableWidget>
28#include <QTreeWidgetItem>
30#include <QTableWidgetItem>
35#include <QPlainTextEdit>
37#include "ui_qgsattributesformproperties.h"
53class QgsAttributeFormContainerEdit;
54class QgsAttributeTypeDialog;
55class QgsAttributeWidgetEdit;
69 DnDTreeRole = Qt::UserRole,
81 bool forceSuppressFormPopup =
false;
102 bool drawLine =
false;
128 DnDTreeItemData(
Type type,
const QString &name,
const QString &displayName,
const QColor &backgroundColor = QColor() )
131 , mDisplayName( displayName )
132 , mBackgroundColor( backgroundColor )
135 QString
name()
const {
return mName; }
136 void setName(
const QString &name ) { mName = name; }
139 void setDisplayName(
const QString &displayName ) { mDisplayName = displayName; }
144 operator QVariant() {
return QVariant::fromValue<DnDTreeItemData>( *
this ); }
149 bool showAsGroupBox()
const;
150 void setShowAsGroupBox(
bool showAsGroupBox );
185 bool showLabel()
const;
186 void setShowLabel(
bool showLabel );
239 QColor backgroundColor()
const;
240 void setBackgroundColor(
const QColor &backgroundColor );
257 QString mDisplayName;
258 int mColumnCount = 1;
259 bool mShowAsGroupBox =
false;
260 bool mShowLabel =
true;
267 QColor mBackgroundColor;
268 bool mCollapsed =
false;
282 bool mEditable =
true;
283 bool mEditableEnabled =
true;
284 bool mLabelOnTop =
false;
285 bool mReuseLastValues =
false;
287 QPushButton *mButton =
nullptr;
309 void initAvailableWidgetsTree();
310 void initFormLayoutTree();
311 void initLayoutConfig();
312 void initInitPython();
313 void initSuppressCombo();
326 QgsAttributeWidgetEdit *mAttributeWidgetEdit =
nullptr;
327 QgsAttributeTypeDialog *mAttributeTypeDialog =
nullptr;
328 QgsAttributeFormContainerEdit *mAttributeContainerEdit =
nullptr;
329 QLabel *mInfoTextWidget =
nullptr;
333 void onInvertSelectionButtonClicked(
bool checked );
335 void onAttributeSelectionChanged();
336 void onFormLayoutSelectionChanged();
340 void clearAttributeTypeFrame();
342 void loadAttributeWidgetEdit();
343 void storeAttributeWidgetEdit();
345 void loadAttributeTypeDialog();
346 void storeAttributeTypeDialog( );
348 void storeAttributeContainerEdit();
349 void loadAttributeContainerEdit();
351 void loadInfoWidget(
const QString &infoText );
356 QString mInitFunction;
357 QString mInitFilePath;
361 void addTabOrGroupButton();
362 void removeTabOrGroupButton();
363 void mEditorLayoutComboBox_currentIndexChanged(
int index );
364 void pbnSelectEditForm_clicked();
365 void mTbInitCode_clicked();
396 QTreeWidgetItem *addContainer( QTreeWidgetItem *parent,
const QString &title,
int columnCount );
412 void dragMoveEvent( QDragMoveEvent *event )
override;
413 void dropEvent( QDropEvent *event )
override;
414 bool dropMimeData( QTreeWidgetItem *parent,
int index,
const QMimeData *data, Qt::DropAction action )
override;
419 QStringList mimeTypes()
const override;
421#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
422 QMimeData *mimeData(
const QList<QTreeWidgetItem *> items )
const override;
424 QMimeData *mimeData(
const QList<QTreeWidgetItem *> &items )
const override;
428 void onItemDoubleClicked( QTreeWidgetItem *item,
int column );
432 Type mType = QgsAttributesDnDTree::Type::Drag;
FieldDomainSplitPolicy
Split policy for field domains.
@ Duplicate
Duplicate original value.
This is an abstract base class for any elements of a drag and drop form.
This class overrides mime type handling to be able to work with the drag and drop attribute editor.
Abstract interface for generating an expression context.
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Stores information about constraints which may be present on a field.
An expression with an additional enabled flag.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
Represents a vector layer which manages a vector based data sets.
Q_DECLARE_METATYPE(QgsDatabaseQueryLogEntry)
The TabStyle struct defines color and font overrides for form fields, tabs and groups labels.