OpenMW
Public Member Functions | Protected Attributes
CSVWorld::EnumDelegateFactory Class Reference

#include <enumdelegate.hpp>

List of all members.

Public Member Functions

 EnumDelegateFactory ()
 EnumDelegateFactory (const char **names, bool allowNone=false)
 EnumDelegateFactory (const std::vector< std::string > &names, bool allowNone=false)
virtual CommandDelegatemakeDelegate (QUndoStack &undoStack, QObject *parent) const
 The ownership of the returned CommandDelegate is transferred to the caller.
void add (int value, const QString &name)

Protected Attributes

std::vector< std::pair< int,
QString > > 
mValues

Constructor & Destructor Documentation

CSVWorld::EnumDelegateFactory::EnumDelegateFactory ( const char **  names,
bool  allowNone = false 
)
Parameters:
namesArray of char pointer with a 0-pointer as end mark
allowNoneUse value of -1 for "none selected" (empty string)
CSVWorld::EnumDelegateFactory::EnumDelegateFactory ( const std::vector< std::string > &  names,
bool  allowNone = false 
)

Member Function Documentation

void CSVWorld::EnumDelegateFactory::add ( int  value,
const QString &  name 
)
CSVWorld::CommandDelegate * CSVWorld::EnumDelegateFactory::makeDelegate ( QUndoStack &  undoStack,
QObject *  parent 
) const [virtual]

The ownership of the returned CommandDelegate is transferred to the caller.

Parameters:
allowNoneUse value of -1 for "none selected" (empty string)

Implements CSVWorld::CommandDelegateFactory.

Reimplemented in CSVWorld::DataDisplayDelegateFactory, CSVWorld::RecordStatusDelegateFactory, and CSVWorld::IdTypeDelegateFactory.


Member Data Documentation

std::vector<std::pair<int, QString> > CSVWorld::EnumDelegateFactory::mValues [protected]

The documentation for this class was generated from the following files: