#include "block_tree.h"
#include <QMimeData>


QMimeData * BlockTree::mimeData(const QList<QTreeWidgetItem * > items) const {
	if (items.size() != 1) return 0;
	const QTreeWidgetItem * item = items[0];
	QMimeData * mime = new QMimeData();
	QByteArray data;
	QDataStream(&data, QIODevice::WriteOnly) << item->data(0, Qt::UserRole).toInt() << item->data(0, Qt::UserRole+1).toInt();
	mime->setData(SH_MIME_BlockID, data);
	return mime;
}
