mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 07:39:40 +00:00
that would be it
This commit is contained in:
parent
4d79f00e28
commit
19dac9dc86
3 changed files with 52 additions and 3 deletions
|
@ -3,9 +3,17 @@
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
#include <qt4/QtGui/qevent.h>
|
||||||
|
|
||||||
|
#include <boost/algorithm/string.hpp>
|
||||||
|
|
||||||
|
#include <apps/opencs/model/world/tablemimedata.hpp>
|
||||||
|
|
||||||
CSVRender::PagedWorldspaceWidget::PagedWorldspaceWidget (QWidget *parent)
|
CSVRender::PagedWorldspaceWidget::PagedWorldspaceWidget (QWidget *parent)
|
||||||
: WorldspaceWidget (parent)
|
: WorldspaceWidget (parent)
|
||||||
{}
|
{
|
||||||
|
setAcceptDrops(true);
|
||||||
|
}
|
||||||
|
|
||||||
void CSVRender::PagedWorldspaceWidget::useViewHint (const std::string& hint)
|
void CSVRender::PagedWorldspaceWidget::useViewHint (const std::string& hint)
|
||||||
{
|
{
|
||||||
|
@ -44,4 +52,38 @@ void CSVRender::PagedWorldspaceWidget::setCellSelection (const CSMWorld::CellSel
|
||||||
{
|
{
|
||||||
mSelection = selection;
|
mSelection = selection;
|
||||||
emit cellSelectionChanged (mSelection);
|
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;
|
CSMWorld::CellSelection mSelection;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
void dropEvent(QDropEvent* event);
|
||||||
|
|
||||||
|
void dragEnterEvent(QDragEnterEvent *event);
|
||||||
|
|
||||||
|
void dragMoveEvent(QDragMoveEvent *event);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
PagedWorldspaceWidget (QWidget *parent);
|
PagedWorldspaceWidget (QWidget *parent);
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <qt4/QtCore/qabstractitemmodel.h>
|
|
||||||
|
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
#include <QContextMenuEvent>
|
#include <QContextMenuEvent>
|
||||||
|
|
Loading…
Reference in a new issue