|
|
|
@ -228,6 +228,8 @@ CSVWorld::Table::Table (const CSMWorld::UniversalId& id, CSMWorld::Data& data, Q
|
|
|
|
|
|
|
|
|
|
connect (selectionModel(), SIGNAL (selectionChanged (const QItemSelection&, const QItemSelection&)),
|
|
|
|
|
this, SLOT (selectionSizeUpdate ()));
|
|
|
|
|
|
|
|
|
|
setAcceptDrops(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVWorld::Table::setEditLock (bool locked)
|
|
|
|
@ -446,5 +448,28 @@ void CSVWorld::Table::mouseMoveEvent (QMouseEvent* event)
|
|
|
|
|
drag->setMimeData (mime);
|
|
|
|
|
drag->setPixmap (QString::fromStdString (mime->getIcon()));
|
|
|
|
|
drag->exec();
|
|
|
|
|
std::cout << "startdrag";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVWorld::Table::dragEnterEvent(QDragEnterEvent *event)
|
|
|
|
|
{
|
|
|
|
|
//if (event->mimeData()->hasFormat("text/plain"))
|
|
|
|
|
std::cout << "accept drag event";
|
|
|
|
|
event->acceptProposedAction();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVWorld::Table::dropEvent(QDropEvent *event)
|
|
|
|
|
{
|
|
|
|
|
std::cout << "drop";
|
|
|
|
|
event->acceptProposedAction();
|
|
|
|
|
QModelIndex index = indexAt(event->pos());
|
|
|
|
|
std::cout << index.row();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVWorld::Table::dragMoveEvent(QDragMoveEvent *event)
|
|
|
|
|
{
|
|
|
|
|
event->accept();
|
|
|
|
|
}
|