VR-Forces 4.0.4 Class Documentation
include/entityEditorImpl/formationDragDropHandler.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2008 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: formationDragDropHandler.h,v $ $Revision: 1.2 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef DTFORMATIONDRAGDROPHANDLER_H_
00013 #define DTFORMATIONDRAGDROPHANDLER_H_
00014 
00015 #include "tmEventHandler/dragDropHandler.h"
00016 #include "entityEditorImpl/entityEditorImplDefines.h"
00017 
00018 class DtFormationGridLineDrawer;
00019 
00020 class DT_DLL_entityeditorimpl DtFormationDragDropHandler : public DtDragDropHandler
00021 {
00022 public:
00023    DtFormationDragDropHandler();
00024 
00025    virtual bool isValidForDrag(DtTMMapArea* map, DtModelKey &key);
00026 
00027    void setSnapToGrid(bool);
00028    bool snapToGrid() const;
00029 
00030    void setGridLineDrawer(DtFormationGridLineDrawer*);
00031 
00032 protected:
00033    virtual void dropSymbol(DtTMMapArea* area, const QPoint& dropPoint, DtModelData* symData,
00034          double heightChange);
00035 
00036 protected:
00037    bool                       mySnapToGrid;
00038    DtFormationGridLineDrawer* myGridLineDrawer;
00039 };
00040 
00041 inline void DtFormationDragDropHandler::setGridLineDrawer(DtFormationGridLineDrawer* d)
00042 {
00043    myGridLineDrawer = d;
00044 }
00045 
00046 inline void DtFormationDragDropHandler::setSnapToGrid(bool b)
00047 {
00048    mySnapToGrid = b;
00049 }
00050 
00051 inline bool DtFormationDragDropHandler::snapToGrid() const
00052 {
00053    return mySnapToGrid;
00054 }
00055 
00056 #endif
00057 

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)