VR-Forces 4.1 Class Documentation
eventHandler.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2000 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: eventHandler.h,v $ $Revision: 1.13 $ $State: Exp $
7 *******************************************************************************/
8 
11 
12 #ifndef EVENTHANDLER_H_
13 #define EVENTHANDLER_H_
14 
15 
16 #include <geometry/point.h>
17 #include <symbolMapper/modelKey.h>
18 
19 #include <QtGui/QWidget>
20 #include <QtCore/QObject>
21 
22 #include "tmqt/eventHandlers.h"
24 
25 class DtEventController;
26 class DtSymbolList;
27 class DtTMMapArea;
28 class DtBaseWindow;
29 class DtSymbolSelector;
30 #include "symbolMapper/modelKey.h"
31 class QPixmap;
32 #include "tmqt/tmqtDefines.h"
34 {
35  Q_OBJECT
36 
37 public:
38 
41 
43  virtual ~DtEventHandler();
44 
45  virtual void setEventController(DtEventController*);
46 
47  virtual void setInitialSelection(const QVector<DtModelKey>& d);
48 
49  virtual void showDialog(bool b);
50 
53  virtual QWidget* createDialog(QWidget* w);
54 
58  virtual QWidget* dialog(bool createIfMissing = true, QWidget* parent = NULL);
59 
60  virtual void reset();
61 
63  virtual DtBaseWindow* baseWindow() const;
64 
66  virtual void activate();
67 
69  virtual void deactivate();
70 
72  virtual void setBaseWindow(DtBaseWindow* w);
73 
75  virtual void init();
76 
79  void setSuspended(bool);
80  bool suspended() const;
81 
83  virtual void dialogDestroyedEvent();
84 
85 signals:
86  void closedDialog();
87 
88 public slots:
89 
90  virtual bool mouseEvent(DtTMMapArea*, QMouseEvent* evnt, const DtPoint& pnt);
91  virtual bool keyboardEvent(DtTMMapArea*, QKeyEvent* evnt);
92  virtual bool symbolsSelected(DtTMMapArea* area, DtSymbolList* sl);
93  virtual bool selectionUpdated(DtTMMapArea* area, const QVector<DtModelKey>& d);
94  virtual bool selectionInProgress(DtTMMapArea* area, DtSymbolSelector& d);
95  virtual bool focusEvent(DtTMMapArea*, QEvent* evnt);
96  virtual bool enterEvent(DtTMMapArea* area, QEvent* evnt);
97  virtual bool leaveEvent(DtTMMapArea* area, QEvent* evnt);
98 
99  virtual bool dropEvent(DtTMMapArea* area, QDropEvent* evnt);
100  virtual bool dragEnterEvent(DtTMMapArea* area, QDragEnterEvent* evnt);
101  virtual bool dragMoveEvent(DtTMMapArea* area, QDragMoveEvent* evnt);
102  virtual bool dragLeaveEvent(DtTMMapArea* area, QDragLeaveEvent* evnt);
103  virtual bool userDefinedAction(DtUserDefinedType iAction, void* usr);
104 
105  virtual bool aboutToDraw(DtTMMapArea* area, QPainter*);
106 
107  virtual bool mapActivated(DtTMMapArea* area);
108 
109  virtual bool selectedModelDataUpdated(DtTMMapArea* area);
110 
111  virtual bool symbolAdded(DtTMMapArea* area, const DtModelKey&);
112  virtual bool symbolRemoved(DtTMMapArea* area, const DtModelKey&);
113 
115  virtual bool disconnecting(DtTMMapArea* area);
116 
118  virtual bool connecting(DtTMMapArea* area);
119 
120  virtual void tick();
121  virtual void clearDialog();
122 
123 protected:
127 };
128 
129 inline void DtEventHandler::setSuspended(bool b)
130 {
131  mySuspended = b;
132 }
133 
134 inline bool DtEventHandler::suspended() const
135 {
136  return mySuspended;
137 }
138 
139 #endif //EVENTHANDLER_H_
140 

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)