mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Enable the drag and drop inside the new element panel
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4284 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -197,10 +197,21 @@ bool ElementsCollectionModel::dropMimeData(const QMimeData *data, Qt::DropAction
|
||||
QStringList ElementsCollectionModel::mimeTypes() const
|
||||
{
|
||||
QStringList mime_list = QAbstractItemModel::mimeTypes();
|
||||
mime_list << "application/x-qet-element-uri";
|
||||
mime_list << "application/x-qet-element-uri" << "application/x-qet-category-uri";
|
||||
return mime_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementsCollectionModel::items
|
||||
* @return All items handled by this model. The root item isn't stored in the list
|
||||
*/
|
||||
QList<ElementCollectionItem *> ElementsCollectionModel::items() const
|
||||
{
|
||||
QList <ElementCollectionItem *> list;
|
||||
list.append(m_root_item->items());
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementsCollectionModel::addCommonCollection
|
||||
* Add the common elements collection to this model
|
||||
|
||||
Reference in New Issue
Block a user