![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2003 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: tmEventController.h,v $ $Revision: 1.42 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00011 00012 #ifndef TMEVENTCONTROLLER_H_ 00013 #define TMEVENTCONTROLLER_H_ 00014 00015 #include "tmqt/eventController.h" 00016 #include "tmqt/eventHandlers.h" 00017 #include "tmqt/showDialogType.h" 00018 00019 class DtBaseWindow; 00020 class DtEntityMapperKey; 00021 class DtTMAppEventController; 00022 class DtSymbol; 00023 class DtCreationHandler; 00024 00026 typedef QHash<int, int> DtIntDictionary; 00027 00028 #include "tmEventHandler/tmEventHandlerDefines.h" 00029 class DT_DLL_tmEventHandler DtTMEventController : public DtEventController 00030 { 00031 Q_OBJECT 00032 00033 public: 00034 00036 DtTMEventController(); 00037 00039 virtual ~DtTMEventController(); 00040 00052 virtual bool addDefaultHandlers(); 00053 00054 static DtTMAppEventController* appController(); 00055 00059 virtual void createComplete(bool finalPointSelected); 00060 00063 virtual void addHandlerMapping(int kind, int handler); 00064 virtual DtEventHandlerType handlerForKind(int kind) const; 00065 00069 virtual void infoDialogCreated(const DtModelKey& key, QWidget* dialog); 00070 virtual void infoDialogDestroyed(const DtModelKey& key, QWidget* dialog); 00071 00072 public: 00073 static DtEventController* create(); 00074 00075 public slots: 00077 virtual void processShowHelp(); 00078 00080 virtual void processWebLink(); 00081 virtual void processLink(const QString&); 00082 00084 virtual void processAboutBox(); 00085 00087 virtual void processPluginDialog(); 00088 00089 virtual void processResetToGlobalView(); 00090 virtual void processNavigationAction(int); 00091 00092 virtual void startCreation(const DtEntityMapperKey& obj, int frc, DtShowDialogType type = WhenStartCreate); 00093 00095 virtual bool stopCreate(); 00096 00098 virtual void editSelection(); 00099 00100 virtual void processDeleteAction(); 00101 00103 virtual void processEditToolbars(); 00104 00106 virtual void processEditObject(const DtModelKey& key); 00107 00108 virtual void editObject(DtModelData* data); 00109 virtual void editObject(const QString& name, const DtEntityMapperKey& key, 00110 const QVector<DtPoint>& points, int force); 00111 00112 signals: 00114 void creationComplete(bool finalPointSelected); 00115 00116 protected: 00118 virtual DtCreationHandler* startCreate(DtEventHandlerType type, const DtEntityMapperKey& obj, int frc, 00119 DtShowDialogType dialogType = WhenStartCreate); 00120 00123 virtual bool passKeyEventToMapArea(QKeyEvent*) const; 00124 00125 protected: 00128 DtIntDictionary myHandlersForKind; 00129 }; 00130 00131 #endif //TMEVENTCONTROLLER_H_ 00132