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

Creates an inset map area. More...

Inheritance diagram for DtDragDropHandler:
Inheritance graph
[legend]

List of all members.

Public Slots

virtual bool mouseEvent (DtTMMapArea *area, QMouseEvent *evnt, const DtPoint &pnt)

Public Member Functions

 DtDragDropHandler ()
 Default Constructor.
virtual ~DtDragDropHandler ()
 Destructor.
virtual bool isValidForDrag (DtTMMapArea *map, DtModelKey &key)
 Override to return true/false to determine if the selected object is valid for dragging.
virtual DtDragObjectcreateDragObject (DtTMMapArea *activeMap, QString &dragging)
 Drag/Drop code Creates an object that will be used as part of the drag/drop operation to keep track of what is being dragged.
virtual void dragMove (DtTMMapArea *area, DtModelData *data, const DtPoint &delta)
 Moves the item by the supplied amount.
virtual bool dropEvent (DtTMMapArea *area, QDropEvent *evnt)
virtual bool dragMoveEvent (DtTMMapArea *area, QDragMoveEvent *evnt)
virtual bool dragEnterEvent (DtTMMapArea *area, QDragEnterEvent *evnt)
virtual bool dragLeaveEvent (DtTMMapArea *area, QDragLeaveEvent *evnt)

Static Public Member Functions

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

Protected Slots

virtual bool dropSymbols (DtTMMapArea *area, QDropEvent *e)
 Called when dropping symbols from either the right mouse context menu or from the left button.

Protected Member Functions

virtual bool canDrag (DtTMMapArea *area) const
 Return true if this handler can start a drag.
virtual void endDrag (DtTMMapArea *area, int timerMsec)
 Called to remove drag symbols.
virtual bool getDropLocationData (DtTMMapArea *area, const QPoint &dropPoint, QString &idStr, QVector< DtPoint > &pnts, double heightChange)
 Called when an item is dropped, this routine will allow for returning of new point data based upon the drop.
virtual DtDragDatadragDataForArea (DtTMMapArea *area)
 Creates (or returns) a drag data object for the specified area.
virtual void tick ()
virtual void dropSymbol (DtTMMapArea *area, const QPoint &dropPoint, DtModelData *symData, double heightChange=0.)
 Drop the specified symbol into the map area.
virtual int timeout () const
 Returns how long the temp symbols should stay on map before removing to show modified symbols.
virtual bool dragAboutToStart (DtTMMapArea *)
 Called right before a drag is about to start. Return false to abort drag. Calls dragStart() in map area.
virtual void modifyPoint (const DtModelData &data, DtPoint &pnt)
 Override to modify the point before adding to model data.
virtual bool dropSymbols (DtTMMapArea *area, const QPoint &dropPoint, const QString &idStr, double heightChange=0.)

Protected Attributes

QHash< DtTMMapArea
*, DtDragData * > 
myMapDragData
bool myCompletedDrag

Detailed Description

Creates an inset map area.


Constructor & Destructor Documentation

Default Constructor.

Destructor.


Member Function Documentation

virtual bool DtDragDropHandler::isValidForDrag ( DtTMMapArea map,
DtModelKey key 
) [virtual]

Override to return true/false to determine if the selected object is valid for dragging.

The map is the map area that is scheduled for the drag operation to being in

Reimplemented in DtTerrainDragDropHandler, and DtFormationDragDropHandler.

virtual DtDragObject* DtDragDropHandler::createDragObject ( DtTMMapArea activeMap,
QString &  dragging 
) [virtual]

Drag/Drop code Creates an object that will be used as part of the drag/drop operation to keep track of what is being dragged.

virtual void DtDragDropHandler::dragMove ( DtTMMapArea area,
DtModelData data,
const DtPoint delta 
) [virtual]

Moves the item by the supplied amount.

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

Static creator.

Reimplemented in DtTerrainDragDropHandler.

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

Reimplemented from DtEventHandler.

virtual bool DtDragDropHandler::dropSymbols ( DtTMMapArea area,
QDropEvent *  e 
) [protected, virtual, slot]

Called when dropping symbols from either the right mouse context menu or from the left button.

virtual bool DtDragDropHandler::dropEvent ( DtTMMapArea area,
QDropEvent *  evnt 
) [virtual]

Reimplemented from DtEventHandler.

virtual bool DtDragDropHandler::dragMoveEvent ( DtTMMapArea area,
QDragMoveEvent *  evnt 
) [virtual]

Reimplemented from DtEventHandler.

virtual bool DtDragDropHandler::dragEnterEvent ( DtTMMapArea area,
QDragEnterEvent *  evnt 
) [virtual]

Reimplemented from DtEventHandler.

virtual bool DtDragDropHandler::dragLeaveEvent ( DtTMMapArea area,
QDragLeaveEvent *  evnt 
) [virtual]

Reimplemented from DtEventHandler.

virtual bool DtDragDropHandler::canDrag ( DtTMMapArea area) const [protected, virtual]

Return true if this handler can start a drag.

Reimplemented in DtTerrainDragDropHandler.

virtual void DtDragDropHandler::endDrag ( DtTMMapArea area,
int  timerMsec 
) [protected, virtual]

Called to remove drag symbols.

virtual bool DtDragDropHandler::getDropLocationData ( DtTMMapArea area,
const QPoint &  dropPoint,
QString &  idStr,
QVector< DtPoint > &  pnts,
double  heightChange 
) [protected, virtual]

Called when an item is dropped, this routine will allow for returning of new point data based upon the drop.

If no new point data is given, return false. The pnts list must contain new location data. The idStr is the id of the symbol that can be retrieved by calling getSymbol from the view driver or the model data by calling .find from the model data dictionary. Currently, this routine will see if the dropped item is of type intervisibility, and, if it is, massage the data

virtual DtDragData* DtDragDropHandler::dragDataForArea ( DtTMMapArea area) [protected, virtual]

Creates (or returns) a drag data object for the specified area.

virtual void DtDragDropHandler::tick ( ) [protected, virtual]

Reimplemented from DtEventHandler.

virtual void DtDragDropHandler::dropSymbol ( DtTMMapArea area,
const QPoint &  dropPoint,
DtModelData symData,
double  heightChange = 0. 
) [protected, virtual]

Drop the specified symbol into the map area.

Reimplemented in DtFormationDragDropHandler.

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

Returns how long the temp symbols should stay on map before removing to show modified symbols.

virtual bool DtDragDropHandler::dragAboutToStart ( DtTMMapArea ) [protected, virtual]

Called right before a drag is about to start. Return false to abort drag. Calls dragStart() in map area.

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

Override to modify the point before adding to model data.

virtual bool DtDragDropHandler::dropSymbols ( DtTMMapArea area,
const QPoint &  dropPoint,
const QString &  idStr,
double  heightChange = 0. 
) [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)