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
DtTerrainAppEventController Class Reference
Inheritance diagram for DtTerrainAppEventController:
Inheritance graph
[legend]

Public Slots

virtual bool processFileOpenDatabase ()
virtual void processFileCloseDatabase (bool askConvert=true)
virtual void processFileSaveDatabase ()
virtual void processFileSaveAsDatabase ()
virtual int processDirtyDatabase ()
virtual void processTerrainDatabaseInformation ()
virtual bool openDatabase (QString database)
 Opens the specified database using the openDatabase handler.
virtual void processToggleViewPolygons (bool toggle)
 Toggle the display of polygons on/off.
virtual void processToggleViewFeatures (bool)
 Toggle the display of vector features on/off.
virtual void processToggleViewWireframe (bool toggle)
 Toggle the display of polygons on/off.
virtual void processToggleViewContourLines (bool toggle)
 Toggle the display of contour lines on/off.
virtual void processToggleViewTerrainShading (bool toggle)
 Toggle the display of terrain shading on/off.
virtual void processToggleViewPaperMaps (bool toggle)
 Toggle the display of paper maps on/off.
virtual void processToggleColorPolygonsUsingSoilType (bool toggle)
 Toggle the drawing of polygons using the default soil type color.
- Public Slots inherited from DtTMAppEventController
virtual void processDisplayOptions ()
virtual void processFrameRateMonitor ()
virtual void processEmitterBeamOptions ()
virtual void processPuffOptions ()
virtual void processTacticalSmokeOptions ()
virtual void processTransmitterOptions ()
virtual void processToggleFullScreen (bool b)
 Toggles between full screen and normal mode.
virtual void processToggleAnim (bool b)
 Toggle between interaction animations on and off.
virtual void setDefaultPointHeightOffset (double h)
 Set the default point height offset and emit a signal if different.
virtual void setDefaultLineHeightOffset (double h)
 Set the default route height offset and emit a signal if different.
virtual void processSaveOverlays ()
virtual void processLoadOverlays ()
virtual void processSaveSelectionGroups ()
virtual void processLoadSelectionGroups ()
virtual void processFilePrint ()
 Asks the print handler to print the current area to a single page of paper.
virtual void processFilePrintObjects ()
 Asks the print handler to print the current objects to a single page of paper.
virtual void processFileSaveMapArea ()
 Asks the save map area handler to save the current area to a file.
virtual void processLoadOverlayFile (const QString &file)
 Call down to overlay handler to load specified overlay file.
virtual void processLoadSelectionGroupsFile (const QString &file)
 Call down to selection group save handler to load specified overlay file.
virtual void processToggleFreehandPointEdit (bool b)
- 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 terrainDatabaseSet (const DtTerrainDatabase *t)
void paperMapLoaded (const DtPaperMapDatabase *p)
void terrainDatabaseModified (DtTerrainDatabase *t, const DtExtent &extent)
void databaseDirty (bool)
 Sent when the database dirty flag has changed.
void databaseWasSaved (const QString &)
- Signals inherited from DtTMAppEventController
void filenameInUseChanged (const QString &s)
 Signals.
void fullScreenModeChanged (bool)
void defaultPointHeightOffsetChanged (double)
 Sent when the default waypoint height offset has changed.
void defaultLineHeightOffsetChanged (double)
 Sent when the default route height offset has changed.
- Signals inherited from DtEventController
void activated (DtEventHandler *handler)
 Emitted when handlers are activated/deactived.
void deactivated (DtEventHandler *handler)

Public Member Functions

 DtTerrainAppEventController ()
 Constructor.
virtual ~DtTerrainAppEventController ()
 Destructor.
virtual DtTdbManager * tdbManager () const
 Access tdb manager.
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 setDatabaseDirty (bool b)
virtual bool databaseDirty () const
virtual void closeDatabase ()
 Calls processFileCloseDatabase with ask of false.
virtual void databaseSaved (const QString &name)
 Called by the save handler when a database is saved.
virtual void processTerrainModified (DtTerrainDatabase *terrain, const DtExtent &changedVolume)
virtual void preloadDatabase (DtFilename &name)
 Called before the database handler opens the database.
virtual void createDatabaseFromExtent (const DtExtent &extent)
 Creates a new database from the given extent.
DtTerrainDbFactory * terrainDatabaseFactory ()
- Public Member Functions inherited from DtTMAppEventController
 DtTMAppEventController ()
 Constructor.
virtual ~DtTMAppEventController ()
 Destructor.
virtual void setFullScreenMode (bool b)
 Emits fullScreenModeChange signal if full screen mode has changed as well as sets internal flag.
virtual double defaultPointHeightOffset ()
virtual double defaultLineHeightOffset ()
virtual bool openDatabase (QString db)
 Current no-op, but, could be used to open and close files.
- 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 bool addDefaultHandlers ()
 Override this routine to install 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 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.
DtEventHandlercurrentEvent ()
 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.
- 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 void terrainModified (DtTerrainDatabase *terrain, const DtExtent &changedVolume, void *usrData)
 Routines called when the terrain database is modified.
static DtEventControllercreate ()
 Static creator function.

Protected Member Functions

virtual void initFactories ()
 Inits all member variables.
virtual void completeDatabaseOpen ()
 Called when a database has sucessfully been opened, this will emit signals about this new database (paperMapLoaded, terrainDatabaseSet)
virtual void aboutToQuit ()
 This method will be called right before the application quits.
virtual void checkConvertDatabase ()
 Checks to see if database if of type geocentric, and, if it is, asks the user if they want to convert to geodetic.
virtual bool shouldAskDatabaseSave () const
 Return whether or not to ask if a database should be saved, even if dirty or old format.
- Protected Member Functions inherited from DtTMAppEventController
virtual bool appLevelController ()
 Returns true.

Protected Attributes

DtTerrainDbFactory * myTerrainDbFactory
 protected member data
DtTerrainReaderFactory * myTerrainReaderFactory
DtTerrainWriterFactory * myTerrainWriterFactory
DtTdbMetafileFactory * myMetafileFactory
DtPaperMapFactorymyPaperMapFactory
DtVectorDataFactory * myVectorDataFactory
DtTdbManager * myTdbManager
bool myDatabaseDirty
bool myDBConverted
 Keeps track of whether or not this is a database converted from geocentric.
bool myConvertingDatabase
 Set when saving the database while converting from geocentric.
- Protected Attributes inherited from DtTMAppEventController
bool myFullScreenMode
double myDefaultPointHeightOffset
double myDefaultLineHeightOffset
- 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

DtTerrainAppEventController::DtTerrainAppEventController ( )

Constructor.

virtual DtTerrainAppEventController::~DtTerrainAppEventController ( )
virtual

Destructor.

Member Function Documentation

virtual DtTdbManager* DtTerrainAppEventController::tdbManager ( ) const
virtual

Access tdb manager.

virtual const DtTerrainDatabase* DtTerrainAppEventController::terrainDatabase ( ) const
virtual

Stub routine to allow users to return a terrain database more easily from application subclasses.

Reimplemented from DtEventController.

virtual DtTerrainDatabase* DtTerrainAppEventController::terrainDatabase ( )
virtual

Reimplemented from DtEventController.

virtual const DtPaperMapDatabase* DtTerrainAppEventController::paperMapDatabase ( ) const
virtual

Reimplemented from DtEventController.

virtual DtPaperMapDatabase* DtTerrainAppEventController::paperMapDatabase ( )
virtual

Reimplemented from DtEventController.

virtual void DtTerrainAppEventController::setDatabaseDirty ( bool  b)
virtual
virtual bool DtTerrainAppEventController::databaseDirty ( ) const
virtual
virtual void DtTerrainAppEventController::closeDatabase ( )
virtual

Calls processFileCloseDatabase with ask of false.

Reimplemented from DtTMAppEventController.

virtual void DtTerrainAppEventController::databaseSaved ( const QString &  name)
virtual

Called by the save handler when a database is saved.

static void DtTerrainAppEventController::terrainModified ( DtTerrainDatabase *  terrain,
const DtExtent &  changedVolume,
void *  usrData 
)
static

Routines called when the terrain database is modified.

Will emit terrainDatabaseModified signal with the extent and database modified

virtual void DtTerrainAppEventController::processTerrainModified ( DtTerrainDatabase *  terrain,
const DtExtent &  changedVolume 
)
virtual
virtual void DtTerrainAppEventController::preloadDatabase ( DtFilename &  name)
virtual

Called before the database handler opens the database.

You can even change the filename. Default is no-op

virtual void DtTerrainAppEventController::createDatabaseFromExtent ( const DtExtent &  extent)
virtual

Creates a new database from the given extent.

Unloads any database that might be loaded

DtTerrainDbFactory* DtTerrainAppEventController::terrainDatabaseFactory ( )
Returns
Pointer to the DtTerrainDbFactory instance created by this class.
void DtTerrainAppEventController::terrainDatabaseSet ( const DtTerrainDatabase *  t)
signal
void DtTerrainAppEventController::paperMapLoaded ( const DtPaperMapDatabase *  p)
signal
void DtTerrainAppEventController::terrainDatabaseModified ( DtTerrainDatabase *  t,
const DtExtent &  extent 
)
signal
void DtTerrainAppEventController::databaseDirty ( bool  )
signal

Sent when the database dirty flag has changed.

void DtTerrainAppEventController::databaseWasSaved ( const QString &  )
signal
virtual bool DtTerrainAppEventController::processFileOpenDatabase ( )
virtualslot
Returns
True if the user selected a database, and it was able to be loaded. False if the user cancels out of operation, or database fails to load.
virtual void DtTerrainAppEventController::processFileCloseDatabase ( bool  askConvert = true)
virtualslot
virtual void DtTerrainAppEventController::processFileSaveDatabase ( )
virtualslot
virtual void DtTerrainAppEventController::processFileSaveAsDatabase ( )
virtualslot
virtual int DtTerrainAppEventController::processDirtyDatabase ( )
virtualslot
virtual void DtTerrainAppEventController::processTerrainDatabaseInformation ( )
virtualslot
virtual bool DtTerrainAppEventController::openDatabase ( QString  database)
virtualslot

Opens the specified database using the openDatabase handler.

virtual void DtTerrainAppEventController::processToggleViewPolygons ( bool  toggle)
virtualslot

Toggle the display of polygons on/off.

virtual void DtTerrainAppEventController::processToggleViewFeatures ( bool  )
virtualslot

Toggle the display of vector features on/off.

virtual void DtTerrainAppEventController::processToggleViewWireframe ( bool  toggle)
virtualslot

Toggle the display of polygons on/off.

virtual void DtTerrainAppEventController::processToggleViewContourLines ( bool  toggle)
virtualslot

Toggle the display of contour lines on/off.

virtual void DtTerrainAppEventController::processToggleViewTerrainShading ( bool  toggle)
virtualslot

Toggle the display of terrain shading on/off.

virtual void DtTerrainAppEventController::processToggleViewPaperMaps ( bool  toggle)
virtualslot

Toggle the display of paper maps on/off.

virtual void DtTerrainAppEventController::processToggleColorPolygonsUsingSoilType ( bool  toggle)
virtualslot

Toggle the drawing of polygons using the default soil type color.

static DtEventController* DtTerrainAppEventController::create ( )
static

Static creator function.

Reimplemented from DtTMAppEventController.

virtual void DtTerrainAppEventController::initFactories ( )
protectedvirtual

Inits all member variables.

virtual void DtTerrainAppEventController::completeDatabaseOpen ( )
protectedvirtual

Called when a database has sucessfully been opened, this will emit signals about this new database (paperMapLoaded, terrainDatabaseSet)

virtual void DtTerrainAppEventController::aboutToQuit ( )
protectedvirtual

This method will be called right before the application quits.

Connected to the Qt aboutToQuit() signal

Reimplemented from DtTMAppEventController.

virtual void DtTerrainAppEventController::checkConvertDatabase ( )
protectedvirtual

Checks to see if database if of type geocentric, and, if it is, asks the user if they want to convert to geodetic.

If they do not, then the database is closed (via processFileCloseDatabase), else the database is converted to geodetic. The user will then be asked if they want to save that database to a new file. If they choose not to, then the databas will be marked dirty so the user can save it at a future point

virtual bool DtTerrainAppEventController::shouldAskDatabaseSave ( ) const
protectedvirtual

Return whether or not to ask if a database should be saved, even if dirty or old format.

Member Data Documentation

DtTerrainDbFactory* DtTerrainAppEventController::myTerrainDbFactory
protected

protected member data

DtTerrainReaderFactory* DtTerrainAppEventController::myTerrainReaderFactory
protected
DtTerrainWriterFactory* DtTerrainAppEventController::myTerrainWriterFactory
protected
DtTdbMetafileFactory* DtTerrainAppEventController::myMetafileFactory
protected
DtPaperMapFactory* DtTerrainAppEventController::myPaperMapFactory
protected
DtVectorDataFactory* DtTerrainAppEventController::myVectorDataFactory
protected
DtTdbManager* DtTerrainAppEventController::myTdbManager
protected
bool DtTerrainAppEventController::myDatabaseDirty
protected
bool DtTerrainAppEventController::myDBConverted
protected

Keeps track of whether or not this is a database converted from geocentric.

bool DtTerrainAppEventController::myConvertingDatabase
protected

Set when saving the database while converting from geocentric.


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)