mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
that would be it
This commit is contained in:
parent
4d79f00e28
commit
19dac9dc86
@ -3,9 +3,17 @@
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include <qt4/QtGui/qevent.h>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <apps/opencs/model/world/tablemimedata.hpp>
|
||||
|
||||
CSVRender::PagedWorldspaceWidget::PagedWorldspaceWidget (QWidget *parent)
|
||||
: WorldspaceWidget (parent)
|
||||
{}
|
||||
{
|
||||
setAcceptDrops(true);
|
||||
}
|
||||
|
||||
void CSVRender::PagedWorldspaceWidget::useViewHint (const std::string& hint)
|
||||
{
|
||||
@ -44,4 +52,38 @@ void CSVRender::PagedWorldspaceWidget::setCellSelection (const CSMWorld::CellSel
|
||||
{
|
||||
mSelection = selection;
|
||||
emit cellSelectionChanged (mSelection);
|
||||
}
|
||||
}
|
||||
|
||||
void CSVRender::PagedWorldspaceWidget::dragEnterEvent (QDragEnterEvent* event)
|
||||
{
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void CSVRender::PagedWorldspaceWidget::dragMoveEvent (QDragMoveEvent* event)
|
||||
{
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void CSVRender::PagedWorldspaceWidget::dropEvent (QDropEvent* event)
|
||||
{
|
||||
/*
|
||||
const CSMWorld::TableMimeData* mime = dynamic_cast<const CSMWorld::TableMimeData*> (event->mimeData());
|
||||
if (true)
|
||||
{
|
||||
if (mime->holdsType(CSMWorld::UniversalId::Type_Cell))
|
||||
{
|
||||
CSMWorld::UniversalId record(mime->returnMatching (CSMWorld::UniversalId::Type_Cell));
|
||||
QString id(QString::fromUtf8(record.getId().c_str()));
|
||||
if (*id.begin() == '#')
|
||||
{
|
||||
id.remove(0,1);
|
||||
QStringList splited(id.split(' '));
|
||||
int x = splited.begin()->toInt();
|
||||
int y = (splited.begin()+1)->toInt();
|
||||
mSelection.add(CSMWorld::CellCoordinates(x, y));
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
//TODO!
|
||||
}
|
||||
|
@ -13,6 +13,14 @@ namespace CSVRender
|
||||
|
||||
CSMWorld::CellSelection mSelection;
|
||||
|
||||
private:
|
||||
|
||||
void dropEvent(QDropEvent* event);
|
||||
|
||||
void dragEnterEvent(QDragEnterEvent *event);
|
||||
|
||||
void dragMoveEvent(QDragMoveEvent *event);
|
||||
|
||||
public:
|
||||
|
||||
PagedWorldspaceWidget (QWidget *parent);
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include <algorithm>
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <qt4/QtCore/qabstractitemmodel.h>
|
||||
|
||||
#include <QHeaderView>
|
||||
#include <QContextMenuEvent>
|
||||
|
Loading…
x
Reference in New Issue
Block a user