mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 07:53:53 +00:00
more cleanup
This commit is contained in:
parent
80f8024da7
commit
842a616909
3 changed files with 21 additions and 43 deletions
|
@ -90,8 +90,6 @@ namespace
|
||||||
|
|
||||||
{ CSMWorld::UniversalId::Class_None, CSMWorld::UniversalId::Type_None, 0, 0 } // end marker
|
{ CSMWorld::UniversalId::Class_None, CSMWorld::UniversalId::Type_None, 0, 0 } // end marker
|
||||||
};
|
};
|
||||||
|
|
||||||
static const unsigned int IDARG_SIZE = sizeof (sIdArg) / sizeof (TypeData);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CSMWorld::UniversalId::UniversalId (const std::string& universalId)
|
CSMWorld::UniversalId::UniversalId (const std::string& universalId)
|
||||||
|
@ -293,25 +291,6 @@ std::vector<CSMWorld::UniversalId::Type> CSMWorld::UniversalId::listReferenceabl
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::pair<int, const char *> CSMWorld::UniversalId::getIdArgPair (unsigned int index)
|
|
||||||
{
|
|
||||||
std::pair<int, const char *> retPair;
|
|
||||||
|
|
||||||
if ( index < IDARG_SIZE )
|
|
||||||
{
|
|
||||||
retPair.first = sIdArg[index].mType;
|
|
||||||
retPair.second = sIdArg[index].mName;
|
|
||||||
}
|
|
||||||
|
|
||||||
return retPair;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int CSMWorld::UniversalId::getIdArgSize()
|
|
||||||
{
|
|
||||||
return IDARG_SIZE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool CSMWorld::operator== (const CSMWorld::UniversalId& left, const CSMWorld::UniversalId& right)
|
bool CSMWorld::operator== (const CSMWorld::UniversalId& left, const CSMWorld::UniversalId& right)
|
||||||
{
|
{
|
||||||
return left.isEqual (right);
|
return left.isEqual (right);
|
||||||
|
|
|
@ -134,9 +134,6 @@ namespace CSMWorld
|
||||||
///< Will return an empty string, if no icon is available.
|
///< Will return an empty string, if no icon is available.
|
||||||
|
|
||||||
static std::vector<Type> listReferenceableTypes();
|
static std::vector<Type> listReferenceableTypes();
|
||||||
|
|
||||||
static std::pair<int, const char *> getIdArgPair (unsigned int index);
|
|
||||||
static unsigned int getIdArgSize ();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bool operator== (const UniversalId& left, const UniversalId& right);
|
bool operator== (const UniversalId& left, const UniversalId& right);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "refidtypedelegate.hpp"
|
#include "refidtypedelegate.hpp"
|
||||||
|
|
||||||
#include "../../model/world/universalid.hpp"
|
#include "../../model/world/universalid.hpp"
|
||||||
|
|
||||||
CSVWorld::RefIdTypeDelegate::RefIdTypeDelegate
|
CSVWorld::RefIdTypeDelegate::RefIdTypeDelegate
|
||||||
|
@ -6,6 +7,26 @@ CSVWorld::RefIdTypeDelegate::RefIdTypeDelegate
|
||||||
: DataDisplayDelegate (values, icons, undoStack, parent)
|
: DataDisplayDelegate (values, icons, undoStack, parent)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
bool CSVWorld::RefIdTypeDelegate::updateEditorSetting (const QString &settingName, const QString &settingValue)
|
||||||
|
{
|
||||||
|
if (settingName == "Referenceable ID Type Display")
|
||||||
|
{
|
||||||
|
if (settingValue == "Icon and Text")
|
||||||
|
mDisplayMode = Mode_IconAndText;
|
||||||
|
|
||||||
|
else if (settingValue == "Icon Only")
|
||||||
|
mDisplayMode = Mode_IconOnly;
|
||||||
|
|
||||||
|
else if (settingValue == "Text Only")
|
||||||
|
mDisplayMode = Mode_TextOnly;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
CSVWorld::RefIdTypeDelegateFactory::RefIdTypeDelegateFactory()
|
CSVWorld::RefIdTypeDelegateFactory::RefIdTypeDelegateFactory()
|
||||||
{
|
{
|
||||||
UidTypeList uIdList = buildUidTypeList();
|
UidTypeList uIdList = buildUidTypeList();
|
||||||
|
@ -39,22 +60,3 @@ CSVWorld::RefIdTypeDelegateFactory::UidTypeList CSVWorld::RefIdTypeDelegateFacto
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSVWorld::RefIdTypeDelegate::updateEditorSetting (const QString &settingName, const QString &settingValue)
|
|
||||||
{
|
|
||||||
if (settingName == "Referenceable ID Type Display")
|
|
||||||
{
|
|
||||||
if (settingValue == "Icon and Text")
|
|
||||||
mDisplayMode = Mode_IconAndText;
|
|
||||||
|
|
||||||
else if (settingValue == "Icon Only")
|
|
||||||
mDisplayMode = Mode_IconOnly;
|
|
||||||
|
|
||||||
else if (settingValue == "Text Only")
|
|
||||||
mDisplayMode = Mode_TextOnly;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue