forked from mirror/openmw-tes3mp
Merge branch 'filter'
commit
dc345dd43d
@ -1,25 +0,0 @@
|
||||
#include "refrecordtypedelegate.hpp"
|
||||
#include "../../model/world/universalid.hpp"
|
||||
|
||||
CSVWorld::RefRecordTypeDelegate::RefRecordTypeDelegate
|
||||
(const std::vector<std::pair<int, QString> > &values, QUndoStack& undoStack, QObject *parent)
|
||||
: EnumDelegate (values, undoStack, parent)
|
||||
{}
|
||||
|
||||
CSVWorld::RefRecordTypeDelegateFactory::RefRecordTypeDelegateFactory()
|
||||
{
|
||||
unsigned int argSize = CSMWorld::UniversalId::getIdArgSize();
|
||||
|
||||
for (unsigned int i = 0; i < argSize; i++)
|
||||
{
|
||||
std::pair<int, const char *> idPair = CSMWorld::UniversalId::getIdArgPair(i);
|
||||
|
||||
mValues.push_back (std::pair<int, QString>(idPair.first, QString::fromUtf8(idPair.second)));
|
||||
}
|
||||
}
|
||||
|
||||
CSVWorld::CommandDelegate *CSVWorld::RefRecordTypeDelegateFactory::makeDelegate (QUndoStack& undoStack,
|
||||
QObject *parent) const
|
||||
{
|
||||
return new RefRecordTypeDelegate (mValues, undoStack, parent);
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
#ifndef REFRECORDTYPEDELEGATE_HPP
|
||||
#define REFRECORDTYPEDELEGATE_HPP
|
||||
|
||||
#include "enumdelegate.hpp"
|
||||
#include "util.hpp"
|
||||
|
||||
namespace CSVWorld
|
||||
{
|
||||
class RefRecordTypeDelegate : public EnumDelegate
|
||||
{
|
||||
public:
|
||||
RefRecordTypeDelegate (const std::vector<std::pair<int, QString> > &mValues, QUndoStack& undoStack, QObject *parent);
|
||||
};
|
||||
|
||||
class RefRecordTypeDelegateFactory : public CommandDelegateFactory
|
||||
{
|
||||
|
||||
std::vector<std::pair<int, QString> > mValues;
|
||||
|
||||
public:
|
||||
RefRecordTypeDelegateFactory();
|
||||
|
||||
virtual CommandDelegate *makeDelegate (QUndoStack& undoStack, QObject *parent) const;
|
||||
///< The ownership of the returned CommandDelegate is transferred to the caller.
|
||||
};
|
||||
}
|
||||
/*
|
||||
class VarTypeDelegate : public EnumDelegate
|
||||
{
|
||||
private:
|
||||
|
||||
virtual void addCommands (QAbstractItemModel *model,
|
||||
const QModelIndex& index, int type) const;
|
||||
|
||||
public:
|
||||
|
||||
VarTypeDelegate (const std::vector<std::pair<int, QString> >& values,
|
||||
QUndoStack& undoStack, QObject *parent);
|
||||
};
|
||||
|
||||
class VarTypeDelegateFactory : public CommandDelegateFactory
|
||||
{
|
||||
std::vector<std::pair<int, QString> > mValues;
|
||||
|
||||
public:
|
||||
|
||||
VarTypeDelegateFactory (ESM::VarType type0 = ESM::VT_Unknown,
|
||||
ESM::VarType type1 = ESM::VT_Unknown, ESM::VarType type2 = ESM::VT_Unknown,
|
||||
ESM::VarType type3 = ESM::VT_Unknown);
|
||||
|
||||
virtual CommandDelegate *makeDelegate (QUndoStack& undoStack, QObject *parent) const;
|
||||
///< The ownership of the returned CommandDelegate is transferred to the caller.
|
||||
|
||||
void add (ESM::VarType type);
|
||||
};
|
||||
*/
|
||||
|
||||
#endif // REFRECORDTYPEDELEGATE_HPP
|
Loading…
Reference in New Issue