OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Private Slots | Private Member Functions | Private Attributes | List of all members
CSVWorld::GenericCreator Class Reference

#include <genericcreator.hpp>

Inheritance diagram for CSVWorld::GenericCreator:
Collaboration diagram for CSVWorld::GenericCreator:

Public Member Functions

 GenericCreator (CSMWorld::Data &data, QUndoStack &undoStack, const CSMWorld::UniversalId &id, bool relaxedIdRules=false)
 
virtual void setEditLock (bool locked)
 
virtual void reset ()
 
virtual void toggleWidgets (bool active=true)
 
virtual void cloneMode (const std::string &originId, const CSMWorld::UniversalId::Type type)
 
virtual std::string getErrors () const
 
virtual void setScope (unsigned int scope)
 Default implementation: Throw an exception if scope!=Scope_Content. More...
 
virtual void focus ()
 Focus main input widget. More...
 
- Public Member Functions inherited from CSVWorld::Creator
virtual ~Creator ()
 

Protected Member Functions

void update ()
 
virtual void setManualEditing (bool enabled)
 Enable/disable manual ID editing (enabled by default). More...
 
void insertAtBeginning (QWidget *widget, bool stretched)
 
void insertBeforeButtons (QWidget *widget, bool stretched)
 Insert given widget before Create and Cancel buttons. More...
 
virtual std::string getId () const
 
virtual std::string getIdValidatorResult () const
 
virtual void configureCreateCommand (CSMWorld::CreateCommand &command) const
 Allow subclasses to add additional data to command. More...
 
virtual void pushCommand (std::auto_ptr< CSMWorld::CreateCommand > command, const std::string &id)
 
CSMWorld::DatagetData () const
 
QUndoStack & getUndoStack ()
 
const CSMWorld::UniversalIdgetCollectionId () const
 
std::string getNamespace () const
 

Protected Attributes

bool mCloneMode
 

Private Slots

void textChanged (const QString &text)
 
void inputReturnPressed ()
 Create record if able to after Return key is pressed on input. More...
 
void create ()
 
void scopeChanged (int index)
 
void dataIdListChanged ()
 

Private Member Functions

void updateNamespace ()
 
void addScope (const QString &name, CSMWorld::Scope scope, const QString &tooltip)
 

Private Attributes

CSMWorld::DatamData
 
QUndoStack & mUndoStack
 
CSMWorld::UniversalId mListId
 
QPushButton * mCreate
 
QPushButton * mCancel
 
QLineEdit * mId
 
std::string mErrors
 
QHBoxLayout * mLayout
 
bool mLocked
 
std::string mClonedId
 
CSMWorld::UniversalId::Type mClonedType
 
unsigned int mScopes
 
QComboBox * mScope
 
QLabel * mScopeLabel
 
IdValidatormValidator
 

Additional Inherited Members

- Signals inherited from CSVWorld::Creator
void done ()
 
void requestFocus (const std::string &id)
 

Constructor & Destructor Documentation

CSVWorld::GenericCreator::GenericCreator ( CSMWorld::Data data,
QUndoStack &  undoStack,
const CSMWorld::UniversalId id,
bool  relaxedIdRules = false 
)

Here is the call graph for this function:

Member Function Documentation

void CSVWorld::GenericCreator::addScope ( const QString &  name,
CSMWorld::Scope  scope,
const QString &  tooltip 
)
private
void CSVWorld::GenericCreator::cloneMode ( const std::string &  originId,
const CSMWorld::UniversalId::Type  type 
)
virtual

Implements CSVWorld::Creator.

Reimplemented in CSVWorld::StartScriptCreator, CSVWorld::ReferenceCreator, CSVWorld::CellCreator, CSVWorld::InfoCreator, and CSVWorld::ReferenceableCreator.

Here is the caller graph for this function:

void CSVWorld::GenericCreator::configureCreateCommand ( CSMWorld::CreateCommand command) const
protectedvirtual
void CSVWorld::GenericCreator::create ( )
privateslot

Here is the call graph for this function:

Here is the caller graph for this function:

void CSVWorld::GenericCreator::dataIdListChanged ( )
privateslot

Here is the caller graph for this function:

void CSVWorld::GenericCreator::focus ( )
virtual

Focus main input widget.

Implements CSVWorld::Creator.

Reimplemented in CSVWorld::StartScriptCreator, CSVWorld::ReferenceCreator, and CSVWorld::InfoCreator.

const CSMWorld::UniversalId & CSVWorld::GenericCreator::getCollectionId ( ) const
protected

Here is the caller graph for this function:

CSMWorld::Data & CSVWorld::GenericCreator::getData ( ) const
protected

Here is the caller graph for this function:

std::string CSVWorld::GenericCreator::getErrors ( ) const
virtual

Return formatted error descriptions for the current state of the creator. if an empty string is returned, there is no error.

Reimplemented in CSVWorld::StartScriptCreator, CSVWorld::ReferenceCreator, CSVWorld::InfoCreator, CSVWorld::CellCreator, and CSVWorld::PathgridCreator.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string CSVWorld::GenericCreator::getId ( ) const
protectedvirtual

Reimplemented in CSVWorld::StartScriptCreator, CSVWorld::ReferenceCreator, CSVWorld::InfoCreator, and CSVWorld::CellCreator.

Here is the caller graph for this function:

std::string CSVWorld::GenericCreator::getIdValidatorResult ( ) const
protectedvirtual
std::string CSVWorld::GenericCreator::getNamespace ( ) const
protected
QUndoStack & CSVWorld::GenericCreator::getUndoStack ( )
protected
void CSVWorld::GenericCreator::inputReturnPressed ( )
privateslot

Create record if able to after Return key is pressed on input.

Here is the call graph for this function:

Here is the caller graph for this function:

void CSVWorld::GenericCreator::insertAtBeginning ( QWidget widget,
bool  stretched 
)
protected

Here is the caller graph for this function:

void CSVWorld::GenericCreator::insertBeforeButtons ( QWidget widget,
bool  stretched 
)
protected

Insert given widget before Create and Cancel buttons.

Parameters
widgetWidget to add to layout.
stretchedWhether widget should be streched or not.

Here is the caller graph for this function:

void CSVWorld::GenericCreator::pushCommand ( std::auto_ptr< CSMWorld::CreateCommand command,
const std::string &  id 
)
protectedvirtual

Allow subclasses to wrap the create command together with additional commands into a macro.

void CSVWorld::GenericCreator::reset ( )
virtual

Implements CSVWorld::Creator.

Reimplemented in CSVWorld::StartScriptCreator, CSVWorld::ReferenceCreator, CSVWorld::InfoCreator, CSVWorld::CellCreator, and CSVWorld::ReferenceableCreator.

Here is the caller graph for this function:

void CSVWorld::GenericCreator::scopeChanged ( int  index)
privateslot
void CSVWorld::GenericCreator::setEditLock ( bool  locked)
virtual

Implements CSVWorld::Creator.

void CSVWorld::GenericCreator::setManualEditing ( bool  enabled)
protectedvirtual

Enable/disable manual ID editing (enabled by default).

Here is the caller graph for this function:

void CSVWorld::GenericCreator::setScope ( unsigned int  scope)
virtual

Default implementation: Throw an exception if scope!=Scope_Content.

Reimplemented from CSVWorld::Creator.

void CSVWorld::GenericCreator::textChanged ( const QString &  text)
privateslot

Here is the caller graph for this function:

void CSVWorld::GenericCreator::toggleWidgets ( bool  active = true)
virtual

Implements CSVWorld::Creator.

Reimplemented in CSVWorld::ReferenceableCreator.

Here is the caller graph for this function:

void CSVWorld::GenericCreator::update ( )
protected

Here is the call graph for this function:

void CSVWorld::GenericCreator::updateNamespace ( )
private

Here is the call graph for this function:

Member Data Documentation

QPushButton* CSVWorld::GenericCreator::mCancel
private
std::string CSVWorld::GenericCreator::mClonedId
private
CSMWorld::UniversalId::Type CSVWorld::GenericCreator::mClonedType
private
bool CSVWorld::GenericCreator::mCloneMode
protected
QPushButton* CSVWorld::GenericCreator::mCreate
private
CSMWorld::Data& CSVWorld::GenericCreator::mData
private
std::string CSVWorld::GenericCreator::mErrors
private
QLineEdit* CSVWorld::GenericCreator::mId
private
QHBoxLayout* CSVWorld::GenericCreator::mLayout
private
CSMWorld::UniversalId CSVWorld::GenericCreator::mListId
private
bool CSVWorld::GenericCreator::mLocked
private
QComboBox* CSVWorld::GenericCreator::mScope
private
QLabel* CSVWorld::GenericCreator::mScopeLabel
private
unsigned int CSVWorld::GenericCreator::mScopes
private
QUndoStack& CSVWorld::GenericCreator::mUndoStack
private
IdValidator* CSVWorld::GenericCreator::mValidator
private

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