VR-Forces 4.0.4 Class Documentation
Public Slots | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtVertexEditorHandler Class Reference

This handler will allow users to click on knobs on line symbols to change the shape of those symbols. More...

Inheritance diagram for DtVertexEditorHandler:
Inheritance graph
[legend]

List of all members.

Public Slots

virtual void done ()
 Called when done editing symbol (either from accept or cancel)
virtual void processAddPoint ()
 Add a point on the current selected line, at the current selected segment, at the last point selected on the line.
virtual void processAddPoint (DtTMMapArea *area, DtLineSymbol *line, const DtPoint &pnt)
virtual void processDeletePoint ()
 Delete the currently selected point on the currently selected line.
virtual bool mouseEvent (DtTMMapArea *area, QMouseEvent *evnt, const DtPoint &pnt)
virtual bool keyboardEvent (DtTMMapArea *area, QKeyEvent *evnt)
virtual bool deleteSelectedPoint (DtTMMapArea *area)
 Deletes the selected point of the line.
virtual void moveSelectedPointBy (DtTMMapArea *area, DtModelData *data, const DtPoint &delta)
 Given the model data and map area, find the line symbol and selected point, and move it by the delta amount.

Public Member Functions

 DtVertexEditorHandler ()
 Default Constructor.
virtual ~DtVertexEditorHandler ()
 Destructor.
virtual bool canAddPointTo (DtTMMapArea *area, DtSymbol *symbol)
virtual bool canDeletePoint (DtTMMapArea *area, DtSymbol *symbol)
 Returns true as to whether or not the currently selected point can be deleted.
virtual bool canMovePoint (DtTMMapArea *area, DtSymbol *line)
 Returns true if the point can be moved.

Static Public Member Functions

static DtEventHandlercreate (DtEventController *owner, void *usr)
 Static creator.

Protected Member Functions

virtual void moveSelectedPointTo (DtTMMapArea *area, const QPoint &pnt, const DtPoint &dbPoint)
 Moves the selected point of the symbol being edited to the new location.
virtual void cancelMove ()
 Restores backup data.
virtual void acceptMove (const QPoint &pnt, const DtPoint &dbPoint)
 Accepts move.
virtual bool completeMove (const QPoint &pnt, const DtPoint &dbPoint)
 Called before any temp symbols are removed from the screen, use this routine to complete a move without removing any temp symbols.
virtual DtSymbolgetWorkingSymbol (DtTMMapArea *area, const DtPoint *atLocation=NULL) const
 Returns the symbol we want to work with.
virtual DtSymbolgetWorkingSymbol (DtSymbol *symbol) const
virtual DtModelDatagetModelData (DtTMMapArea *area) const
virtual DtSymbolgetEditingSymbol (DtTMMapArea *area, const DtPoint *atLocation=NULL) const
 Returns the first symbol in the selected list of the supplied map area.
virtual void createTempSymbol (DtTMMapArea *area)
 Creates and displays a temp symbol to edit.
virtual void removeTempSymbol (DtTMMapArea *area)
 Creates and removes the symbol that will follow the cursor on creation.
virtual DtSymbolcreateSymbol (DtTMMapArea *area)
 Creates the symbol that will be used as a temp symbol.
virtual bool initializeEdit (DtTMMapArea *area)
 Initializes internal symbols for editing.
virtual void addPointTo (DtLineSymbol *symbol, const QPoint &pos)
 Returns true if a point can be added to the supplied symbol.
virtual int timeout () const
 Return the amount of miliseconds to wait before removing temp symbol and replacing with working symbol.
virtual void modifyPoint (const DtModelData &data, DtPoint &pnt)
 Override to modify the point before adding to model data.
virtual void clearTimer ()

Protected Attributes

DtSymbolmyTempSymbol
DtTMMapAreamyActiveMap
DtSymbolmyWorkingSymbol
DtModelDatamyModelData
bool myAddingPoint
QTimer * myAcceptTimer

Detailed Description

This handler will allow users to click on knobs on line symbols to change the shape of those symbols.

Only one knob can be selected at any given time, so this handler will only work with the first item in the current selection


Constructor & Destructor Documentation

Default Constructor.

Destructor.


Member Function Documentation

virtual bool DtVertexEditorHandler::canAddPointTo ( DtTMMapArea area,
DtSymbol symbol 
) [virtual]
virtual bool DtVertexEditorHandler::canDeletePoint ( DtTMMapArea area,
DtSymbol symbol 
) [virtual]

Returns true as to whether or not the currently selected point can be deleted.

virtual bool DtVertexEditorHandler::canMovePoint ( DtTMMapArea area,
DtSymbol line 
) [virtual]

Returns true if the point can be moved.

static DtEventHandler* DtVertexEditorHandler::create ( DtEventController owner,
void *  usr 
) [static]

Static creator.

virtual void DtVertexEditorHandler::done ( ) [virtual, slot]

Called when done editing symbol (either from accept or cancel)

virtual void DtVertexEditorHandler::processAddPoint ( ) [virtual, slot]

Add a point on the current selected line, at the current selected segment, at the last point selected on the line.

virtual void DtVertexEditorHandler::processAddPoint ( DtTMMapArea area,
DtLineSymbol line,
const DtPoint pnt 
) [virtual, slot]
virtual void DtVertexEditorHandler::processDeletePoint ( ) [virtual, slot]

Delete the currently selected point on the currently selected line.

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

Reimplemented from DtEventHandler.

virtual bool DtVertexEditorHandler::keyboardEvent ( DtTMMapArea area,
QKeyEvent *  evnt 
) [virtual, slot]

Reimplemented from DtEventHandler.

virtual bool DtVertexEditorHandler::deleteSelectedPoint ( DtTMMapArea area) [virtual, slot]

Deletes the selected point of the line.

virtual void DtVertexEditorHandler::moveSelectedPointBy ( DtTMMapArea area,
DtModelData data,
const DtPoint delta 
) [virtual, slot]

Given the model data and map area, find the line symbol and selected point, and move it by the delta amount.

virtual void DtVertexEditorHandler::moveSelectedPointTo ( DtTMMapArea area,
const QPoint &  pnt,
const DtPoint dbPoint 
) [protected, virtual]

Moves the selected point of the symbol being edited to the new location.

virtual void DtVertexEditorHandler::cancelMove ( ) [protected, virtual]

Restores backup data.

virtual void DtVertexEditorHandler::acceptMove ( const QPoint &  pnt,
const DtPoint dbPoint 
) [protected, virtual]

Accepts move.

virtual bool DtVertexEditorHandler::completeMove ( const QPoint &  pnt,
const DtPoint dbPoint 
) [protected, virtual]

Called before any temp symbols are removed from the screen, use this routine to complete a move without removing any temp symbols.

virtual DtSymbol* DtVertexEditorHandler::getWorkingSymbol ( DtTMMapArea area,
const DtPoint atLocation = NULL 
) const [protected, virtual]

Returns the symbol we want to work with.

If atLocation is not NULL and the map area does not have any symbols selected, asks the map area what would be selected under that point

virtual DtSymbol* DtVertexEditorHandler::getWorkingSymbol ( DtSymbol symbol) const [protected, virtual]
virtual DtModelData* DtVertexEditorHandler::getModelData ( DtTMMapArea area) const [protected, virtual]
virtual DtSymbol* DtVertexEditorHandler::getEditingSymbol ( DtTMMapArea area,
const DtPoint atLocation = NULL 
) const [protected, virtual]

Returns the first symbol in the selected list of the supplied map area.

virtual void DtVertexEditorHandler::createTempSymbol ( DtTMMapArea area) [protected, virtual]

Creates and displays a temp symbol to edit.

virtual void DtVertexEditorHandler::removeTempSymbol ( DtTMMapArea area) [protected, virtual]

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

virtual DtSymbol* DtVertexEditorHandler::createSymbol ( DtTMMapArea area) [protected, virtual]

Creates the symbol that will be used as a temp symbol.

virtual bool DtVertexEditorHandler::initializeEdit ( DtTMMapArea area) [protected, virtual]

Initializes internal symbols for editing.

virtual void DtVertexEditorHandler::addPointTo ( DtLineSymbol symbol,
const QPoint &  pos 
) [protected, virtual]

Returns true if a point can be added to the supplied symbol.

virtual int DtVertexEditorHandler::timeout ( ) const [protected, virtual]

Return the amount of miliseconds to wait before removing temp symbol and replacing with working symbol.

virtual void DtVertexEditorHandler::modifyPoint ( const DtModelData data,
DtPoint pnt 
) [protected, virtual]

Override to modify the point before adding to model data.

virtual void DtVertexEditorHandler::clearTimer ( ) [protected, virtual]

Member Data Documentation


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)