Emergency 2017 Dokumentation  v3.0.1
qsf::editor::EditQActions Class Reference

Edit QActions category. More...

#include <EditQActions.h>

Public Member Functions

 EditQActions (QActionsManager *qActionsManager)
 Constructor. More...
 
virtual ~EditQActions ()
 Destructor. More...
 
QAction * getUndoQAction () const
 Return the undo Qt action. More...
 
QAction * getRedoQAction () const
 Return the redo Qt action. More...
 
QAction * getCutQAction () const
 Return the cut Qt action. More...
 
QAction * getCopyQAction () const
 Return the copy Qt action. More...
 
QAction * getPasteQAction () const
 Return the paste Qt action. More...
 
void updatePasteQAction () const
 Update the state of the paste Qt action. More...
 
QAction * getDeleteQAction () const
 Return the delete Qt action. More...
 
QAction * getMapPropertiesDialogQAction () const
 Return the map properties dialog Qt action. More...
 
QAction * getMaterialBrowserQAction () const
 Return the material browser dialog Qt action. More...
 
QAction * getSequenceQAction () const
 Return the sequence dialog Qt action. More...
 
- Public Member Functions inherited from qsf::editor::QActions
virtual ~QActions ()
 Destructor. More...
 
ApplicationgetApplication () const
 Return the QSF editor application. More...
 
MainWindowgetMainWindow () const
 Return the main window. More...
 
const std::vector< QAction * > & getQActionList () const
 Return the list of all available QAction instances. More...
 
bool getDefaultQActionShortcut (QAction &qAction, QKeySequence &defaultKey) const
 Return the default shortcut for a given QAction instance. More...
 
- Public Member Functions inherited from qsf::Pluginable< QActionsManager >
virtual ~Pluginable ()
 Destructor. More...
 
QActionsManager & getManager () const
 Return the pluginable manager this pluginable is in. More...
 
- Public Member Functions inherited from qsf::PluginableBase
virtual ~PluginableBase ()
 Destructor. More...
 
template<typename T >
T & getPluginableManager () const
 Return the pluginable manager this pluginable is in. More...
 
- Public Member Functions inherited from qsf::Object
virtual ~Object ()
 Destructor. More...
 
const camp::Class & getCampClass () const
 Return the CAMP class. More...
 
int getPropertyIndexById (const StringHash &propertyId) const
 Return the CAMP property index by using the unique class property ID. More...
 
uint32 getPropertyIdByIndex (int index) const
 Return the unique class property ID with the given index. More...
 
std::string getPropertyNameById (const StringHash &propertyId) const
 Return the CAMP property name by using the unique class property ID. More...
 
const camp::Property * getCampPropertyById (const StringHash &propertyId) const
 Return the CAMP property by using the unique class property ID. More...
 
void setPropertyValuesByString (const std::string &values)
 Set CAMP reflection property values by using a given string. More...
 
void setPropertiesToDefaultValues ()
 Set all CAMP reflection system properties to their default values. More...
 
void serializeToBoostPTree (boost::property_tree::ptree &pTree, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
 
void serializeToBoostPTree (boost::property_tree::ptree &pTree, const camp::Class &campClass, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
 
bool deserializeFromBoostPTree (const boost::property_tree::ptree &pTree, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL)
 
bool deserializeFromBoostPTree (const boost::property_tree::ptree &pTree, const camp::Class &campClass, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL)
 
void serializeToBinarySerializer (BinarySerializer &serializer, SerializationMode mode=MODE_MINIMAL, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
 
void deserializeFromBinarySerializer (BinarySerializer &serializer, SerializationMode mode=MODE_MINIMAL, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL, bool setOverrideState=true)
 
virtual camp::Value getPropertyDefaultValue (const StringHash &propertyId) const
 
virtual PropertyOverrideState getPropertyOverrideState (const StringHash &propertyId) const
 
virtual bool setPropertyOverrideState (const StringHash &propertyId, PropertyOverrideState overrideState)
 
virtual void onPreDeserialize ()
 Called right before the object is deserialized using any of the above methods. Default implementation is empty. More...
 
virtual void onPostDeserialize ()
 Called right after the object was deserialized using any of the above methods. Default implementation is empty. More...
 
virtual ScriptgetAssociatedScript () const
 Return the script instance associated with this object instance. More...
 

Static Public Attributes

static const uint32 PLUGINABLE_ID
 "qsf::editor::EditQActions" unique pluginable QActions ID More...
 

Protected Member Functions

virtual bool onStartup () override
 Startup the Qt actions. More...
 
virtual void retranslateUi () override
 Retranslate the UI. More...
 
virtual void onShutdown () override
 Shutdown the Qt actions. More...
 
- Protected Member Functions inherited from qsf::editor::QActions
void registerQtAction (const QString &objectName, QAction &qAction, const QKeySequence &defaultShortcut)
 Register a Qt action. More...
 
void createRegisterQtAction (QAction *&qAction, const QString &objectName, QObject *qObjectParent, const QKeySequence &shortcut)
 Ease-of-use Qt action create and register. More...
 
void createConnectRegisterQtAction (QAction *&qAction, const QString &objectName, QObject *qObjectParent, const char *call, const QKeySequence &shortcut)
 Ease-of-use Qt action create, connect and register. More...
 
virtual void readSettings (QSettings &qSettings)
 Read settings by using Qt's "QSettings". More...
 
virtual void writeSettings (QSettings &qSettings)
 Write settings by using Qt's "QSettings". More...
 
 QActions (QActionsManager *qActionsManager)
 Constructor. More...
 
- Protected Member Functions inherited from qsf::Pluginable< QActionsManager >
 Pluginable (QActionsManager *pluginableManager)
 Constructor. More...
 
- Protected Member Functions inherited from qsf::PluginableBase
 PluginableBase (PluginableManager *pluginableManager)
 Constructor. More...
 
- Protected Member Functions inherited from qsf::Object
 Object ()
 Default constructor. More...
 

Additional Inherited Members

- Public Types inherited from qsf::Object
enum  PropertyOverrideState { PROPERTY_INVALID, PROPERTY_DEFAULT, PROPERTY_OVERRIDE, PROPERTY_REMOVED }
 
enum  SerializationMethod { SERIALIZE_FLAT, SERIALIZE_COMPLETE, SERIALIZE_DIFFERENTIAL, SERIALIZE_IGNORE_UNKNOWN }
 
enum  SerializationMode { MODE_MINIMAL, MODE_COMPATIBLE }
 
- Protected Attributes inherited from qsf::editor::QActions
std::vector< QAction * > mQActionList
 List of all available QAction instances, do not destroy the QAction instances. More...
 
std::map< QAction *, QKeySequence > mDefaultShortcut
 Default shortcut map with Qt action as key and Qt key sequence as value. More...
 

Detailed Description

Edit QActions category.

Definition at line 41 of file EditQActions.h.

Constructor & Destructor Documentation

qsf::editor::EditQActions::EditQActions ( QActionsManager qActionsManager)
explicit

Constructor.

Parameters
[in]qActionsManagerThe QtActions manager this QtActions instance is in, no null pointer allowed (the CAMP reflection system does not like references in constructors, so we have to use a pointer instead)
virtual qsf::editor::EditQActions::~EditQActions ( )
virtual

Destructor.

Member Function Documentation

QAction * qsf::editor::EditQActions::getCopyQAction ( ) const
inline

Return the copy Qt action.

Returns
The copy Qt action, can be a null pointer, do not destroy the returned instance

Definition at line 31 of file EditQActions-inl.h.

QAction * qsf::editor::EditQActions::getCutQAction ( ) const
inline

Return the cut Qt action.

Returns
The cut Qt action, can be a null pointer, do not destroy the returned instance

Definition at line 26 of file EditQActions-inl.h.

QAction * qsf::editor::EditQActions::getDeleteQAction ( ) const
inline

Return the delete Qt action.

Returns
The delete Qt action, can be a null pointer, do not destroy the returned instance

Definition at line 41 of file EditQActions-inl.h.

QAction * qsf::editor::EditQActions::getMapPropertiesDialogQAction ( ) const
inline

Return the map properties dialog Qt action.

Returns
The map properties dialog Qt action, can be a null pointer, do not destroy the returned instance

Definition at line 46 of file EditQActions-inl.h.

QAction * qsf::editor::EditQActions::getMaterialBrowserQAction ( ) const
inline

Return the material browser dialog Qt action.

Returns
The material browser dialog Qt action, can be a null pointer, do not destroy the returned instance

Definition at line 51 of file EditQActions-inl.h.

QAction * qsf::editor::EditQActions::getPasteQAction ( ) const
inline

Return the paste Qt action.

Returns
The paste Qt action, can be a null pointer, do not destroy the returned instance

Definition at line 36 of file EditQActions-inl.h.

QAction * qsf::editor::EditQActions::getRedoQAction ( ) const
inline

Return the redo Qt action.

Returns
The redo Qt action, can be a null pointer, do not destroy the returned instance

Definition at line 21 of file EditQActions-inl.h.

QAction * qsf::editor::EditQActions::getSequenceQAction ( ) const
inline

Return the sequence dialog Qt action.

Returns
The sequence dialog Qt action, can be a null pointer, do not destroy the returned instance

Definition at line 56 of file EditQActions-inl.h.

QAction * qsf::editor::EditQActions::getUndoQAction ( ) const
inline

Return the undo Qt action.

Returns
The undo Qt action, can be a null pointer, do not destroy the returned instance

Definition at line 16 of file EditQActions-inl.h.

virtual void qsf::editor::EditQActions::onShutdown ( )
overrideprotectedvirtual

Shutdown the Qt actions.

Note
  • Only called in case "onStartup()" returned successfully
  • The default implementation is empty

Reimplemented from qsf::editor::QActions.

virtual bool qsf::editor::EditQActions::onStartup ( )
overrideprotectedvirtual

Startup the Qt actions.

Returns
"true" if all went fine, else "false"
Note
  • The default implementation is empty

Reimplemented from qsf::editor::QActions.

virtual void qsf::editor::EditQActions::retranslateUi ( )
overrideprotectedvirtual

Retranslate the UI.

Note
  • The default implementation is empty
  • Only called by "QActionsManager::retranslateUi()", so it's ensured that only the currently active and hence properly initialized Qt actions receive the changed event

Reimplemented from qsf::editor::QActions.

void qsf::editor::EditQActions::updatePasteQAction ( ) const

Update the state of the paste Qt action.

Todo:
  • TODO(co) I'm sorry, I don't understand what this method is doing, looks like a hack we don't want to have

Member Data Documentation

const uint32 qsf::editor::EditQActions::PLUGINABLE_ID
static

"qsf::editor::EditQActions" unique pluginable QActions ID

Definition at line 56 of file EditQActions.h.


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