|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
#include "refidtypedelegate.hpp"
|
|
|
|
|
|
|
|
|
|
#include "../../model/world/universalid.hpp"
|
|
|
|
|
|
|
|
|
|
CSVWorld::RefIdTypeDelegate::RefIdTypeDelegate
|
|
|
|
@ -6,6 +7,26 @@ CSVWorld::RefIdTypeDelegate::RefIdTypeDelegate
|
|
|
|
|
: 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()
|
|
|
|
|
{
|
|
|
|
|
UidTypeList uIdList = buildUidTypeList();
|
|
|
|
@ -39,22 +60,3 @@ CSVWorld::RefIdTypeDelegateFactory::UidTypeList CSVWorld::RefIdTypeDelegateFacto
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|