drop part of resources drag and drop

deque
Marc Zinnschlag 11 years ago
parent b6c5ee125d
commit 1548f4670a

@ -93,6 +93,12 @@ namespace CSMWorld
Display_BodyPartType,
Display_MeshType,
Display_Gender,
Display_Mesh,
Display_Icon,
Display_Music,
Display_SoundRes,
Display_Texture,
Display_Video,
Display_Colour
};

@ -604,7 +604,7 @@ namespace CSMWorld
struct SoundFileColumn : public Column<ESXRecordT>
{
SoundFileColumn()
: Column<ESXRecordT> (Columns::ColumnId_SoundFile, ColumnBase::Display_Sound)
: Column<ESXRecordT> (Columns::ColumnId_SoundFile, ColumnBase::Display_SoundRes)
{}
virtual QVariant get (const Record<ESXRecordT>& record) const

@ -52,7 +52,7 @@ CSMWorld::RefIdCollection::RefIdCollection()
ModelColumns modelColumns (baseColumns);
mColumns.push_back (RefIdColumn (Columns::ColumnId_Model, ColumnBase::Display_String));
mColumns.push_back (RefIdColumn (Columns::ColumnId_Model, ColumnBase::Display_Mesh));
modelColumns.mModel = &mColumns.back();
NameColumns nameColumns (modelColumns);
@ -64,7 +64,7 @@ CSMWorld::RefIdCollection::RefIdCollection()
InventoryColumns inventoryColumns (nameColumns);
mColumns.push_back (RefIdColumn (Columns::ColumnId_Icon, ColumnBase::Display_String));
mColumns.push_back (RefIdColumn (Columns::ColumnId_Icon, ColumnBase::Display_Icon));
inventoryColumns.mIcon = &mColumns.back();
mColumns.push_back (RefIdColumn (Columns::ColumnId_Weight, ColumnBase::Display_Float));
inventoryColumns.mWeight = &mColumns.back();

@ -258,7 +258,12 @@ namespace
{ CSMWorld::UniversalId::Type_JournalInfo, CSMWorld::ColumnBase::Display_JournalInfo },
{ CSMWorld::UniversalId::Type_Scene, CSMWorld::ColumnBase::Display_Scene },
{ CSMWorld::UniversalId::Type_Script, CSMWorld::ColumnBase::Display_Script },
{ CSMWorld::UniversalId::Type_Mesh, CSMWorld::ColumnBase::Display_Mesh },
{ CSMWorld::UniversalId::Type_Icon, CSMWorld::ColumnBase::Display_Icon },
{ CSMWorld::UniversalId::Type_Music, CSMWorld::ColumnBase::Display_Music },
{ CSMWorld::UniversalId::Type_SoundRes, CSMWorld::ColumnBase::Display_SoundRes },
{ CSMWorld::UniversalId::Type_Texture, CSMWorld::ColumnBase::Display_Texture },
{ CSMWorld::UniversalId::Type_Video, CSMWorld::ColumnBase::Display_Video },
{ CSMWorld::UniversalId::Type_None, CSMWorld::ColumnBase::Display_None } // end marker
};

@ -177,11 +177,19 @@ QWidget *CSVWorld::CommandDelegate::createEditor (QWidget *parent, const QStyleO
case CSMWorld::ColumnBase::Display_Faction:
case CSMWorld::ColumnBase::Display_Miscellaneous:
case CSMWorld::ColumnBase::Display_Sound:
case CSMWorld::ColumnBase::Display_Mesh:
case CSMWorld::ColumnBase::Display_Icon:
case CSMWorld::ColumnBase::Display_Music:
case CSMWorld::ColumnBase::Display_SoundRes:
case CSMWorld::ColumnBase::Display_Texture:
case CSMWorld::ColumnBase::Display_Video:
return new DropLineEdit(parent);
}
return QStyledItemDelegate::createEditor (parent, option, index);
default:
return QStyledItemDelegate::createEditor (parent, option, index);
}
}
void CSVWorld::CommandDelegate::setEditLock (bool locked)

Loading…
Cancel
Save