![]() |
VR-Forces 4.0.4 Class Documentation
|

Public Slots | |
| virtual void | clearCurrentEvent () |
| Clear all events.... | |
| virtual void | mouseEvent (QMouseEvent *evnt, const DtPoint &pnt) |
| virtual void | keyboardEvent (QKeyEvent *evnt) |
| virtual void | focusEvent (QEvent *evnt) |
| virtual void | enterEvent (QEvent *evnt) |
| virtual void | leaveEvent (QEvent *evnt) |
| virtual void | dropEvent (QDropEvent *evnt) |
| virtual void | dragEnterEvent (QDragEnterEvent *evnt) |
| virtual void | dragLeaveEvent (QDragLeaveEvent *evnt) |
| virtual void | dragMoveEvent (QDragMoveEvent *evnt) |
| virtual void | symbolsSelected (DtSymbolList *sl) |
| virtual void | selectionUpdated (const QVector< DtModelKey > &) |
| virtual void | selectionInProgress (DtSymbolSelector &) |
| virtual void | selectedModelDataUpdated () |
| virtual void | symbolRemoved (const DtModelKey &) |
| virtual void | aboutToDraw (QPainter *) |
| Called when a map area is about to draw. | |
| virtual void | userDefinedAction (DtUserDefinedType iAction, void *usr) |
| Generic catchall action. | |
| virtual void | mapActivated (DtTMMapArea *) |
| virtual void | initializeEventDlg () |
| Once an event dialog is created, initialize it. | |
| virtual DtEventHandler * | handlerFor (DtEventHandlerType type) |
| This routine will create a handler of a specific type if it does not exist or return the existing type if it does. | |
| virtual void | tick () |
| Tick routine that will allow handlers (or current handler) to do something on a tick. | |
| virtual void | processNotifyCleanup () |
| Sends the DtNotifyCleanup action to the userDefinedAction of the current event handler (if there is one) | |
Signals | |
| void | activated (DtEventHandler *handler) |
| Emitted when handlers are activated/deactived. | |
| void | deactivated (DtEventHandler *handler) |
Public Member Functions | |
| DtEventController () | |
| Constructor. | |
| virtual | ~DtEventController () |
| Destructor. | |
| virtual void | connectToMapArea (DtTMMapArea *area) |
| Connect this event handler to a map area. | |
| virtual void | disconnectFromMapArea (DtTMMapArea *area) |
| Disconnect this event handler from a map area. | |
| virtual QList< DtEventHandler * > & | defaultHandlers () |
| The default handler list is a list of events that will be executed in the default state NOTE: ordering of handlers count - they execute. | |
| DtEventHandler * | insertDefaultHandler (DtEventHandlerType iType, int iPos) |
| Inserts a default handler at the specified position. | |
| virtual DtEventHandler * | addDefaultHandler (DtEventHandlerType iType) |
| Adds a new handler of the specified type and returns the newly created handler. | |
| virtual DtEventHandler * | addDefaultHandler (DtEventHandler *) |
| Adds a new handler by handler pointer and returns that pointer. | |
| virtual void | removeDefaultHandler (DtEventHandlerType iType) |
| Remove default handler by type or by the handler pointer itself. | |
| virtual void | removeDefaultHandler (DtEventHandler *) |
| virtual void | setEventHandler (DtEventHandler *) |
| Sets the event handler that will be used instead of default handlers Call clearCurrentEvent() to go back to using default handlers to handle events. | |
| virtual bool | init () |
| Initialize the controller with default handlers. | |
| virtual bool | addDefaultHandlers () |
| Override this routine to install default handlers. | |
| virtual DtEventHandlerFactory * | eventHandlerFactory () |
| Returns the event handler factory so handler creators can be added without having to subclass the factory. | |
| virtual void | setBaseWindow (DtBaseWindow *win) |
| Accessors the owner window of this factory. | |
| virtual DtBaseWindow * | baseWindow () const |
| virtual DtEchelonView * | echelonView () |
| Accessor for echelon view (if exists) | |
| virtual const DtTerrainDatabase * | terrainDatabase () const |
| Stub routine to allow users to return a terrain database more easily from application subclasses. | |
| virtual DtTerrainDatabase * | terrainDatabase () |
| virtual const DtPaperMapDatabase * | paperMapDatabase () const |
| virtual DtPaperMapDatabase * | paperMapDatabase () |
| virtual void | removeHandlerFor (DtEventHandlerType iType) |
| This routine will remove a handler that has already been created, so the next time it is referenced, it will be created anew. | |
| virtual DtEventHandlerType | typeFromHandler (DtEventHandler *) |
| Returns the handler type based on the handler. | |
| virtual bool | appLevelController () |
| Returns true if this an application level controller. | |
| DtEventHandler * | currentEvent () |
| Returns the current active event. | |
| virtual bool | passKeyEventToMapArea (QKeyEvent *) const |
| By default returns false. | |
| virtual bool | canExitApplication () |
| Return true if application can be safely closed. | |
Static Public Member Functions | |
| static DtEventController * | create () |
| Static creator function. | |
| static void | globalAddHandler (DtEventHandlerType type, DtHandlerCreate fcn, void *usr=NULL, bool appLevel=false) |
| If appLevel is true, will only add or replace an existing handle if it is an app level controller. | |
| static void | globalRemoveHandler (DtEventHandlerType type) |
Protected Attributes | |
| bool | myUsingEvent |
| QList< DtTMMapArea * > | myMapAreaList |
| QList< DtEventHandler * > | myDefaultHandlerList |
| QHash< int, DtEventHandler * > | myTypedDefaultHandlerList |
| DtEventHandler * | myCurrentHandler |
| DtEventHandlerFactory | myEventHandlerFactory |
| DtBaseWindow * | myBaseWindow |
| QHash< int, DtEventHandler * > | myHandlers |
Static Protected Attributes | |
| static QHash< int, DtHandlerCreateInfo > | myGlobalHandlers |
Constructor.
| virtual DtEventController::~DtEventController | ( | ) | [virtual] |
Destructor.
| virtual void DtEventController::connectToMapArea | ( | DtTMMapArea * | area | ) | [virtual] |
Connect this event handler to a map area.
| virtual void DtEventController::disconnectFromMapArea | ( | DtTMMapArea * | area | ) | [virtual] |
Disconnect this event handler from a map area.
| virtual QList<DtEventHandler*>& DtEventController::defaultHandlers | ( | ) | [virtual] |
The default handler list is a list of events that will be executed in the default state NOTE: ordering of handlers count - they execute.
| DtEventHandler* DtEventController::insertDefaultHandler | ( | DtEventHandlerType | iType, |
| int | iPos | ||
| ) |
Inserts a default handler at the specified position.
| virtual DtEventHandler* DtEventController::addDefaultHandler | ( | DtEventHandlerType | iType | ) | [virtual] |
Adds a new handler of the specified type and returns the newly created handler.
| virtual DtEventHandler* DtEventController::addDefaultHandler | ( | DtEventHandler * | ) | [virtual] |
Adds a new handler by handler pointer and returns that pointer.
| virtual void DtEventController::removeDefaultHandler | ( | DtEventHandlerType | iType | ) | [virtual] |
Remove default handler by type or by the handler pointer itself.
| virtual void DtEventController::removeDefaultHandler | ( | DtEventHandler * | ) | [virtual] |
| virtual void DtEventController::setEventHandler | ( | DtEventHandler * | ) | [virtual] |
Sets the event handler that will be used instead of default handlers Call clearCurrentEvent() to go back to using default handlers to handle events.
| virtual bool DtEventController::init | ( | ) | [virtual] |
Initialize the controller with default handlers.
Calls addDefaultHandlers
Reimplemented in DtEntityEditorAppController.
| virtual bool DtEventController::addDefaultHandlers | ( | ) | [virtual] |
Override this routine to install default handlers.
Called after initialize handlers. The only default handler installed in this routine is the DtDragDropHandler, so, if you want to install your owner version of the DtDragDropHandler, add it in your subclass of initializeHandlers.
Reimplemented in DtTerrainEventController, and DtTMEventController.
| virtual DtEventHandlerFactory* DtEventController::eventHandlerFactory | ( | ) | [virtual] |
Returns the event handler factory so handler creators can be added without having to subclass the factory.
| virtual void DtEventController::setBaseWindow | ( | DtBaseWindow * | win | ) | [virtual] |
Accessors the owner window of this factory.
| virtual DtBaseWindow* DtEventController::baseWindow | ( | ) | const [virtual] |
| virtual DtEchelonView* DtEventController::echelonView | ( | ) | [virtual] |
Accessor for echelon view (if exists)
| virtual const DtTerrainDatabase* DtEventController::terrainDatabase | ( | ) | const [virtual] |
Stub routine to allow users to return a terrain database more easily from application subclasses.
Reimplemented in DtTerrainAppEventController.
| virtual DtTerrainDatabase* DtEventController::terrainDatabase | ( | ) | [virtual] |
Reimplemented in DtTerrainAppEventController.
| virtual const DtPaperMapDatabase* DtEventController::paperMapDatabase | ( | ) | const [virtual] |
Reimplemented in DtTerrainAppEventController.
| virtual DtPaperMapDatabase* DtEventController::paperMapDatabase | ( | ) | [virtual] |
Reimplemented in DtTerrainAppEventController.
| virtual void DtEventController::removeHandlerFor | ( | DtEventHandlerType | iType | ) | [virtual] |
This routine will remove a handler that has already been created, so the next time it is referenced, it will be created anew.
| virtual DtEventHandlerType DtEventController::typeFromHandler | ( | DtEventHandler * | ) | [virtual] |
Returns the handler type based on the handler.
| virtual bool DtEventController::appLevelController | ( | ) | [virtual] |
Returns true if this an application level controller.
By default returns false
Reimplemented in DtTMAppEventController.
| DtEventHandler * DtEventController::currentEvent | ( | ) | [inline] |
Returns the current active event.
References myCurrentHandler.
| virtual bool DtEventController::passKeyEventToMapArea | ( | QKeyEvent * | ) | const [virtual] |
By default returns false.
Reimplemented in DtTMEventController.
| virtual bool DtEventController::canExitApplication | ( | ) | [virtual] |
Return true if application can be safely closed.
Default is false. Is currently only checked at application level controller
| static DtEventController* DtEventController::create | ( | ) | [static] |
Static creator function.
Reimplemented in DtTerrainAppEventController, DtTMAppEventController, DtTMEventController, DtEntityEditorAppController, and DtTerrainEventController.
| static void DtEventController::globalAddHandler | ( | DtEventHandlerType | type, |
| DtHandlerCreate | fcn, | ||
| void * | usr = NULL, |
||
| bool | appLevel = false |
||
| ) | [static] |
If appLevel is true, will only add or replace an existing handle if it is an app level controller.
The appLevel controller will return true to the appLevel() member function
| static void DtEventController::globalRemoveHandler | ( | DtEventHandlerType | type | ) | [static] |
| virtual void DtEventController::clearCurrentEvent | ( | ) | [virtual, slot] |
Clear all events....
| virtual void DtEventController::mouseEvent | ( | QMouseEvent * | evnt, |
| const DtPoint & | pnt | ||
| ) | [virtual, slot] |
| virtual void DtEventController::keyboardEvent | ( | QKeyEvent * | evnt | ) | [virtual, slot] |
| virtual void DtEventController::focusEvent | ( | QEvent * | evnt | ) | [virtual, slot] |
| virtual void DtEventController::enterEvent | ( | QEvent * | evnt | ) | [virtual, slot] |
| virtual void DtEventController::leaveEvent | ( | QEvent * | evnt | ) | [virtual, slot] |
| virtual void DtEventController::dropEvent | ( | QDropEvent * | evnt | ) | [virtual, slot] |
| virtual void DtEventController::dragEnterEvent | ( | QDragEnterEvent * | evnt | ) | [virtual, slot] |
| virtual void DtEventController::dragLeaveEvent | ( | QDragLeaveEvent * | evnt | ) | [virtual, slot] |
| virtual void DtEventController::dragMoveEvent | ( | QDragMoveEvent * | evnt | ) | [virtual, slot] |
| virtual void DtEventController::symbolsSelected | ( | DtSymbolList * | sl | ) | [virtual, slot] |
| virtual void DtEventController::selectionUpdated | ( | const QVector< DtModelKey > & | ) | [virtual, slot] |
| virtual void DtEventController::selectionInProgress | ( | DtSymbolSelector & | ) | [virtual, slot] |
| virtual void DtEventController::selectedModelDataUpdated | ( | ) | [virtual, slot] |
| virtual void DtEventController::symbolRemoved | ( | const DtModelKey & | ) | [virtual, slot] |
| virtual void DtEventController::aboutToDraw | ( | QPainter * | ) | [virtual, slot] |
Called when a map area is about to draw.
| virtual void DtEventController::userDefinedAction | ( | DtUserDefinedType | iAction, |
| void * | usr | ||
| ) | [virtual, slot] |
Generic catchall action.
| virtual void DtEventController::mapActivated | ( | DtTMMapArea * | ) | [virtual, slot] |
| virtual void DtEventController::initializeEventDlg | ( | ) | [virtual, slot] |
Once an event dialog is created, initialize it.
| virtual DtEventHandler* DtEventController::handlerFor | ( | DtEventHandlerType | type | ) | [virtual, slot] |
This routine will create a handler of a specific type if it does not exist or return the existing type if it does.
| virtual void DtEventController::tick | ( | ) | [virtual, slot] |
Tick routine that will allow handlers (or current handler) to do something on a tick.
| virtual void DtEventController::processNotifyCleanup | ( | ) | [virtual, slot] |
Sends the DtNotifyCleanup action to the userDefinedAction of the current event handler (if there is one)
| void DtEventController::activated | ( | DtEventHandler * | handler | ) | [signal] |
Emitted when handlers are activated/deactived.
| void DtEventController::deactivated | ( | DtEventHandler * | handler | ) | [signal] |
bool DtEventController::myUsingEvent [protected] |
QList<DtTMMapArea*> DtEventController::myMapAreaList [protected] |
QList<DtEventHandler*> DtEventController::myDefaultHandlerList [protected] |
QHash<int, DtEventHandler*> DtEventController::myTypedDefaultHandlerList [protected] |
DtEventHandler* DtEventController::myCurrentHandler [protected] |
Referenced by currentEvent().
DtBaseWindow* DtEventController::myBaseWindow [protected] |
QHash<int, DtEventHandler*> DtEventController::myHandlers [protected] |
QHash<int, DtHandlerCreateInfo> DtEventController::myGlobalHandlers [static, protected] |