1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 22:53:50 +00:00

Resolved compile issues, but not fully working.

This commit is contained in:
cc9cii 2015-03-06 14:36:13 +11:00
parent fb2ba7610c
commit 6d6ff8c6a4
5 changed files with 51 additions and 51 deletions

View file

@ -353,7 +353,7 @@ std::pair< int, int > CSMWorld::IdTable::unfoldIndexAdress (unsigned int id) con
--id; --id;
int row = id / this->columnCount(); int row = id / this->columnCount();
int column = id - row * this->columnCount(); int column = id - row * this->columnCount();
return std::make_pair<int, int>(row, column); return std::make_pair (row, column);
} }
bool CSMWorld::IdTable::hasChildren(const QModelIndex& index) const bool CSMWorld::IdTable::hasChildren(const QModelIndex& index) const

View file

@ -281,7 +281,7 @@ QWidget* CSVWorld::DialogueDelegateDispatcher::makeEditor(CSMWorld::ColumnBase::
connect(proxy, SIGNAL(tableMimeDataDropped(QWidget*, const QModelIndex&, const CSMWorld::UniversalId&, const CSMDoc::Document*)), connect(proxy, SIGNAL(tableMimeDataDropped(QWidget*, const QModelIndex&, const CSMWorld::UniversalId&, const CSMDoc::Document*)),
this, SIGNAL(tableMimeDataDropped(QWidget*, const QModelIndex&, const CSMWorld::UniversalId&, const CSMDoc::Document*))); this, SIGNAL(tableMimeDataDropped(QWidget*, const QModelIndex&, const CSMWorld::UniversalId&, const CSMDoc::Document*)));
skip = true; //skip = true;
} }
else if (qobject_cast<QCheckBox*>(editor)) else if (qobject_cast<QCheckBox*>(editor))
{ {
@ -298,7 +298,7 @@ QWidget* CSVWorld::DialogueDelegateDispatcher::makeEditor(CSMWorld::ColumnBase::
else if (qobject_cast<QAbstractSpinBox*>(editor)) else if (qobject_cast<QAbstractSpinBox*>(editor))
{ {
connect(editor, SIGNAL(editingFinished()), proxy, SLOT(editorDataCommited())); connect(editor, SIGNAL(editingFinished()), proxy, SLOT(editorDataCommited()));
} //lisp cond pairs would be nice in the C++ }
connect(proxy, SIGNAL(editorDataCommited(QWidget*, const QModelIndex&, CSMWorld::ColumnBase::Display)), connect(proxy, SIGNAL(editorDataCommited(QWidget*, const QModelIndex&, CSMWorld::ColumnBase::Display)),
this, SLOT(editorDataCommited(QWidget*, const QModelIndex&, CSMWorld::ColumnBase::Display))); this, SLOT(editorDataCommited(QWidget*, const QModelIndex&, CSMWorld::ColumnBase::Display)));
@ -328,8 +328,8 @@ CSVWorld::EditWidget::~EditWidget()
} }
} }
CSVWorld::EditWidget::EditWidget(QWidget *parent, int row, CSMWorld::IdTable* table, QUndoStack& undoStack, bool createAndDelete) : CSVWorld::EditWidget::EditWidget(QWidget *parent, int row, CSMWorld::IdTable* table, CSMDoc::Document& document, bool createAndDelete) :
mDispatcher(this, table, undoStack), mDispatcher(this, table, document),
QScrollArea(parent), QScrollArea(parent),
mWidgetMapper(NULL), mWidgetMapper(NULL),
mMainWidget(NULL), mMainWidget(NULL),
@ -402,7 +402,7 @@ void CSVWorld::EditWidget::remake(int row)
{ {
mNestedModels.push_back(new CSMWorld::NestedTableModel (mTable->index(row, i), display, mTable)); mNestedModels.push_back(new CSMWorld::NestedTableModel (mTable->index(row, i), display, mTable));
NestedTable* table = new NestedTable(mUndoStack, *(mNestedModels.rbegin()), this); NestedTable* table = new NestedTable(mDocument, *(mNestedModels.rbegin()), this);
tablesLayout->addWidget(table); tablesLayout->addWidget(table);
} else } else
@ -517,7 +517,7 @@ CSVWorld::DialogueSubView::DialogueSubView (const CSMWorld::UniversalId& id, CSM
mMainLayout = new QVBoxLayout(mainWidget); mMainLayout = new QVBoxLayout(mainWidget);
mEditWidget = new EditWidget(mainWidget, mTable->getModelIndex(mCurrentId, 0).row(), mTable, mUndoStack, false); mEditWidget = new EditWidget(mainWidget, mTable->getModelIndex(mCurrentId, 0).row(), mTable, document, false);
connect(mEditWidget, SIGNAL(tableMimeDataDropped(QWidget*, const QModelIndex&, const CSMWorld::UniversalId&, const CSMDoc::Document*)), connect(mEditWidget, SIGNAL(tableMimeDataDropped(QWidget*, const QModelIndex&, const CSMWorld::UniversalId&, const CSMDoc::Document*)),
this, SLOT(tableMimeDataDropped(QWidget*, const QModelIndex&, const CSMWorld::UniversalId&, const CSMDoc::Document*))); this, SLOT(tableMimeDataDropped(QWidget*, const QModelIndex&, const CSMWorld::UniversalId&, const CSMDoc::Document*)));

View file

@ -123,7 +123,7 @@ namespace CSVWorld
public: public:
DialogueDelegateDispatcher(QObject* parent, DialogueDelegateDispatcher(QObject* parent,
CSMWorld::IdTable* table, CSMWorld::IdTable* table,
QUndoStack& undoStack); CSMDoc::Document& document);
~DialogueDelegateDispatcher(); ~DialogueDelegateDispatcher();
@ -175,7 +175,7 @@ namespace CSVWorld
public: public:
EditWidget (QWidget *parent, int row, CSMWorld::IdTable* table, EditWidget (QWidget *parent, int row, CSMWorld::IdTable* table,
QUndoStack& undoStack, bool createAndDelete = false); CSMDoc::Document& document, bool createAndDelete = false);
virtual ~EditWidget(); virtual ~EditWidget();

View file

@ -9,11 +9,11 @@
#include <QMenu> #include <QMenu>
#include <QDebug> #include <QDebug>
CSVWorld::NestedTable::NestedTable(QUndoStack& undoStack, CSVWorld::NestedTable::NestedTable(CSMDoc::Document& document,
CSMWorld::NestedTableModel* model, CSMWorld::NestedTableModel* model,
QWidget* parent) QWidget* parent)
: QTableView(parent), : QTableView(parent),
mUndoStack(undoStack), mUndoStack(document.getUndoStack()),
mModel(model) mModel(model)
{ {
@ -31,7 +31,7 @@ CSVWorld::NestedTable::NestedTable(QUndoStack& undoStack,
model->headerData (i, Qt::Horizontal, CSMWorld::ColumnBase::Role_Display).toInt()); model->headerData (i, Qt::Horizontal, CSMWorld::ColumnBase::Role_Display).toInt());
CommandDelegate *delegate = CommandDelegateFactoryCollection::get().makeDelegate(display, CommandDelegate *delegate = CommandDelegateFactoryCollection::get().makeDelegate(display,
undoStack, document,
this); this);
setItemDelegateForColumn(i, delegate); setItemDelegateForColumn(i, delegate);

View file

@ -31,7 +31,7 @@ namespace CSVWorld
CSMWorld::NestedTableModel* mModel; CSMWorld::NestedTableModel* mModel;
public: public:
NestedTable(QUndoStack& undoStack, NestedTable(CSMDoc::Document& document,
CSMWorld::NestedTableModel* model, CSMWorld::NestedTableModel* model,
QWidget* parent = NULL); QWidget* parent = NULL);