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

Terrain modeling tool class. More...

#include <TerrainModelingTool.h>

Public Member Functions

 TerrainModelingTool (ToolManager *toolManager)
 Constructor. More...
 
virtual ~TerrainModelingTool ()
 Destructor. More...
 
- Public Member Functions inherited from qsf::editor::TerrainTool
 TerrainTool (ToolManager *toolManager)
 Constructor. More...
 
virtual ~TerrainTool ()
 Destructor. More...
 
void getInfluencedTerrainComponents (std::vector< TerrainComponent * > &terrainComponents)
 Return a list of terrain component instances which are currently influenced by this tool. More...
 
- Public Member Functions inherited from qsf::editor::Tool
virtual ~Tool ()
 Destructor. More...
 
ApplicationgetApplication () const
 Return the QSF editor application. More...
 
MainWindowgetMainWindow () const
 Return the main window. More...
 
- Public Member Functions inherited from qsf::Pluginable< ToolManager >
virtual ~Pluginable ()
 Destructor. More...
 
ToolManager & 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::TerrainModelingTool" unique pluginable tool ID More...
 
- Static Public Attributes inherited from qsf::editor::TerrainTool
static const uint32 PLUGINABLE_ID
 "qsf::editor::TerrainTool" unique pluginable tool ID More...
 

Protected Member Functions

virtual void readSettings (QSettings &qSettings) override
 Read settings by using Qt's "QSettings". More...
 
virtual void writeSettings (QSettings &qSettings) override
 Write settings by using Qt's "QSettings". More...
 
virtual bool onStartup (ToolboxView &toolboxView) override
 Startup the tool. More...
 
virtual void onShutdown (ToolboxView &toolboxView) override
 Shutdown the tool. More...
 
virtual void retranslateUi (ToolboxView &toolboxView) override
 Retranslate the UI. More...
 
virtual void onTerrainReady (bool isSuccess) override
 
- Protected Member Functions inherited from qsf::editor::TerrainTool
void updateTerrainMapInformationGui (QLabel &qLabel, TerrainDataType terrainDataType)
 Update the GUI showing information about the currently edited terrain map. More...
 
TerrainEditHelpergetTerrainEditHelper (uint64 entityId) const
 Return the terrain edit helper instance. More...
 
const std::map< uint64, std::shared_ptr< TerrainEditHelper > > & getTerrainEditHelperMap () const
 Return the terrain edit helper instance map. More...
 
- Protected Member Functions inherited from qsf::editor::Tool
EditModegetSelectedEditMode () const
 Return the currently selected edit mode. More...
 
void selectEditModeById (const StringHash &id)
 Select the requested edit mode instance by using its unique identifier. More...
 
void selectEditModeByPointer (EditMode *editMode)
 Select the requested edit mode instance by using a given edit mode pointer. More...
 
EditModegetPreviousEditMode () const
 Return the edit mode which was selected before the currently selected edit mode got selected. More...
 
 Tool (ToolManager *toolManager)
 Constructor. More...
 
- Protected Member Functions inherited from qsf::Pluginable< ToolManager >
 Pluginable (ToolManager *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 }
 

Detailed Description

Terrain modeling tool class.

Note
  • The UI is created by using a Qt ui-file (create/edit it by using e.g. Qt Designer)
Todo:
  • TODO(co) Listen and react and edit mode changes and current entity changes as e.g. seen inside "qsf::editor::PolygonTool" (keyword: Toggle GUI button pressed state)
  • TODO(co) Enable/disable "Set to Selection"-button according to weather or not something is currently selected

Definition at line 61 of file TerrainModelingTool.h.

Constructor & Destructor Documentation

qsf::editor::TerrainModelingTool::TerrainModelingTool ( ToolManager toolManager)
explicit

Constructor.

Parameters
[in]toolManagerThe tool manager this tool 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::TerrainModelingTool::~TerrainModelingTool ( )
virtual

Destructor.

Member Function Documentation

virtual void qsf::editor::TerrainModelingTool::onShutdown ( ToolboxView toolboxView)
overrideprotectedvirtual

Shutdown the tool.

Parameters
[in]toolboxViewOwner toolbox view
Note
  • Only called in case "onStartup()" returned successfully
  • The default implementation is empty

Reimplemented from qsf::editor::TerrainTool.

virtual bool qsf::editor::TerrainModelingTool::onStartup ( ToolboxView toolboxView)
overrideprotectedvirtual

Startup the tool.

Parameters
[in]toolboxViewOwner toolbox view
Returns
"true" if all went fine, else "false"
Note
  • The default implementation is empty

Reimplemented from qsf::editor::TerrainTool.

virtual void qsf::editor::TerrainModelingTool::onTerrainReady ( bool  isSuccess)
overrideprotectedvirtual
virtual void qsf::editor::TerrainModelingTool::readSettings ( QSettings &  qSettings)
overrideprotectedvirtual

Read settings by using Qt's "QSettings".

Parameters
[in]qSettingsQt settings instance to use
Note
  • The default implementation is empty

Reimplemented from qsf::editor::Tool.

virtual void qsf::editor::TerrainModelingTool::retranslateUi ( ToolboxView toolboxView)
overrideprotectedvirtual

Retranslate the UI.

Parameters
[in]toolboxViewOwner toolbox view
Note
  • The default implementation is empty
  • Only called by "qsf::editor::ToolboxView::retranslateUi()", so it's ensured that only the currently active and hence properly initialized tool receives the changed event

Reimplemented from qsf::editor::Tool.

virtual void qsf::editor::TerrainModelingTool::writeSettings ( QSettings &  qSettings)
overrideprotectedvirtual

Write settings by using Qt's "QSettings".

Parameters
[in]qSettingsQt settings instance to use
Note
  • The default implementation is empty

Reimplemented from qsf::editor::Tool.

Member Data Documentation

const uint32 qsf::editor::TerrainModelingTool::PLUGINABLE_ID
static

"qsf::editor::TerrainModelingTool" unique pluginable tool ID

Definition at line 76 of file TerrainModelingTool.h.


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