QGIS API Documentation
3.22.4-Białowieża (ce8e65e95e)
|
This class overrides mime type handling to be able to work with the drag and drop attribute editor. More...
#include <qgsattributesformproperties.h>
Public Types | |
enum | Type { Drag , Drop } |
Public Slots | |
void | selectFirstMatchingItem (const QgsAttributesFormProperties::DnDTreeItemData &data) |
Public Member Functions | |
QgsAttributesDnDTree (QgsVectorLayer *layer, QWidget *parent=nullptr) | |
QTreeWidgetItem * | addContainer (QTreeWidgetItem *parent, const QString &title, int columnCount) |
QTreeWidgetItem * | addItem (QTreeWidgetItem *parent, QgsAttributesFormProperties::DnDTreeItemData data, int index=-1, const QIcon &icon=QIcon()) |
Adds a new item to a parent. More... | |
void | setType (QgsAttributesDnDTree::Type value) |
Type | type () const |
Protected Member Functions | |
void | dragMoveEvent (QDragMoveEvent *event) override |
Is called when mouse is moved over attributes tree before a drop event. More... | |
void | dropEvent (QDropEvent *event) override |
bool | dropMimeData (QTreeWidgetItem *parent, int index, const QMimeData *data, Qt::DropAction action) override |
QMimeData * | mimeData (const QList< QTreeWidgetItem * > &items) const override |
QStringList | mimeTypes () const override |
This class overrides mime type handling to be able to work with the drag and drop attribute editor.
The mime type is application/x-qgsattributetablefield
Graphical representation for the attribute editor drag and drop editor
Definition at line 282 of file qgsattributesformproperties.h.
Enumerator | |
---|---|
Drag | |
Drop |
Definition at line 296 of file qgsattributesformproperties.h.
|
explicit |
Definition at line 1008 of file qgsattributesformproperties.cpp.
QTreeWidgetItem * QgsAttributesDnDTree::addContainer | ( | QTreeWidgetItem * | parent, |
const QString & | title, | ||
int | columnCount | ||
) |
Definition at line 995 of file qgsattributesformproperties.cpp.
QTreeWidgetItem * QgsAttributesDnDTree::addItem | ( | QTreeWidgetItem * | parent, |
QgsAttributesFormProperties::DnDTreeItemData | data, | ||
int | index = -1 , |
||
const QIcon & | icon = QIcon() |
||
) |
Adds a new item to a parent.
If index is -1, the item is added to the end of the parent's existing children. Otherwise it is inserted at the specified index.
Definition at line 1015 of file qgsattributesformproperties.cpp.
|
overrideprotected |
Is called when mouse is moved over attributes tree before a drop event.
Used to inhibit dropping fields onto the root item.
Definition at line 1055 of file qgsattributesformproperties.cpp.
|
overrideprotected |
Definition at line 1130 of file qgsattributesformproperties.cpp.
|
overrideprotected |
Definition at line 1082 of file qgsattributesformproperties.cpp.
|
overrideprotected |
Definition at line 1151 of file qgsattributesformproperties.cpp.
|
overrideprotected |
Definition at line 1143 of file qgsattributesformproperties.cpp.
|
slot |
Definition at line 1465 of file qgsattributesformproperties.cpp.
void QgsAttributesDnDTree::setType | ( | QgsAttributesDnDTree::Type | value | ) |
Definition at line 1460 of file qgsattributesformproperties.cpp.
QgsAttributesDnDTree::Type QgsAttributesDnDTree::type | ( | ) | const |
Definition at line 1455 of file qgsattributesformproperties.cpp.