1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 11:23:52 +00:00
openmw/apps/opencs/view/world/dialoguecreator.cpp
Bret Curtis 74e7cfc023 remove unused includes: part1
remove unused imports: part2

revert one tidy we will keep for c++20
2022-01-23 17:30:25 +01:00

32 lines
1.2 KiB
C++

#include "dialoguecreator.hpp"
#include <components/esm3/loaddial.hpp>
#include "../../model/world/commands.hpp"
#include "../../model/world/idtable.hpp"
void CSVWorld::DialogueCreator::configureCreateCommand (CSMWorld::CreateCommand& command) const
{
int index =
dynamic_cast<CSMWorld::IdTable&> (*getData().getTableModel (getCollectionId())).
findColumnIndex (CSMWorld::Columns::ColumnId_DialogueType);
command.addValue (index, mType);
}
CSVWorld::DialogueCreator::DialogueCreator (CSMWorld::Data& data, QUndoStack& undoStack,
const CSMWorld::UniversalId& id, int type)
: GenericCreator (data, undoStack, id, true), mType (type)
{}
CSVWorld::Creator *CSVWorld::TopicCreatorFactory::makeCreator (CSMDoc::Document& document,
const CSMWorld::UniversalId& id) const
{
return new DialogueCreator (document.getData(), document.getUndoStack(), id, ESM::Dialogue::Topic);
}
CSVWorld::Creator *CSVWorld::JournalCreatorFactory::makeCreator (CSMDoc::Document& document,
const CSMWorld::UniversalId& id) const
{
return new DialogueCreator (document.getData(), document.getUndoStack(), id, ESM::Dialogue::Journal);
}