![]() |
VR-Forces 4.0.4 Class Documentation
|
This handler creates entities. More...

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 DtSymbol * | createTempSymbol (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 DtSymbol * | createSymbol (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 |
| DtSymbol * | myTempSymbol |
| DtTMMapArea * | myActiveMap |
| bool | myEditNotCreate |
| bool | myStopped |
| bool | myInvalid |
| DtModelData * | myModelData |
| DtShowDialogType | myShowDialogType |
| DtTerrainModelData * | myCreatingFromTerrainData |
| If non-NULL, creating this point from the supplied model data. | |
| bool | myDeactivating |
| bool | myEmitCreateSignal |
| bool | myCursorSet |
| Qt::KeyboardModifiers | myKeyboardModifiers |
This handler creates entities.
Default Constructor.
| virtual DtCreationHandler::~DtCreationHandler | ( | ) | [virtual] |
Destructor.
| 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.
| virtual DtSymbol* DtCreationHandler::createTempSymbol | ( | DtTMMapArea * | area | ) | [virtual] |
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] |
Implemented in DtCreateControlObjectHandler.
| 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] |
Implemented in DtCreateControlObjectHandler, and DtCreatePointHandler.
| 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.
int DtCreationHandler::myCurrentForceType [protected] |
DtSymbol* DtCreationHandler::myTempSymbol [protected] |
DtTMMapArea* DtCreationHandler::myActiveMap [protected] |
bool DtCreationHandler::myEditNotCreate [protected] |
bool DtCreationHandler::myStopped [protected] |
bool DtCreationHandler::myInvalid [protected] |
DtModelData* DtCreationHandler::myModelData [protected] |
DtShowDialogType DtCreationHandler::myShowDialogType [protected] |
If non-NULL, creating this point from the supplied model data.
bool DtCreationHandler::myDeactivating [protected] |
bool DtCreationHandler::myEmitCreateSignal [protected] |
Referenced by setEmitCreateSignal().
bool DtCreationHandler::myCursorSet [protected] |
Qt::KeyboardModifiers DtCreationHandler::myKeyboardModifiers [protected] |