OpenMW
|
#include <genericcreator.hpp>
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... | |
![]() | |
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::Data & | getData () const |
QUndoStack & | getUndoStack () |
const CSMWorld::UniversalId & | getCollectionId () 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::Data & | mData |
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 |
IdValidator * | mValidator |
Additional Inherited Members | |
![]() | |
void | done () |
void | requestFocus (const std::string &id) |
CSVWorld::GenericCreator::GenericCreator | ( | CSMWorld::Data & | data, |
QUndoStack & | undoStack, | ||
const CSMWorld::UniversalId & | id, | ||
bool | relaxedIdRules = false |
||
) |
|
private |
|
virtual |
Implements CSVWorld::Creator.
Reimplemented in CSVWorld::PathgridCreator, CSVWorld::StartScriptCreator, CSVWorld::ReferenceCreator, CSVWorld::CellCreator, CSVWorld::InfoCreator, CSVWorld::ReferenceableCreator, CSVWorld::LandCreator, and CSVWorld::LandTextureCreator.
|
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.
|
privateslot |
|
privateslot |
|
virtual |
Focus main input widget.
Implements CSVWorld::Creator.
Reimplemented in CSVWorld::PathgridCreator, CSVWorld::StartScriptCreator, CSVWorld::ReferenceCreator, CSVWorld::InfoCreator, CSVWorld::LandCreator, and CSVWorld::LandTextureCreator.
|
protected |
|
protected |
|
protected |
|
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.
|
protectedvirtual |
Reimplemented in CSVWorld::LandCreator, CSVWorld::PathgridCreator, CSVWorld::LandTextureCreator, CSVWorld::StartScriptCreator, CSVWorld::ReferenceCreator, CSVWorld::BodyPartCreator, CSVWorld::InfoCreator, and CSVWorld::CellCreator.
|
protectedvirtual |
|
protected |
|
protected |
|
privateslot |
Create record if able to after Return key is pressed on input.
Insert given widget before Create and Cancel buttons.
widget | Widget to add to layout. |
stretched | Whether widget should be streched or not. |
|
protectedvirtual |
Allow subclasses to wrap the create command together with additional commands into a macro.
Reimplemented in CSVWorld::LandCreator.
|
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.
|
privateslot |
|
virtual |
Implements CSVWorld::Creator.
|
protectedvirtual |
Enable/disable manual ID editing (enabled by default).
|
virtual |
Default implementation: Throw an exception if scope!=Scope_Content.
Reimplemented from CSVWorld::Creator.
|
privateslot |
|
virtual |
Implements CSVWorld::Creator.
Reimplemented in CSVWorld::ReferenceableCreator.
|
virtual |
Touches a record, if the creator supports it.
Implements CSVWorld::Creator.
Reimplemented in CSVWorld::LandCreator.
|
protected |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |