Exemplo n.º 1
0
CSVWorld::InfoCreator::InfoCreator (CSMWorld::Data& data, QUndoStack& undoStack,
    const CSMWorld::UniversalId& id)
: GenericCreator (data, undoStack, id)
{
    QLabel *label = new QLabel ("Topic", this);
    insertBeforeButtons (label, false);

    mTopic = new QLineEdit (this);
    insertBeforeButtons (mTopic, true);

    setManualEditing (false);

    connect (mTopic, SIGNAL (textChanged (const QString&)), this, SLOT (topicChanged()));
}
Exemplo n.º 2
0
CSVWorld::InfoCreator::InfoCreator (CSMWorld::Data& data, QUndoStack& undoStack,
    const CSMWorld::UniversalId& id, CSMWorld::IdCompletionManager& completionManager)
: GenericCreator (data, undoStack, id)
{
    QLabel *label = new QLabel ("Topic", this);
    insertBeforeButtons (label, false);

    CSMWorld::ColumnBase::Display displayType = CSMWorld::ColumnBase::Display_Topic;
    if (getCollectionId().getType() == CSMWorld::UniversalId::Type_JournalInfos)
    {
        displayType = CSMWorld::ColumnBase::Display_Journal;
    }
    mTopic = new CSVWidget::DropLineEdit(displayType, this);
    mTopic->setCompleter(completionManager.getCompleter(displayType).get());
    insertBeforeButtons (mTopic, true);

    setManualEditing (false);

    connect (mTopic, SIGNAL (textChanged (const QString&)), this, SLOT (topicChanged()));
}
Exemplo n.º 3
0
CSVWorld::StartScriptCreator::StartScriptCreator(
    CSMWorld::Data &data,
    QUndoStack &undoStack,
    const CSMWorld::UniversalId &id,
    CSMWorld::IdCompletionManager& completionManager
) : GenericCreator(data, undoStack, id, true)
{
    setManualEditing(false);

    // Add script ID input label.
    QLabel *label = new QLabel("Script ID", this);
    insertBeforeButtons(label, false);

    // Add script ID input with auto-completion.
    CSMWorld::ColumnBase::Display displayType = CSMWorld::ColumnBase::Display_Script;
    mScript = new CSVWidget::DropLineEdit(displayType, this);
    mScript->setCompleter(completionManager.getCompleter(displayType).get());
    insertBeforeButtons(mScript, true);

    connect(mScript, SIGNAL (textChanged(const QString&)), this, SLOT (scriptChanged()));
}
Exemplo n.º 4
0
CSVWorld::ReferenceableCreator::ReferenceableCreator (CSMWorld::Data& data, QUndoStack& undoStack,
    const CSMWorld::UniversalId& id)
: GenericCreator (data, undoStack, id)
{
    QLabel *label = new QLabel ("Type", this);
    insertBeforeButtons (label, false);

    std::vector<CSMWorld::UniversalId::Type> types = CSMWorld::UniversalId::listReferenceableTypes();

    mType = new QComboBox (this);

    for (std::vector<CSMWorld::UniversalId::Type>::const_iterator iter (types.begin());
         iter!=types.end(); ++iter)
    {
        CSMWorld::UniversalId id (*iter, "");

        mType->addItem (QIcon (id.getIcon().c_str()), id.getTypeName().c_str(),
            static_cast<int> (id.getType()));
    }

    insertBeforeButtons (mType, false);
}