VR-Forces 4.0.4 Class Documentation
include/tmqt/eventHandler.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2000 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: eventHandler.h,v $ $Revision: 1.13 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00012 #ifndef EVENTHANDLER_H_
00013 #define EVENTHANDLER_H_
00014 
00015 
00016 #include <geometry/point.h>
00017 #include <symbolMapper/modelKey.h>
00018 
00019 #include <QtGui/QWidget>
00020 #include <QtCore/QObject>
00021 
00022 #include "tmqt/eventHandlers.h"
00023 #include "archiver/archivableObject.h"
00024 
00025 class DtEventController;
00026 class DtSymbolList;
00027 class DtTMMapArea;
00028 class DtBaseWindow;
00029 class DtSymbolSelector;
00030 #include "symbolMapper/modelKey.h"
00031 class QPixmap;
00032 #include "tmqt/tmqtDefines.h"
00033 class DT_DLL_tmqt DtEventHandler : public DtArchivableObject
00034 {
00035    Q_OBJECT
00036    
00037 public:
00038 
00040    DtEventHandler();
00041    
00043    virtual ~DtEventHandler();
00044 
00045    virtual void setEventController(DtEventController*);
00046    
00047    virtual void setInitialSelection(const QVector<DtModelKey>& d);
00048 
00049    virtual void showDialog(bool b);
00050    
00053    virtual QWidget* createDialog(QWidget* w);
00054 
00058    virtual QWidget* dialog(bool createIfMissing = true, QWidget* parent = NULL);
00059 
00060    virtual void reset();
00061 
00063    virtual DtBaseWindow* baseWindow() const;
00064 
00066    virtual void activate();
00067 
00069    virtual void deactivate();
00070 
00072    virtual void setBaseWindow(DtBaseWindow* w);
00073 
00075    virtual void init();
00076 
00079    void setSuspended(bool);
00080    bool suspended() const;
00081 
00083    virtual void dialogDestroyedEvent();
00084 
00085 signals:
00086    void closedDialog();
00087 
00088 public slots:
00089 
00090    virtual bool mouseEvent(DtTMMapArea*, QMouseEvent* evnt, const DtPoint& pnt);
00091    virtual bool keyboardEvent(DtTMMapArea*, QKeyEvent* evnt);
00092    virtual bool symbolsSelected(DtTMMapArea* area, DtSymbolList* sl);
00093    virtual bool selectionUpdated(DtTMMapArea* area, const QVector<DtModelKey>& d);
00094    virtual bool selectionInProgress(DtTMMapArea* area, DtSymbolSelector& d);
00095    virtual bool focusEvent(DtTMMapArea*, QEvent* evnt);
00096    virtual bool enterEvent(DtTMMapArea* area, QEvent* evnt);
00097    virtual bool leaveEvent(DtTMMapArea* area, QEvent* evnt);
00098 
00099    virtual bool dropEvent(DtTMMapArea* area, QDropEvent* evnt);
00100    virtual bool dragEnterEvent(DtTMMapArea* area, QDragEnterEvent* evnt);
00101    virtual bool dragMoveEvent(DtTMMapArea* area, QDragMoveEvent* evnt);
00102    virtual bool dragLeaveEvent(DtTMMapArea* area, QDragLeaveEvent* evnt);
00103    virtual bool userDefinedAction(DtUserDefinedType iAction, void* usr);
00104 
00105    virtual bool aboutToDraw(DtTMMapArea* area, QPainter*);
00106 
00107    virtual bool mapActivated(DtTMMapArea* area);
00108 
00109    virtual bool selectedModelDataUpdated(DtTMMapArea* area);
00110 
00111    virtual bool symbolAdded(DtTMMapArea* area, const DtModelKey&);
00112    virtual bool symbolRemoved(DtTMMapArea* area, const DtModelKey&);
00113 
00115    virtual bool disconnecting(DtTMMapArea* area);
00116 
00118    virtual bool connecting(DtTMMapArea* area);
00119 
00120    virtual void tick();
00121    virtual void clearDialog();
00122 
00123 protected:
00124    QWidget* myEventDlg;
00125    DtEventController* myEventController;
00126    bool mySuspended;
00127 };
00128 
00129 inline void DtEventHandler::setSuspended(bool b)
00130 {
00131    mySuspended = b;
00132 }
00133 
00134 inline bool DtEventHandler::suspended() const
00135 {
00136    return mySuspended;
00137 }
00138 
00139 #endif //EVENTHANDLER_H_
00140 

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)