16 #ifndef QGSATTRIBUTESFORMPROPERTIES_H 
   17 #define QGSATTRIBUTESFORMPROPERTIES_H 
   23 #include <QPushButton> 
   24 #include <QTableWidget> 
   25 #include <QTreeWidget> 
   28 #include <QTreeWidgetItem> 
   30 #include <QTableWidgetItem> 
   31 #include <QMessageBox> 
   32 #include <QFileDialog> 
   33 #include <QHBoxLayout> 
   34 #include <QFormLayout> 
   35 #include <QPlainTextEdit> 
   37 #include "ui_qgsattributesformproperties.h" 
   53 class QgsAttributeFormContainerEdit;
 
   54 class QgsAttributeTypeDialog;
 
   55 class QgsAttributeWidgetEdit;
 
   69       DnDTreeRole = Qt::UserRole,
 
   81       bool forceSuppressFormPopup = 
false;
 
  116         DnDTreeItemData( 
Type type, 
const QString &name, 
const QString &displayName, 
const QColor &backgroundColor = QColor() )
 
  119           , mDisplayName( displayName )
 
  120           , mBackgroundColor( backgroundColor )
 
  123         QString 
name()
 const { 
return mName; }
 
  124         void setName( 
const QString &name ) { mName = name; }
 
  127         void setDisplayName( 
const QString &displayName ) { mDisplayName = displayName; }
 
  132         operator QVariant() { 
return QVariant::fromValue<DnDTreeItemData>( *
this ); }
 
  137         bool showAsGroupBox() 
const;
 
  138         void setShowAsGroupBox( 
bool showAsGroupBox );
 
  140         bool showLabel() 
const;
 
  141         void setShowLabel( 
bool showLabel );
 
  155         QColor backgroundColor() 
const;
 
  156         void setBackgroundColor( 
const QColor &backgroundColor );
 
  161         QString mDisplayName;
 
  162         int mColumnCount = 1;
 
  163         bool mShowAsGroupBox = 
false;
 
  164         bool mShowLabel = 
true;
 
  169         QColor mBackgroundColor;
 
  181       bool mEditable = 
true;
 
  182       bool mEditableEnabled = 
true;
 
  183       bool mLabelOnTop = 
false;
 
  184       bool mReuseLastValues = 
false;
 
  186       QPushButton *mButton = 
nullptr;
 
  207     void initAvailableWidgetsTree();
 
  208     void initFormLayoutTree();
 
  209     void initLayoutConfig();
 
  210     void initInitPython();
 
  211     void initSuppressCombo();
 
  224     QgsAttributeWidgetEdit *mAttributeWidgetEdit = 
nullptr;
 
  225     QgsAttributeTypeDialog *mAttributeTypeDialog = 
nullptr;
 
  226     QgsAttributeFormContainerEdit *mAttributeContainerEdit = 
nullptr;
 
  227     QLabel *mInfoTextWidget = 
nullptr;
 
  231     void onInvertSelectionButtonClicked( 
bool checked );
 
  233     void onAttributeSelectionChanged();
 
  234     void onFormLayoutSelectionChanged();
 
  238     void clearAttributeTypeFrame();
 
  240     void loadAttributeWidgetEdit();
 
  241     void storeAttributeWidgetEdit();
 
  243     void loadAttributeTypeDialog();
 
  244     void storeAttributeTypeDialog( );
 
  246     void storeAttributeContainerEdit();
 
  247     void loadAttributeContainerEdit();
 
  249     void loadInfoWidget( 
const QString &infoText );
 
  252     QString mInitFunction;
 
  253     QString mInitFilePath;
 
  259     void addTabOrGroupButton();
 
  260     void removeTabOrGroupButton();
 
  261     void mEditorLayoutComboBox_currentIndexChanged( 
int index );
 
  262     void pbnSelectEditForm_clicked();
 
  263     void mTbInitCode_clicked();
 
  294     QTreeWidgetItem *addContainer( QTreeWidgetItem *parent, 
const QString &title, 
int columnCount );
 
  310     void dragMoveEvent( QDragMoveEvent *event ) 
override;
 
  311     void dropEvent( QDropEvent *event ) 
override;
 
  312     bool dropMimeData( QTreeWidgetItem *parent, 
int index, 
const QMimeData *data, Qt::DropAction action ) 
override;
 
  317     QStringList mimeTypes() 
const override;
 
  319 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) 
  320     QMimeData *mimeData( 
const QList<QTreeWidgetItem *> items ) 
const override;
 
  322     QMimeData *mimeData( 
const QList<QTreeWidgetItem *> &items ) 
const override;
 
  326     void onItemDoubleClicked( QTreeWidgetItem *item, 
int column );
 
  330     Type mType = QgsAttributesDnDTree::Type::Drag;
 
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(QgsMeshTimeSettings)