1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 08:49:55 +00:00
openmw-tes3mp/apps/opencs/view/world/nestedtable.cpp

36 lines
1.2 KiB
C++
Raw Normal View History

2014-06-29 19:12:31 +00:00
#include "nestedtable.hpp"
#include "../../model/world/nestedtablemodel.hpp"
#include "../../model/world/universalid.hpp"
#include "util.hpp"
2014-06-29 19:12:31 +00:00
CSVWorld::NestedTable::NestedTable(QUndoStack& undoStack,
CSMWorld::NestedTableModel* model,
QWidget* parent)
2014-06-29 19:12:31 +00:00
: QTableView(parent)
{
setModel(model);
2014-06-29 19:12:31 +00:00
setAcceptDrops(true);
int columns = model->columnCount(QModelIndex());
2014-06-29 19:12:31 +00:00
for(int i = 0 ; i < columns; ++i)
{
CSMWorld::ColumnBase::Display display = static_cast<CSMWorld::ColumnBase::Display> (
model->headerData (i, Qt::Horizontal, CSMWorld::ColumnBase::Role_Display).toInt());
2014-06-29 19:12:31 +00:00
CommandDelegate *delegate = CommandDelegateFactoryCollection::get().makeDelegate(display,
undoStack,
2014-06-29 19:12:31 +00:00
this);
setItemDelegateForColumn(i, delegate);
2014-06-29 19:12:31 +00:00
}
}
void CSVWorld::NestedTable::dragEnterEvent(QDragEnterEvent *event)
{
}
void CSVWorld::NestedTable::dragMoveEvent(QDragMoveEvent *event)
{
}