VR-Forces 4.1.1 Class Documentation
List of all members | 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]

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 Slots inherited from DtEventHandler
virtual bool mouseEvent (DtTMMapArea *, QMouseEvent *evnt, const DtPoint &pnt)
virtual bool keyboardEvent (DtTMMapArea *, QKeyEvent *evnt)
virtual bool symbolsSelected (DtTMMapArea *area, DtSymbolList *sl)
virtual bool selectionUpdated (DtTMMapArea *area, const QVector< DtModelKey > &d)
virtual bool selectionInProgress (DtTMMapArea *area, DtSymbolSelector &d)
virtual bool focusEvent (DtTMMapArea *, QEvent *evnt)
virtual bool enterEvent (DtTMMapArea *area, QEvent *evnt)
virtual bool leaveEvent (DtTMMapArea *area, QEvent *evnt)
virtual bool dropEvent (DtTMMapArea *area, QDropEvent *evnt)
virtual bool dragEnterEvent (DtTMMapArea *area, QDragEnterEvent *evnt)
virtual bool dragMoveEvent (DtTMMapArea *area, QDragMoveEvent *evnt)
virtual bool dragLeaveEvent (DtTMMapArea *area, QDragLeaveEvent *evnt)
virtual bool userDefinedAction (DtUserDefinedType iAction, void *usr)
virtual bool aboutToDraw (DtTMMapArea *area, QPainter *)
virtual bool mapActivated (DtTMMapArea *area)
virtual bool selectedModelDataUpdated (DtTMMapArea *area)
virtual bool symbolAdded (DtTMMapArea *area, const DtModelKey &)
virtual bool symbolRemoved (DtTMMapArea *area, const DtModelKey &)
virtual bool disconnecting (DtTMMapArea *area)
 Called when a map is being disconnect from an event handler.
virtual bool connecting (DtTMMapArea *area)
 Called when a map is being connected to an event handler.
virtual void tick ()
virtual void clearDialog ()

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.
- Public Member Functions inherited from DtEventHandler
 DtEventHandler ()
 Default Constructor.
virtual ~DtEventHandler ()
 Destructor.
virtual void setEventController (DtEventController *)
virtual void setInitialSelection (const QVector< DtModelKey > &d)
virtual void showDialog (bool b)
virtual QWidgetcreateDialog (QWidget *w)
 Creates the dialog associated with this handler (if there is one)
virtual QWidgetdialog (bool createIfMissing=true, QWidget *parent=NULL)
 If createIfMissing is true, will create the dialog based on the supplied parent window, else will simply return the dialog pointer.
virtual void reset ()
virtual DtBaseWindowbaseWindow () const
 Returns the base window of the event controller.
virtual void activate ()
 Called when this event handler first becomes active.
virtual void deactivate ()
 Called when this event handler is removed as the current event.
virtual void setBaseWindow (DtBaseWindow *w)
 Called when the base window is set for the event controller.
virtual void init ()
 Called when the handler is first created, initialize context.
void setSuspended (bool)
 Set when something wants to suspend some aspect of this handler without deactivating it.
bool suspended () const
virtual void dialogDestroyedEvent ()
 Called when dialog is destroyed.
- Public Member Functions inherited from DtArchivableObject
 DtArchivableObject (QString name, DtArchivableObjectCreator fcn)
 This constructor will add this object to the archivable object factory.
 DtArchivableObject (QString name)
 DtArchivableObject ()
virtual ~DtArchivableObject ()
virtual QString name () const
DtArchiverarchiver ()
 Returns the archiver of this object.
virtual void read (QTextStream &s)
 Reads/writes archiver.
virtual void write (QTextStream &s)
virtual void setLevel (int i)
virtual int level () const
virtual DtArchivableObjectclone ()
 Allows for cloning of this object.

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
- Protected Attributes inherited from DtEventHandler
QWidgetmyEventDlg
DtEventControllermyEventController
bool mySuspended
- Protected Attributes inherited from DtArchivableObject
DtArchivermyArchiver

Additional Inherited Members

- Signals inherited from DtEventHandler
void closedDialog ()

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

DtVertexEditorHandler::DtVertexEditorHandler ( )

Default Constructor.

virtual DtVertexEditorHandler::~DtVertexEditorHandler ( )
virtual

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 ( )
virtualslot

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

virtual void DtVertexEditorHandler::processAddPoint ( )
virtualslot

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 
)
virtualslot
virtual void DtVertexEditorHandler::processDeletePoint ( )
virtualslot

Delete the currently selected point on the currently selected line.

virtual bool DtVertexEditorHandler::mouseEvent ( DtTMMapArea area,
QMouseEvent *  evnt,
const DtPoint pnt 
)
virtualslot
virtual bool DtVertexEditorHandler::keyboardEvent ( DtTMMapArea area,
QKeyEvent *  evnt 
)
virtualslot
virtual bool DtVertexEditorHandler::deleteSelectedPoint ( DtTMMapArea area)
virtualslot

Deletes the selected point of the line.

virtual void DtVertexEditorHandler::moveSelectedPointBy ( DtTMMapArea area,
DtModelData data,
const DtPoint delta 
)
virtualslot

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 
)
protectedvirtual

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

virtual void DtVertexEditorHandler::cancelMove ( )
protectedvirtual

Restores backup data.

virtual void DtVertexEditorHandler::acceptMove ( const QPoint &  pnt,
const DtPoint dbPoint 
)
protectedvirtual

Accepts move.

virtual bool DtVertexEditorHandler::completeMove ( const QPoint &  pnt,
const DtPoint dbPoint 
)
protectedvirtual

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
protectedvirtual

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
protectedvirtual
virtual DtModelData* DtVertexEditorHandler::getModelData ( DtTMMapArea area) const
protectedvirtual
virtual DtSymbol* DtVertexEditorHandler::getEditingSymbol ( DtTMMapArea area,
const DtPoint atLocation = NULL 
) const
protectedvirtual

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

virtual void DtVertexEditorHandler::createTempSymbol ( DtTMMapArea area)
protectedvirtual

Creates and displays a temp symbol to edit.

virtual void DtVertexEditorHandler::removeTempSymbol ( DtTMMapArea area)
protectedvirtual

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

virtual DtSymbol* DtVertexEditorHandler::createSymbol ( DtTMMapArea area)
protectedvirtual

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

virtual bool DtVertexEditorHandler::initializeEdit ( DtTMMapArea area)
protectedvirtual

Initializes internal symbols for editing.

virtual void DtVertexEditorHandler::addPointTo ( DtLineSymbol symbol,
const QPoint &  pos 
)
protectedvirtual

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

virtual int DtVertexEditorHandler::timeout ( ) const
protectedvirtual

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 
)
protectedvirtual

Override to modify the point before adding to model data.

virtual void DtVertexEditorHandler::clearTimer ( )
protectedvirtual

Member Data Documentation

DtSymbol* DtVertexEditorHandler::myTempSymbol
protected
DtTMMapArea* DtVertexEditorHandler::myActiveMap
protected
DtSymbol* DtVertexEditorHandler::myWorkingSymbol
protected
DtModelData* DtVertexEditorHandler::myModelData
protected
bool DtVertexEditorHandler::myAddingPoint
protected
QTimer* DtVertexEditorHandler::myAcceptTimer
protected

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

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)