QElectroTech
0.70
|
The ElementsTreeView class This class just reimplement startDrag from QTreeView, for set a custom pixmap. This class must be used when the tree view have an ElementsCollectionModel as model. The pixmap used is the pixmap of the dragged element or a directory pixmap. More...
#include <elementstreeview.h>
Public Member Functions | |
ElementsTreeView (QWidget *parent=nullptr) | |
ElementsTreeView::ElementsTreeView. More... | |
Protected Member Functions | |
void | startDrag (Qt::DropActions supportedActions) override |
ElementsTreeView::startDrag Reimplemented from QTreeView. More... | |
virtual void | startElementDrag (const ElementsLocation &location) |
ElementsTreeView::startElementDrag Build a QDrag according to the content of . More... | |
The ElementsTreeView class This class just reimplement startDrag from QTreeView, for set a custom pixmap. This class must be used when the tree view have an ElementsCollectionModel as model. The pixmap used is the pixmap of the dragged element or a directory pixmap.
Definition at line 31 of file elementstreeview.h.
ElementsTreeView::ElementsTreeView | ( | QWidget * | parent = nullptr | ) |
ElementsTreeView::ElementsTreeView.
parent |
Definition at line 35 of file elementstreeview.cpp.
|
overrideprotected |
ElementsTreeView::startDrag Reimplemented from QTreeView.
supportedActions |
Definition at line 44 of file elementstreeview.cpp.
References startElementDrag().
|
protectedvirtual |
ElementsTreeView::startElementDrag Build a QDrag according to the content of .
location | : location to use for create the content of the QDrag |
Definition at line 70 of file elementstreeview.cpp.
References ElementFactory::createElement(), ElementsLocation::exist(), QET::Icons::Folder, Element::hotspot(), ElementFactory::Instance(), ElementsLocation::isDirectory(), ElementsLocation::isElement(), MAX_DND_PIXMAP_HEIGHT, MAX_DND_PIXMAP_WIDTH, Element::pixmap(), and ElementsLocation::toString().
Referenced by startDrag().