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 void touch (const std::vector< CSMWorld::UniversalId > &ids)
 Touches a record, if the creator supports it. More...
 
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
 
std::string getClonedId () 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::unique_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::PathgridCreator, CSVWorld::StartScriptCreator, CSVWorld::ReferenceCreator, CSVWorld::CellCreator, CSVWorld::InfoCreator, CSVWorld::ReferenceableCreator, CSVWorld::LandCreator, and CSVWorld::LandTextureCreator.

Here is the caller graph for this function:

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

Allow subclasses to add additional data to command.

Reimplemented in CSVWorld::LandTextureCreator, CSVWorld::ReferenceCreator, CSVWorld::CellCreator, CSVWorld::InfoCreator, CSVWorld::GlobalCreator, CSVWorld::ReferenceableCreator, and CSVWorld::DialogueCreator.

Here is the caller graph for this function:

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
std::string CSVWorld::GenericCreator::getClonedId ( ) const
protected

Here is the caller graph for this function:

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::PathgridCreator, CSVWorld::StartScriptCreator, CSVWorld::ReferenceCreator, CSVWorld::InfoCreator, CSVWorld::CellCreator, CSVWorld::BodyPartCreator, CSVWorld::LandCreator, and CSVWorld::LandTextureCreator.

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::LandCreator, CSVWorld::PathgridCreator, CSVWorld::LandTextureCreator, CSVWorld::StartScriptCreator, CSVWorld::ReferenceCreator, CSVWorld::BodyPartCreator, 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

Here is the caller graph for this function:

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::unique_ptr< CSMWorld::CreateCommand command,
const std::string &  id 
)
protectedvirtual

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

Reimplemented in CSVWorld::LandCreator.

void CSVWorld::GenericCreator::reset ( )
virtual

Implements CSVWorld::Creator.

Reimplemented in CSVWorld::PathgridCreator, CSVWorld::StartScriptCreator, CSVWorld::ReferenceCreator, CSVWorld::BodyPartCreator, CSVWorld::InfoCreator, CSVWorld::CellCreator, CSVWorld::LandCreator, CSVWorld::LandTextureCreator, 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::touch ( const std::vector< CSMWorld::UniversalId > &  ids)
virtual

Touches a record, if the creator supports it.

Implements CSVWorld::Creator.

Reimplemented in CSVWorld::LandCreator.

Here is the call graph for this function:

void CSVWorld::GenericCreator::update ( )
protected

Here is the call graph for this function:

Here is the caller 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: