VR-Forces 4.0.4 Class Documentation
Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes
DtCreationHandler Class Reference

This handler creates entities. More...

Inheritance diagram for DtCreationHandler:
Inheritance graph
[legend]

List of all members.

Public Slots

virtual bool mouseEvent (DtTMMapArea *area, QMouseEvent *evnt, const DtPoint &pnt)
virtual void stop (const DtPoint &p)
virtual void updateTempSymbol ()=0

Signals

void creationSignal (const DtString &name, const DtEntityMapperKey &type, const DtList &vertices, const DtString &label, int appearance, int force, bool projection, bool closedFigure, DtReal heading, bool createSubObjects, DtSymbol *tempSymbol)
 Both signals are emitted if myEmitCreateSignal is true.
void editSignal (const DtString &name, const DtEntityMapperKey &type, const DtList &vertices, const DtString &label, int appearance, int force, DtReal heading, DtSymbol *tempSymbol)

Public Member Functions

 DtCreationHandler ()
 Default Constructor.
virtual ~DtCreationHandler ()
 Destructor.
virtual void setCreationObject (DtEntityMapperKey obj, int frc)
 Set the object you are creating.
virtual void activate ()
 Called when this event handler first becomes active.
virtual DtSymbolcreateTempSymbol (DtTMMapArea *area)
 Creates and removes the symbol that will follow the cursor on creation.
virtual void removeTempSymbol (DtTMMapArea *area)
virtual void setEditMode (bool b)
virtual void setModelData (DtModelData *d)
virtual void setShowDialog (DtShowDialogType type)
virtual void setEmitCreateSignal (bool)
 Emits signal when create, not actually do the creation. Default is false.

Protected Member Functions

virtual DtSymbolcreateSymbol (DtTMMapArea *area)=0
 Subclasses need to create temp symbol.
virtual void pointSelected (const DtPoint &p)=0
virtual void cancel ()=0
 Handle the cancelling of this object creation.
virtual bool enterEvent (DtTMMapArea *area, QEvent *evnt)
 Handles when the mouse enters a particular map area.
virtual void switchActiveMap (DtTMMapArea *area)
 Switches to the new active map and also sets up mouse tracking by turning off from old and activating on new.
virtual void trackMouseFor (DtTMMapArea *area, bool enable)
 Enables/disables mouse tracking for requested area.
virtual void deactivate ()
 Called when we are decativated, acts as a cancel on the current event.
virtual void showDialog (bool b)
 Override to show dialog only is dialog show type is WhenStartCreate, else show dialog when the appropriate conditions are met.
virtual void createComplete (bool finalPointSelected)
 Called at end of creation, will let the controller know we are done.
virtual QPixmap createCursor ()
 Creates/restores the override cusror to display that the handler is in creation mode.
virtual void restoreCursor ()
virtual bool keyboardEvent (DtTMMapArea *area, QKeyEvent *evnt)
 Add escape key cancel.

Protected Attributes

DtEntityMapperKey myCurrentObjectType
int myCurrentForceType
DtSymbolmyTempSymbol
DtTMMapAreamyActiveMap
bool myEditNotCreate
bool myStopped
bool myInvalid
DtModelDatamyModelData
DtShowDialogType myShowDialogType
DtTerrainModelDatamyCreatingFromTerrainData
 If non-NULL, creating this point from the supplied model data.
bool myDeactivating
bool myEmitCreateSignal
bool myCursorSet
Qt::KeyboardModifiers myKeyboardModifiers

Detailed Description

This handler creates entities.


Constructor & Destructor Documentation

Default Constructor.

Destructor.


Member Function Documentation

virtual void DtCreationHandler::setCreationObject ( DtEntityMapperKey  obj,
int  frc 
) [virtual]

Set the object you are creating.

Reimplemented in DtCreateControlObjectHandler.

virtual void DtCreationHandler::activate ( ) [virtual]

Called when this event handler first becomes active.

Reimplemented from DtEventHandler.

Reimplemented in DtCreateControlObjectHandler, and DtTerrainCreatePointHandler.

Creates and removes the symbol that will follow the cursor on creation.

Reimplemented in DtCreateControlObjectHandler, and DtTerrainCreateLineHandler.

virtual void DtCreationHandler::removeTempSymbol ( DtTMMapArea area) [virtual]
virtual void DtCreationHandler::setEditMode ( bool  b) [virtual]
virtual void DtCreationHandler::setModelData ( DtModelData d) [virtual]
virtual void DtCreationHandler::setShowDialog ( DtShowDialogType  type) [virtual]
void DtCreationHandler::setEmitCreateSignal ( bool  b) [inline, virtual]

Emits signal when create, not actually do the creation. Default is false.

Reimplemented in DtCreateLineHandler, and DtCreatePointHandler.

References myEmitCreateSignal.

virtual bool DtCreationHandler::mouseEvent ( DtTMMapArea area,
QMouseEvent *  evnt,
const DtPoint pnt 
) [virtual, slot]

Reimplemented from DtEventHandler.

Reimplemented in DtCreateControlObjectHandler, and DtCreateLineHandler.

virtual void DtCreationHandler::stop ( const DtPoint p) [virtual, slot]

Reimplemented in DtCreateControlObjectHandler.

virtual void DtCreationHandler::updateTempSymbol ( ) [pure virtual, slot]
void DtCreationHandler::creationSignal ( const DtString name,
const DtEntityMapperKey type,
const DtList &  vertices,
const DtString label,
int  appearance,
int  force,
bool  projection,
bool  closedFigure,
DtReal  heading,
bool  createSubObjects,
DtSymbol tempSymbol 
) [signal]

Both signals are emitted if myEmitCreateSignal is true.

void DtCreationHandler::editSignal ( const DtString name,
const DtEntityMapperKey type,
const DtList &  vertices,
const DtString label,
int  appearance,
int  force,
DtReal  heading,
DtSymbol tempSymbol 
) [signal]
virtual DtSymbol* DtCreationHandler::createSymbol ( DtTMMapArea area) [protected, pure virtual]

Subclasses need to create temp symbol.

Implemented in DtCreateControlObjectHandler, DtCreateLineHandler, and DtCreatePointHandler.

virtual void DtCreationHandler::pointSelected ( const DtPoint p) [protected, pure virtual]
virtual void DtCreationHandler::cancel ( ) [protected, pure virtual]

Handle the cancelling of this object creation.

Implemented in DtCreateControlObjectHandler.

virtual bool DtCreationHandler::enterEvent ( DtTMMapArea area,
QEvent *  evnt 
) [protected, virtual]

Handles when the mouse enters a particular map area.

If the area is different than the current active map, we need to change where the temp symbol is displayed

Reimplemented from DtEventHandler.

virtual void DtCreationHandler::switchActiveMap ( DtTMMapArea area) [protected, virtual]

Switches to the new active map and also sets up mouse tracking by turning off from old and activating on new.

virtual void DtCreationHandler::trackMouseFor ( DtTMMapArea area,
bool  enable 
) [protected, virtual]

Enables/disables mouse tracking for requested area.

virtual void DtCreationHandler::deactivate ( ) [protected, virtual]

Called when we are decativated, acts as a cancel on the current event.

Reimplemented from DtEventHandler.

Reimplemented in DtCreateControlObjectHandler.

virtual void DtCreationHandler::showDialog ( bool  b) [protected, virtual]

Override to show dialog only is dialog show type is WhenStartCreate, else show dialog when the appropriate conditions are met.

Reimplemented from DtEventHandler.

virtual void DtCreationHandler::createComplete ( bool  finalPointSelected) [protected, virtual]

Called at end of creation, will let the controller know we are done.

virtual QPixmap DtCreationHandler::createCursor ( ) [protected, virtual]

Creates/restores the override cusror to display that the handler is in creation mode.

Reimplemented in DtCreateControlObjectHandler.

virtual void DtCreationHandler::restoreCursor ( ) [protected, virtual]
virtual bool DtCreationHandler::keyboardEvent ( DtTMMapArea area,
QKeyEvent *  evnt 
) [protected, virtual]

Add escape key cancel.

Reimplemented from DtEventHandler.


Member Data Documentation

If non-NULL, creating this point from the supplied model data.

Referenced by setEmitCreateSignal().

Qt::KeyboardModifiers DtCreationHandler::myKeyboardModifiers [protected]

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)