VR-Forces 4.1.1 Class Documentation
mapAreaSelectionHandler.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: mapAreaSelectionHandler.h,v $ $Revision: 1.7 $ $State: Exp $
7 *******************************************************************************/
8 
11 
12 #ifndef MAPAREASELECTIONHANDLER_H_
13 #define MAPAREASELECTIONHANDLER_H_
14 
15 #include "tmqt/eventHandler.h"
16 
17 class DtBaseWindow;
18 class DtTMMapArea;
19 class DtModelData;
20 
23 {
24  Q_OBJECT
25 
26 public:
27 
30 
32  virtual ~DtMapAreaSelectionHandler();
33 
34 public:
36  static DtEventHandler* create(DtEventController* owner, void* usr);
37 
38 protected:
39  virtual bool keyboardEvent(DtTMMapArea*, QKeyEvent* evnt);
40 
42  virtual bool isMovementKey(int) const;
43 
45  virtual void moveModelData(DtTMMapArea*, DtModelData* data, int key);
46 
48  virtual DtPoint getOriginPoint(DtTMMapArea* area, DtModelData* data) const;
49 
51  virtual bool connecting(DtTMMapArea*);
52  virtual bool disconnecting(DtTMMapArea*);
53 
54 protected:
57  virtual bool isSelectedPointMove(DtTMMapArea*, DtModelData*) const;
58 
60  virtual bool isSelectedCircleMove(DtTMMapArea*, DtModelData*) const;
61 
64  virtual void moveSelectedPoint(DtTMMapArea*, DtModelData*, const DtPoint& delta);
65 
68  virtual void circleMove(DtTMMapArea*, DtModelData*, const DtPoint& delta);
69 
71  virtual void dragMove(DtTMMapArea*, DtModelData*, const DtPoint& delta);
72 
73 public:
74 
78  void setXMovement(double);
79  double xMovement() const;
80 
81  void setYMovement(double);
82  double yMovement() const;
83 
84  void setZMovement(double);
85  double zMovement() const;
86 
87 protected:
89  virtual void moveModelData(DtTMMapArea*area, DtModelData* data, const DtPoint& newOrigin);
90 
92  virtual bool isMoveableEvent(DtTMMapArea* area, int key) const;
93 
94 protected slots:
96  virtual void selectionChanged(const QVector<DtModelKey>&);
97 
98 protected:
99  double myXMovement;
100  double myYMovement;
101  double myZMovement;
102 };
103 
105 {
106  myXMovement = i;
107 }
108 
110 {
111  return myXMovement;
112 }
113 
115 {
116  myYMovement = i;
117 }
118 
120 {
121  return myYMovement;
122 }
123 
125 {
126  myZMovement = d;
127 }
128 
130 {
131  return myZMovement;
132 }
133 
134 #endif //MAPAREASELECTIONHANDLER_H_

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)