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

Edit mode for creating an new street edge or expand an existing edge, between to points of the street crossing component. More...

#include <AddStreetEdgeEditMode.h>

Public Member Functions

 AddStreetEdgeEditMode (EditModeManager *editModeManager)
 Constructor. More...
 
virtual ~AddStreetEdgeEditMode ()
 Destructor. More...
 
void setBeginPosition (const glm::vec3 &beginNode, int firstNodeIndex, StreetCrossingComponent *streetCrossingComponent)
 Give the initial position for creating a street. More...
 
- Public Member Functions inherited from qsf::editor::StreetEditMode
virtual ~StreetEditMode ()
 Destructor. More...
 
- Public Member Functions inherited from qsf::editor::NodesEditMode
virtual ~NodesEditMode ()
 Destructor. More...
 
float getDefaultNodeRadius () const
 Get the default node radius for newly created nodes. More...
 
void setDefaultNodeRadius (float defaultNodeRadius)
 Set default node radius for newly created nodes. More...
 
Node createNode (const glm::vec3 &position) const
 Create a new node instance with the given local space node position and the default node radius. More...
 
- Public Member Functions inherited from qsf::editor::EditMode
virtual ~EditMode ()
 Destructor. More...
 
ApplicationgetApplication () const
 Return the QSF editor application. More...
 
MainWindowgetMainWindow () const
 Return the main window. More...
 
RenderViewgetRenderView () const
 Return the render view. More...
 
bool isRunning () const
 Return whether or not the edit mode is up-and-running. More...
 
void switchToEditModeById (const StringHash &id) const
 Switch to an edit mode instance by using its unique identifier. More...
 
void switchToPreviousEditMode ()
 Switch back to the edit mode which was selected before the currently selected edit mode got selected. More...
 
virtual bool eventFilter (QObject *qObject, QEvent *qEvent) override
 
- Public Member Functions inherited from qsf::Pluginable< EditModeManager >
virtual ~Pluginable ()
 Destructor. More...
 
EditModeManager & 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::AddStreetEdgeEditMode" unique pluginable edit mode ID More...
 
- Static Public Attributes inherited from qsf::editor::NodesEditMode
static const uint32 PLUGINABLE_ID
 "qsf::editor::NodesEditMode" unique pluginable edit mode ID More...
 

Protected Member Functions

virtual bool onStartup (EditMode *previousEditMode) override
 Startup the edit mode. More...
 
virtual void onShutdown (EditMode *nextEditMode) override
 Shutdown the edit mode. More...
 
virtual void mousePressEvent (QMouseEvent &qMouseEvent) override
 
virtual void mouseMoveEvent (QMouseEvent &qMouseEvent) override
 
- Protected Member Functions inherited from qsf::editor::StreetEditMode
 StreetEditMode (EditModeManager *editModeManager)
 Constructor. More...
 
- Protected Member Functions inherited from qsf::editor::NodesEditMode
 NodesEditMode (EditModeManager *editModeManager)
 Constructor. More...
 
NodesComponentgetNodesComponent () const
 Return the used nodes component instance. More...
 
virtual void focusInEvent (QFocusEvent &qFocusEvent) override
 
virtual void focusOutEvent (QFocusEvent &qFocusEvent) override
 
- Protected Member Functions inherited from qsf::editor::EditMode
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...
 
virtual void mouseReleaseEvent (QMouseEvent &qMouseEvent)
 
virtual void mouseButtonDblClick (QMouseEvent &qMouseEvent)
 
virtual void enterEvent (QEvent &qEvent)
 
virtual void leaveEvent (QEvent &qEvent)
 
virtual void keyPressEvent (QKeyEvent &qEvent)
 
virtual void keyReleaseEvent (QKeyEvent &qEvent)
 
virtual void dragEnterEvent (QDragEnterEvent &qDragEnterEvent)
 
virtual void dragMoveEvent (QDragMoveEvent &qDragMoveEvent)
 
virtual void dragLeaveEvent (QDragLeaveEvent &qDragLeaveEvent)
 
virtual void dropEvent (QDropEvent &qDropEvent)
 
 EditMode (EditModeManager *editModeManager)
 Constructor. More...
 
- Protected Member Functions inherited from qsf::Pluginable< EditModeManager >
 Pluginable (EditModeManager *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 Slots inherited from qsf::editor::NodesEditMode
void onTriggeredSnapToGround ()
 
void onTriggeredSnapToObject ()
 
void onTriggeredSnapToVertex ()
 

Detailed Description

Edit mode for creating an new street edge or expand an existing edge, between to points of the street crossing component.

Todo:
  • TODO(mk) Finish this class, works with street crossing component

Definition at line 46 of file AddStreetEdgeEditMode.h.

Constructor & Destructor Documentation

qsf::editor::AddStreetEdgeEditMode::AddStreetEdgeEditMode ( EditModeManager editModeManager)
explicit

Constructor.

Parameters
[in]editModeManagerThe edit mode manager this edit mode 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::AddStreetEdgeEditMode::~AddStreetEdgeEditMode ( )
virtual

Destructor.

Member Function Documentation

virtual void qsf::editor::AddStreetEdgeEditMode::mouseMoveEvent ( QMouseEvent &  qMouseEvent)
overrideprotectedvirtual

Reimplemented from qsf::editor::EditMode.

virtual void qsf::editor::AddStreetEdgeEditMode::mousePressEvent ( QMouseEvent &  qMouseEvent)
overrideprotectedvirtual

Reimplemented from qsf::editor::EditMode.

virtual void qsf::editor::AddStreetEdgeEditMode::onShutdown ( EditMode nextEditMode)
overrideprotectedvirtual

Shutdown the edit mode.

Parameters
[in]nextEditModeNext edit mode, can be a null pointer
Remarks
The implementation does the following tasks:
  • Remove event filter on the Qt render view of the main window
Note
  • Only called in case "onStartup()" returned successfully

Reimplemented from qsf::editor::NodesEditMode.

virtual bool qsf::editor::AddStreetEdgeEditMode::onStartup ( EditMode previousEditMode)
overrideprotectedvirtual

Startup the edit mode.

Parameters
[in]previousEditModePrevious edit mode, can be a null pointer
Returns
"true" if all went fine, else "false"
Remarks
The implementation does the following tasks:
  • Install event filter on the Qt render view of the main window

Reimplemented from qsf::editor::NodesEditMode.

void qsf::editor::AddStreetEdgeEditMode::setBeginPosition ( const glm::vec3 &  beginNode,
int  firstNodeIndex,
StreetCrossingComponent streetCrossingComponent 
)

Give the initial position for creating a street.

Parameters
[in]streetCrossingComponentStreet crossing component instance to operate on, can be a null pointer, must stay valid as long as this edit mode operates on the instance

Member Data Documentation

const uint32 qsf::editor::AddStreetEdgeEditMode::PLUGINABLE_ID
static

"qsf::editor::AddStreetEdgeEditMode" unique pluginable edit mode ID

Definition at line 61 of file AddStreetEdgeEditMode.h.


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