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"
45class QgsAttributeFormContainerEdit;
46class QgsAttributeTypeDialog;
47class QgsAttributeWidgetEdit;
61 DnDTreeRole = Qt::UserRole,
73 bool forceSuppressFormPopup =
false;
94 bool drawLine =
false;
120 DnDTreeItemData(
Type type,
const QString &name,
const QString &displayName,
const QColor &backgroundColor = QColor() )
123 , mDisplayName( displayName )
124 , mBackgroundColor( backgroundColor )
127 QString
name()
const {
return mName; }
128 void setName(
const QString &name ) { mName = name; }
131 void setDisplayName(
const QString &displayName ) { mDisplayName = displayName; }
136 operator QVariant() {
return QVariant::fromValue<DnDTreeItemData>( *
this ); }
190 bool showLabel()
const;
191 void setShowLabel(
bool showLabel );
284 QColor backgroundColor()
const;
285 void setBackgroundColor(
const QColor &backgroundColor );
302 QString mDisplayName;
303 int mColumnCount = 1;
305 bool mShowLabel =
true;
306 int mHorizontalStretch = 0;
307 int mVerticalStretch = 0;
314 QColor mBackgroundColor;
315 bool mCollapsed =
false;
329 bool mEditable =
true;
330 bool mEditableEnabled =
true;
331 bool mLabelOnTop =
false;
332 bool mReuseLastValues =
false;
334 QPushButton *mButton =
nullptr;
359 void initAvailableWidgetsTree();
360 void initFormLayoutTree();
361 void initLayoutConfig();
362 void initInitPython();
363 void initSuppressCombo();
376 QgsAttributeWidgetEdit *mAttributeWidgetEdit =
nullptr;
377 QgsAttributeTypeDialog *mAttributeTypeDialog =
nullptr;
378 QgsAttributeFormContainerEdit *mAttributeContainerEdit =
nullptr;
379 QLabel *mInfoTextWidget =
nullptr;
383 void onInvertSelectionButtonClicked(
bool checked );
385 void onAttributeSelectionChanged();
386 void onFormLayoutSelectionChanged();
390 void clearAttributeTypeFrame();
392 void loadAttributeWidgetEdit();
393 void storeAttributeWidgetEdit();
395 void loadAttributeTypeDialog();
396 void storeAttributeTypeDialog( );
398 void storeAttributeContainerEdit();
399 void loadAttributeContainerEdit();
401 void loadInfoWidget(
const QString &infoText );
406 QString mInitFunction;
407 QString mInitFilePath;
412 void removeTabOrGroupButton();
413 void mEditorLayoutComboBox_currentIndexChanged(
int index );
414 void pbnSelectEditForm_clicked();
415 void mTbInitCode_clicked();
468 void dragMoveEvent( QDragMoveEvent *event )
override;
469 void dropEvent( QDropEvent *event )
override;
470 bool dropMimeData( QTreeWidgetItem *parent,
int index,
const QMimeData *data, Qt::DropAction action )
override;
475 QStringList mimeTypes()
const override;
477#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
478 QMimeData *mimeData(
const QList<QTreeWidgetItem *> items )
const override;
480 QMimeData *mimeData(
const QList<QTreeWidgetItem *> &items )
const override;
484 void onItemDoubleClicked( QTreeWidgetItem *item,
int column );
488 Type mType = QgsAttributesDnDTree::Type::Drag;
AttributeEditorContainerType
Attribute editor container types.
AttributeFormPythonInitCodeSource
The Python init code source for attribute forms.
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.