Ejemplo n.º 1
0
void CSVWorld::CellCreator::configureCreateCommand(CSMWorld::CreateCommand& command) const
{
    CSMWorld::IdTree *model = dynamic_cast<CSMWorld::IdTree *>(getData().getTableModel(getCollectionId()));
    Q_ASSERT(model != NULL);
    int parentIndex = model->findColumnIndex(CSMWorld::Columns::ColumnId_Cell);
    int index = model->findNestedColumnIndex(parentIndex, CSMWorld::Columns::ColumnId_Interior);
    command.addNestedValue(parentIndex, index, mType->currentIndex() == 0);
}
Ejemplo n.º 2
0
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);
}
Ejemplo n.º 3
0
void CSVWorld::StartScriptCreator::configureCreateCommand(CSMWorld::CreateCommand& command) const
{
    CSMWorld::IdTable& table = getStartScriptsTable();
    int column = table.findColumnIndex(CSMWorld::Columns::ColumnId_Id);

    // Set script ID to be added to start scripts table.
    command.addValue(column, mScript->text());
}
Ejemplo n.º 4
0
void CSVWorld::InfoCreator::configureCreateCommand (CSMWorld::CreateCommand& command) const
{
    int index =
        dynamic_cast<CSMWorld::IdTable&> (*getData().getTableModel (getCollectionId())).
        findColumnIndex (
        getCollectionId().getType()==CSMWorld::UniversalId::Type_TopicInfos ?
        CSMWorld::Columns::ColumnId_Topic : CSMWorld::Columns::ColumnId_Journal);

    command.addValue (index, mTopic->text());
}
Ejemplo n.º 5
0
void CSVWorld::ReferenceableCreator::configureCreateCommand (CSMWorld::CreateCommand& command) const
{
    command.setType (
        static_cast<CSMWorld::UniversalId::Type> (mType->itemData (mType->currentIndex()).toInt()));
}