|
|
|
@ -25,8 +25,9 @@ QVariant CSMWorld::PotionRefIdAdapter::getData (const RefIdColumn *column, const
|
|
|
|
|
if (column==mAutoCalc)
|
|
|
|
|
return record.get().mData.mAutoCalc!=0;
|
|
|
|
|
|
|
|
|
|
// to show nested tables in dialogue subview, see IdTree::hasChildren()
|
|
|
|
|
if (column==mColumns.mEffects)
|
|
|
|
|
return true; // to show nested tables in dialogue subview, see IdTree::hasChildren()
|
|
|
|
|
return QVariant::fromValue(TableEditModes::TableEdit_Full);
|
|
|
|
|
|
|
|
|
|
return InventoryRefIdAdapter<ESM::Potion>::getData (column, data, index);
|
|
|
|
|
}
|
|
|
|
@ -67,7 +68,7 @@ QVariant CSMWorld::IngredientRefIdAdapter::getData (const RefIdColumn *column, c
|
|
|
|
|
data.getRecord (RefIdData::LocalIndex (index, UniversalId::Type_Ingredient)));
|
|
|
|
|
|
|
|
|
|
if (column==mColumns.mEffects)
|
|
|
|
|
return true; // to show nested tables in dialogue subview, see IdTree::hasChildren()
|
|
|
|
|
return QVariant::fromValue(TableEditModes::TableEdit_FixedRows);
|
|
|
|
|
|
|
|
|
|
return InventoryRefIdAdapter<ESM::Ingredient>::getData (column, data, index);
|
|
|
|
|
}
|
|
|
|
@ -271,7 +272,7 @@ QVariant CSMWorld::ArmorRefIdAdapter::getData (const RefIdColumn *column,
|
|
|
|
|
return record.get().mData.mArmor;
|
|
|
|
|
|
|
|
|
|
if (column==mPartRef)
|
|
|
|
|
return true; // to show nested tables in dialogue subview, see IdTree::hasChildren()
|
|
|
|
|
return QVariant::fromValue(TableEditModes::TableEdit_Full);
|
|
|
|
|
|
|
|
|
|
return EnchantableRefIdAdapter<ESM::Armor>::getData (column, data, index);
|
|
|
|
|
}
|
|
|
|
@ -359,7 +360,7 @@ QVariant CSMWorld::ClothingRefIdAdapter::getData (const RefIdColumn *column,
|
|
|
|
|
return record.get().mData.mType;
|
|
|
|
|
|
|
|
|
|
if (column==mPartRef)
|
|
|
|
|
return true; // to show nested tables in dialogue subview, see IdTree::hasChildren()
|
|
|
|
|
return QVariant::fromValue(TableEditModes::TableEdit_Full);
|
|
|
|
|
|
|
|
|
|
return EnchantableRefIdAdapter<ESM::Clothing>::getData (column, data, index);
|
|
|
|
|
}
|
|
|
|
@ -407,7 +408,7 @@ QVariant CSMWorld::ContainerRefIdAdapter::getData (const RefIdColumn *column,
|
|
|
|
|
return (record.get().mFlags & ESM::Container::Respawn)!=0;
|
|
|
|
|
|
|
|
|
|
if (column==mContent)
|
|
|
|
|
return true; // Required to show nested tables in dialogue subview
|
|
|
|
|
return QVariant::fromValue(TableEditModes::TableEdit_Full);
|
|
|
|
|
|
|
|
|
|
return NameRefIdAdapter<ESM::Container>::getData (column, data, index);
|
|
|
|
|
}
|
|
|
|
@ -476,13 +477,13 @@ QVariant CSMWorld::CreatureRefIdAdapter::getData (const RefIdColumn *column, con
|
|
|
|
|
return QString::fromUtf8 (record.get().mOriginal.c_str());
|
|
|
|
|
|
|
|
|
|
if (column==mColumns.mAttributes)
|
|
|
|
|
return true; // Required to show nested tables in dialogue subview
|
|
|
|
|
return QVariant::fromValue(TableEditModes::TableEdit_FixedRows);
|
|
|
|
|
|
|
|
|
|
if (column==mColumns.mAttacks)
|
|
|
|
|
return true; // Required to show nested tables in dialogue subview
|
|
|
|
|
return QVariant::fromValue(TableEditModes::TableEdit_FixedRows);
|
|
|
|
|
|
|
|
|
|
if (column==mColumns.mMisc)
|
|
|
|
|
return true; // Required to show nested items in dialogue subview
|
|
|
|
|
return QVariant::fromValue(TableEditModes::TableEdit_Full);
|
|
|
|
|
|
|
|
|
|
std::map<const RefIdColumn *, unsigned int>::const_iterator iter =
|
|
|
|
|
mColumns.mFlags.find (column);
|
|
|
|
@ -722,13 +723,13 @@ QVariant CSMWorld::NpcRefIdAdapter::getData (const RefIdColumn *column, const Re
|
|
|
|
|
if (column==mColumns.mAttributes || column==mColumns.mSkills)
|
|
|
|
|
{
|
|
|
|
|
if ((record.get().mFlags & ESM::NPC::Autocalc) != 0)
|
|
|
|
|
return QVariant(QVariant::UserType);
|
|
|
|
|
return QVariant::fromValue(TableEditModes::TableEdit_None);
|
|
|
|
|
else
|
|
|
|
|
return true;
|
|
|
|
|
return QVariant::fromValue(TableEditModes::TableEdit_FixedRows);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (column==mColumns.mMisc)
|
|
|
|
|
return true;
|
|
|
|
|
return QVariant::fromValue(TableEditModes::TableEdit_Full);
|
|
|
|
|
|
|
|
|
|
std::map<const RefIdColumn *, unsigned int>::const_iterator iter =
|
|
|
|
|
mColumns.mFlags.find (column);
|
|
|
|
|