VR-Forces 4.1.1 Class Documentation
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
DtFormationDragDropHandler Class Reference
Inheritance diagram for DtFormationDragDropHandler:
Inheritance graph
[legend]

Public Member Functions

 DtFormationDragDropHandler ()
virtual bool isValidForDrag (DtTMMapArea *map, DtModelKey &key)
 Override to return true/false to determine if the selected object is valid for dragging.
void setSnapToGrid (bool)
bool snapToGrid () const
void setGridLineDrawer (DtFormationGridLineDrawer *)
- Public Member Functions inherited from DtDragDropHandler
 DtDragDropHandler ()
 Default Constructor.
virtual ~DtDragDropHandler ()
 Destructor.
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)
- 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.

Protected Member Functions

virtual void dropSymbol (DtTMMapArea *area, const QPoint &dropPoint, DtModelData *symData, double heightChange)
 Drop the specified symbol into the map area.
- Protected Member Functions inherited from DtDragDropHandler
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 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

bool mySnapToGrid
DtFormationGridLineDrawermyGridLineDrawer
- Protected Attributes inherited from DtDragDropHandler
QHash< DtTMMapArea
*, DtDragData * > 
myMapDragData
bool myCompletedDrag
- Protected Attributes inherited from DtEventHandler
QWidgetmyEventDlg
DtEventControllermyEventController
bool mySuspended
- Protected Attributes inherited from DtArchivableObject
DtArchivermyArchiver

Additional Inherited Members

- Public Slots inherited from DtDragDropHandler
virtual bool mouseEvent (DtTMMapArea *area, QMouseEvent *evnt, const DtPoint &pnt)
- Signals inherited from DtEventHandler
void closedDialog ()
- Static Public Member Functions inherited from DtDragDropHandler
static DtEventHandlercreate (DtEventController *owner, void *usr)
 Static creator.
- Protected Slots inherited from DtDragDropHandler
virtual bool dropSymbols (DtTMMapArea *area, QDropEvent *e)
 Called when dropping symbols from either the right mouse context menu or from the left button.

Constructor & Destructor Documentation

DtFormationDragDropHandler::DtFormationDragDropHandler ( )

Member Function Documentation

virtual bool DtFormationDragDropHandler::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 from DtDragDropHandler.

void DtFormationDragDropHandler::setSnapToGrid ( bool  b)
inline

References mySnapToGrid.

bool DtFormationDragDropHandler::snapToGrid ( ) const
inline

References mySnapToGrid.

Referenced by DtFormationEditor::snapToGrid().

void DtFormationDragDropHandler::setGridLineDrawer ( DtFormationGridLineDrawer d)
inline

References myGridLineDrawer.

virtual void DtFormationDragDropHandler::dropSymbol ( DtTMMapArea area,
const QPoint &  dropPoint,
DtModelData symData,
double  heightChange 
)
protectedvirtual

Drop the specified symbol into the map area.

Reimplemented from DtDragDropHandler.

Member Data Documentation

bool DtFormationDragDropHandler::mySnapToGrid
protected

Referenced by setSnapToGrid(), and snapToGrid().

DtFormationGridLineDrawer* DtFormationDragDropHandler::myGridLineDrawer
protected

Referenced by setGridLineDrawer().


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)