VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
tmEventHandler
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
21
#include "
tmEventHandler/tmEventHandlerDefines.h
"
22
class
DT_DLL_tmEventHandler
DtMapAreaSelectionHandler
:
public
DtEventHandler
23
{
24
Q_OBJECT
25
26
public
:
27
29
DtMapAreaSelectionHandler
();
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
104
inline
void
DtMapAreaSelectionHandler::setXMovement
(
double
i)
105
{
106
myXMovement
= i;
107
}
108
109
inline
double
DtMapAreaSelectionHandler::xMovement
()
const
110
{
111
return
myXMovement
;
112
}
113
114
inline
void
DtMapAreaSelectionHandler::setYMovement
(
double
i)
115
{
116
myYMovement
= i;
117
}
118
119
inline
double
DtMapAreaSelectionHandler::yMovement
()
const
120
{
121
return
myYMovement
;
122
}
123
124
inline
void
DtMapAreaSelectionHandler::setZMovement
(
double
d)
125
{
126
myZMovement
= d;
127
}
128
129
inline
double
DtMapAreaSelectionHandler::zMovement
()
const
130
{
131
return
myZMovement
;
132
}
133
134
#endif //MAPAREASELECTIONHANDLER_H_
Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)