VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
tmEventHandler
navigationHandler.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2003 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
/*******************************************************************************
6
** $RCSfile: navigationHandler.h,v $ $Revision: 1.19 $ $State: Exp $
7
*******************************************************************************/
8
11
12
#ifndef NAVIGATIONHANDLER_H_
13
#define NAVIGATIONHANDLER_H_
14
15
#include "
tmqt/eventHandler.h
"
16
#include "
vrfGuiCore/menuItems.h
"
17
18
#include <QtCore/QPoint>
19
#include <QtCore/QTimer>
20
21
class
DtTMViewportExtents
;
22
class
DtExtent
;
23
class
DtTMArea
;
24
class
DtModelData
;
25
28
29
#include "
tmEventHandler/tmEventHandlerDefines.h
"
30
class
DT_DLL_tmEventHandler
DtNavigationHandler
:
public
DtEventHandler
31
{
32
Q_OBJECT
33
34
public
:
36
DtNavigationHandler
();
37
39
virtual
~
DtNavigationHandler
();
40
41
public
:
43
static
DtEventHandler
* create(
DtEventController
* owner,
void
* usr);
44
45
virtual
bool
aboutToDraw
(
DtTMMapArea
* area, QPainter* pix);
46
47
virtual
bool
userDefinedAction
(
DtUserDefinedType
iAction,
void
* usr);
48
49
public
slots:
50
virtual
bool
mouseEvent
(
DtTMMapArea
*, QMouseEvent* evnt,
const
DtPoint
& pnt);
51
virtual
bool
keyboardEvent
(
DtTMMapArea
* area, QKeyEvent* evnt);
52
53
virtual
void
timedPan();
54
55
protected
:
57
virtual
bool
processNavigationKey(
DtTMMapArea
* area,
int
key,
int
state);
58
59
protected
:
60
virtual
void
mouseZoom(
DtTMMapArea
* area, QMouseEvent *e);
61
62
virtual
void
reorderRectangle(QRect& rect);
63
virtual
void
resizeRectToFitAspectRatio(QRect& r,
const
double
& ratio);
64
virtual
void
resizeRectToFitAspectRatio(
DtExtent
& ext,
DtTMViewportExtents
* extents);
65
virtual
void
resizeRectToFitAspectRatioFromCenter(
DtExtent
& ext,
DtTMViewportExtents
* extents);
66
virtual
DtExtent
zoom(
const
DtExtent
& ext,
double
mag)
const
;
67
68
virtual
void
zoomToExtent(
DtTMMapArea
* area);
69
71
virtual
DtExtent
getZoomExtentRect(
DtTMMapArea
* area,
const
DtModelData
* d)
const
;
72
73
virtual
void
zoomToExtent(
DtTMMapArea
* area,
const
QRect& rect);
74
virtual
DtExtent
convertRectToExtent(
DtTMMapArea
* area,
const
QRect& rect)
const
;
75
77
virtual
void
setCursor(QEvent*);
78
79
protected
:
80
DtUserDefinedType
myNavigationDirection
;
81
QTimer
myPanTimer
;
82
bool
myShiftTracking
;
83
QPoint
myMouseBegin
;
84
QPoint
myMouseLast
;
85
DtTMArea
*
myTimerMap
;
86
int
myKey
;
87
int
myState
;
88
bool
myLeftButton
;
89
bool
myMouseShiftMap
;
90
bool
myInMapShiftMode
;
91
92
DtPoint
myMapBegin
;
93
DtPoint
myMapLast
;
94
};
95
96
#endif //NAVIGATIONHANDLER_H_
97
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
)