VR-Forces 4.2 Class Documentation
List of all members | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtTMEventController Class Reference
Inheritance diagram for DtTMEventController:
Inheritance graph
[legend]

Public Slots

virtual void processShowHelp ()
 Shows help system.
virtual void processWebLink ()
 Launches web page in browser to show product version information.
virtual void processLink (const QString &)
virtual void processAboutBox ()
 About box handling.
virtual void processPluginDialog ()
 Plugin dialog handling.
virtual void processResetToGlobalView ()
virtual void processNavigationAction (int)
virtual void startCreation (const DtEntityMapperKey &obj, int frc, DtShowDialogType type=WhenStartCreate)
virtual bool stopCreate ()
 Stops the current creation process. Returns true if was currently in the creations process, false if not.
virtual void editSelection ()
 Calls editObject() with the model data to edit.
virtual void processDeleteAction ()
virtual void processEditToolbars ()
 Calls down to the DtEditToolbarsHandler to edit user defined toolbars.
virtual void processEditObject (const DtModelKey &key)
 Starts to edit the object with the given key.
virtual void editObject (DtModelData *data)
virtual void editObject (const QString &name, const DtEntityMapperKey &key, const QVector< DtPoint > &points, int force)
- Public Slots inherited from DtEventController
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 DtEventHandlerhandlerFor (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 creationComplete (bool finalPointSelected)
 Sent when createComplete() method is called.
- Signals inherited from DtEventController
void activated (DtEventHandler *handler)
 Emitted when handlers are activated/deactived.
void deactivated (DtEventHandler *handler)

Public Member Functions

 DtTMEventController ()
 Constructor.
virtual ~DtTMEventController ()
 Destructor.
virtual bool addDefaultHandlers ()
 Override this routine to install default handlers.
virtual void createComplete (bool finalPointSelected)
 Received when a creation controller is complete with its creation.
virtual void addHandlerMapping (int kind, int handler)
 Adds a new mapping to the handler kinds.
virtual DtEventHandlerType handlerForKind (int kind) const
virtual void infoDialogCreated (const DtModelKey &key, QWidget *dialog)
 Routines that are called when an info dialog is created or destroyed.
virtual void infoDialogDestroyed (const DtModelKey &key, QWidget *dialog)
- Public Member Functions inherited from DtEventController
 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.
DtEventHandlerinsertDefaultHandler (DtEventHandlerType iType, int iPos)
 Inserts a default handler at the specified position.
virtual DtEventHandleraddDefaultHandler (DtEventHandlerType iType)
 Adds a new handler of the specified type and returns the newly created handler.
virtual DtEventHandleraddDefaultHandler (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 DtEventHandlerFactoryeventHandlerFactory ()
 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 DtBaseWindowbaseWindow () const
virtual DtEchelonViewechelonView ()
 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.
DtEventHandlercurrentEvent ()
 Returns the current active event.
virtual bool canExitApplication ()
 Return true if application can be safely closed.
- Public Member Functions inherited from DtArchivableObject
 DtArchivableObject (QString name, DtArchivableObjectCreator fcn)
 This constructor will add this object to the archivable object factory.
 DtArchivableObject (QString name)
 DtArchivableObject ()
virtual ~DtArchivableObject ()
virtual QString name () const
DtArchiverarchiver ()
 Returns the archiver of this object.
virtual void read (QTextStream &s)
 Reads/writes archiver.
virtual void write (QTextStream &s)
virtual void setLevel (int i)
virtual int level () const
virtual DtArchivableObjectclone ()
 Allows for cloning of this object.

Static Public Member Functions

static DtTMAppEventControllerappController ()
static DtEventControllercreate ()
 Static creator function.
- Static Public Member Functions inherited from DtEventController
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 Member Functions

virtual DtCreationHandlerstartCreate (DtEventHandlerType type, const DtEntityMapperKey &obj, int frc, DtShowDialogType dialogType=WhenStartCreate)
 Object creation routines.
virtual bool passKeyEventToMapArea (QKeyEvent *) const
 Returns true if the current event handler is a creation handler and the key press event is the escape key.

Protected Attributes

DtIntDictionary myHandlersForKind
 Array that keeps track of objects kinds and handlers that are used to create them.
- Protected Attributes inherited from DtEventController
bool myUsingEvent
QList< DtTMMapArea * > myMapAreaList
QList< DtEventHandler * > myDefaultHandlerList
QHash< int, DtEventHandler * > myTypedDefaultHandlerList
DtEventHandlermyCurrentHandler
DtEventHandlerFactory myEventHandlerFactory
DtBaseWindowmyBaseWindow
QHash< int, DtEventHandler * > myHandlers
- Protected Attributes inherited from DtArchivableObject
DtArchivermyArchiver

Additional Inherited Members

- Static Protected Attributes inherited from DtEventController
static QHash< int,
DtHandlerCreateInfo
myGlobalHandlers

Constructor & Destructor Documentation

DtTMEventController::DtTMEventController ( )

Constructor.

virtual DtTMEventController::~DtTMEventController ( )
virtual

Destructor.

Member Function Documentation

virtual bool DtTMEventController::addDefaultHandlers ( )
virtual

Override this routine to install default handlers.

Called after initialize handlers. Default handlers installed in this class are: DtDragDropHandler DtNavigationHandler DtDeleteHandler DtEchelonViewHandler If you want to install your owner version of the these handlers, make sure to override the creation of that type in your constructor of your subclass as follows:

myEventHandlerFactory.addHandlerCreate(DtEchelonViewHandlerType, MyEchelonViewHandler::create);

Reimplemented from DtEventController.

Reimplemented in DtTerrainEventController.

static DtTMAppEventController* DtTMEventController::appController ( )
static
virtual void DtTMEventController::createComplete ( bool  finalPointSelected)
virtual

Received when a creation controller is complete with its creation.

This is currently only received when overlay objects are created. Will emit creationComplete() signal. finalPointSelected will be true if the user ended the creation with a right click

virtual void DtTMEventController::addHandlerMapping ( int  kind,
int  handler 
)
virtual

Adds a new mapping to the handler kinds.

Replaces existing handler if exists

virtual DtEventHandlerType DtTMEventController::handlerForKind ( int  kind) const
virtual
virtual void DtTMEventController::infoDialogCreated ( const DtModelKey key,
QWidget dialog 
)
virtual

Routines that are called when an info dialog is created or destroyed.

The model key of the data that is responsible for showing the dialog is supplied. By default these routines do nothing

virtual void DtTMEventController::infoDialogDestroyed ( const DtModelKey key,
QWidget dialog 
)
virtual
static DtEventController* DtTMEventController::create ( )
static

Static creator function.

Reimplemented from DtEventController.

Reimplemented in DtTerrainEventController.

virtual void DtTMEventController::processShowHelp ( )
virtualslot

Shows help system.

virtual void DtTMEventController::processWebLink ( )
virtualslot

Launches web page in browser to show product version information.

virtual void DtTMEventController::processLink ( const QString &  )
virtualslot
virtual void DtTMEventController::processAboutBox ( )
virtualslot

About box handling.

virtual void DtTMEventController::processPluginDialog ( )
virtualslot

Plugin dialog handling.

virtual void DtTMEventController::processResetToGlobalView ( )
virtualslot
virtual void DtTMEventController::processNavigationAction ( int  )
virtualslot
virtual void DtTMEventController::startCreation ( const DtEntityMapperKey obj,
int  frc,
DtShowDialogType  type = WhenStartCreate 
)
virtualslot
virtual bool DtTMEventController::stopCreate ( )
virtualslot

Stops the current creation process. Returns true if was currently in the creations process, false if not.

virtual void DtTMEventController::editSelection ( )
virtualslot

Calls editObject() with the model data to edit.

virtual void DtTMEventController::processDeleteAction ( )
virtualslot
virtual void DtTMEventController::processEditToolbars ( )
virtualslot

Calls down to the DtEditToolbarsHandler to edit user defined toolbars.

virtual void DtTMEventController::processEditObject ( const DtModelKey key)
virtualslot

Starts to edit the object with the given key.

virtual void DtTMEventController::editObject ( DtModelData data)
virtualslot
virtual void DtTMEventController::editObject ( const QString &  name,
const DtEntityMapperKey key,
const QVector< DtPoint > &  points,
int  force 
)
virtualslot
void DtTMEventController::creationComplete ( bool  finalPointSelected)
signal

Sent when createComplete() method is called.

virtual DtCreationHandler* DtTMEventController::startCreate ( DtEventHandlerType  type,
const DtEntityMapperKey obj,
int  frc,
DtShowDialogType  dialogType = WhenStartCreate 
)
protectedvirtual

Object creation routines.

virtual bool DtTMEventController::passKeyEventToMapArea ( QKeyEvent *  ) const
protectedvirtual

Returns true if the current event handler is a creation handler and the key press event is the escape key.

Reimplemented from DtEventController.

Member Data Documentation

DtIntDictionary DtTMEventController::myHandlersForKind
protected

Array that keeps track of objects kinds and handlers that are used to create them.


The documentation for this class was generated from the following file:

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)