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;
60 DnDTreeRole = Qt::UserRole,
72 bool forceSuppressFormPopup =
false;
93 bool drawLine =
false;
119 DnDTreeItemData(
Type type,
const QString &name,
const QString &displayName,
const QColor &backgroundColor = QColor() )
122 , mDisplayName( displayName )
123 , mBackgroundColor( backgroundColor )
126 QString
name()
const {
return mName; }
127 void setName(
const QString &name ) { mName = name; }
130 void setDisplayName(
const QString &displayName ) { mDisplayName = displayName; }
135 operator QVariant() {
return QVariant::fromValue<DnDTreeItemData>( *
this ); }
189 bool showLabel()
const;
190 void setShowLabel(
bool showLabel );
316 QColor backgroundColor()
const;
317 void setBackgroundColor(
const QColor &backgroundColor );
334 QString mDisplayName;
335 int mColumnCount = 1;
337 bool mShowLabel =
true;
338 int mHorizontalStretch = 0;
339 int mVerticalStretch = 0;
346 QColor mBackgroundColor;
347 bool mCollapsed =
false;
361 bool mEditable =
true;
362 bool mLabelOnTop =
false;
363 bool mReuseLastValues =
false;
365 QPushButton *mButton =
nullptr;
400 void initAvailableWidgetsTree();
401 void initFormLayoutTree();
402 void initLayoutConfig();
403 void initInitPython();
404 void initSuppressCombo();
417 QgsAttributeWidgetEdit *mAttributeWidgetEdit =
nullptr;
418 QgsAttributeTypeDialog *mAttributeTypeDialog =
nullptr;
419 QgsAttributeFormContainerEdit *mAttributeContainerEdit =
nullptr;
420 QLabel *mInfoTextWidget =
nullptr;
424 void removeTabOrGroupButton();
425 void mEditorLayoutComboBox_currentIndexChanged(
int index );
426 void pbnSelectEditForm_clicked();
427 void mTbInitCode_clicked();
429 void onInvertSelectionButtonClicked(
bool checked );
431 void onAttributeSelectionChanged();
432 void onFormLayoutSelectionChanged();
434 void updatedFields();
438 void clearAttributeTypeFrame();
440 void loadAttributeWidgetEdit();
441 void storeAttributeWidgetEdit();
443 void loadAttributeTypeDialog();
444 void storeAttributeTypeDialog();
446 void storeAttributeContainerEdit();
447 void loadAttributeContainerEdit();
449 void loadInfoWidget(
const QString &infoText );
454 QString mInitFunction;
455 QString mInitFilePath;
457 int mBlockUpdates = 0;
510 void dragMoveEvent( QDragMoveEvent *event )
override;
511 void dropEvent( QDropEvent *event )
override;
512 bool dropMimeData( QTreeWidgetItem *parent,
int index,
const QMimeData *data, Qt::DropAction action )
override;
517 QStringList mimeTypes()
const override;
519#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
520 QMimeData *mimeData(
const QList<QTreeWidgetItem *> items )
const override;
522 QMimeData *mimeData(
const QList<QTreeWidgetItem *> &items )
const override;
526 void onItemDoubleClicked( QTreeWidgetItem *item,
int column );
AttributeEditorContainerType
Attribute editor container types.
AttributeFormPythonInitCodeSource
The Python init code source for attribute forms.
@ NoSource
Do not use Python code at all.
FieldDomainSplitPolicy
Split policy for field domains.
@ Duplicate
Duplicate original value.
FieldDuplicatePolicy
Duplicate policy for fields.
@ 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.