moved list of enum literals from ViewManager to Columns (which makes them available to the rest of model now)

This commit is contained in:
Marc Zinnschlag 2013-09-02 11:58:05 +02:00
parent 9f0b34eae0
commit 649ef6f120
5 changed files with 129 additions and 72 deletions

View file

@ -109,6 +109,18 @@ CSVWorld::EnumDelegateFactory::EnumDelegateFactory (const char **names, bool all
add (i, names[i]);
}
CSVWorld::EnumDelegateFactory::EnumDelegateFactory (const std::vector<std::string>& names,
bool allowNone)
{
if (allowNone)
add (-1, "");
int size = static_cast<int> (names.size());
for (int i=0; i<size; ++i)
add (i, names[i].c_str());
}
CSVWorld::CommandDelegate *CSVWorld::EnumDelegateFactory::makeDelegate (QUndoStack& undoStack,
QObject *parent) const
{