| 616 | } |
| 617 | |
| 618 | bool InputEditorModel::dropMimeData(const QMimeData *mimeData, Qt::DropAction action, int row, int column, const QModelIndex &parent) |
| 619 | { |
| 620 | // check if the format is supported |
| 621 | if (!mimeData->hasFormat(mimeType)) |
| 622 | return false; |
| 623 | |
| 624 | const QByteArray encodedData = mimeData->data(mimeType); |
| 625 | QDataStream stream(encodedData); |
| 626 | if (stream.atEnd()) |
| 627 | return false; |
| 628 | |
| 629 | SingleInput si; |
| 630 | |
| 631 | QString description; |
| 632 | stream >> si.type >> si.which >> description; |
| 633 | si.description = description.toStdString(); |
| 634 | addUniqueInput(si); |
| 635 | |
| 636 | return false; |
| 637 | } |
| 638 | |
| 639 | void InputEditorModel::buildInputSet() |
| 640 | { |