Something went wrong. Try again.
OpenMW is an open implementation of the Morrowind engine
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950#include "recordstatusdelegate.hpp"
#include "../../model/world/columns.hpp"
#include <apps/opencs/view/world/datadisplaydelegate.hpp>#include <apps/opencs/view/world/util.hpp>
#include <string>#include <utility>#include <vector>
class QObject;
namespace CSMDoc{ class Document;}
namespace CSMWorld{ class CommandDispatcher;}
CSVWorld::RecordStatusDelegate::RecordStatusDelegate(const ValueList& values, const IconList& icons, CSMWorld::CommandDispatcher* dispatcher, CSMDoc::Document& document, QObject* parent) : DataDisplayDelegate(values, icons, dispatcher, document, "Records", "status-format", parent){}
CSVWorld::CommandDelegate* CSVWorld::RecordStatusDelegateFactory::makeDelegate( CSMWorld::CommandDispatcher* dispatcher, CSMDoc::Document& document, QObject* parent) const{ return new RecordStatusDelegate(mValues, mIcons, dispatcher, document, parent);}
CSVWorld::RecordStatusDelegateFactory::RecordStatusDelegateFactory(){ std::vector<std::pair<int, std::string>> enums = CSMWorld::Columns::getEnums(CSMWorld::Columns::ColumnId_Modification);
static const char* sIcons[] = { ":list-base", ":list-modified", ":list-added", ":list-removed", ":list-removed", 0 };
for (int i = 0; sIcons[i]; ++i) { auto& enumPair = enums.at(i); add(enumPair.first, enumPair.second.c_str(), sIcons[i]); }}