![]() |
VR-Forces 4.2 Class Documentation
|
Provides the necessary gui framework to create a window with a map frame inside it. More...

Public Slots | |
| virtual void | removeAttachedEventController (QObject *) |
| virtual unsigned | createMapArea (const DtTMFactory *f) |
| Initialize and add a new map area. | |
| virtual void | removeMapArea (unsigned ii) |
| Remove a map area from active service. | |
| virtual void | removeMapArea (DtTMMapArea *area) |
| Remove a map area from active service. | |
| virtual void | changeActiveMap (DtTMMapArea *) |
| change the current active map | |
| virtual void | changeActiveRubberBand (const DtTMRubberBand *) |
| change the current active rubber band. | |
| virtual void | addSymbol (const DtModelData &, bool) |
| This is called from add symbols from symbol generator. | |
| virtual void | addSymbol (const DtModelData &, DtSymbol *) |
| virtual void | removeDictionaryEntry (const DtModelKey &key) |
| Removes this keyed entry from local map dictionaries. | |
| virtual void | removeSymbol (const DtModelData &, bool) |
| This is called from remove symbols emit from symbol generator. | |
| virtual void | modifySymbol (const DtModelData &d, int changedFlags) |
| This is called from modify symbols emit from symbol generator. | |
| virtual void | tick () |
| Redraws the background. Also keeps a frame rate counter. | |
| virtual void | preTick () |
| Emits preUpdateTick() signal. | |
| virtual void | postTick () |
| Emits postUpdateTick signal. | |
| virtual void | toggleToolbar (bool b) |
| Uses our view/toolbar map to toggle toolbars on and off as connected via menu item items. | |
| virtual void | updateViewMenu () |
| Updates the view menu based on current toolbar status. | |
| virtual void | hideAllToolbars () |
| Hides/shows all visible/hidden toolbars. | |
| virtual void | showAllToolbars () |
| virtual void | displayToolbars (bool hide) |
| virtual void | updateValidActions () |
| Update valid actions. | |
| virtual void | processSelectionChanged (const QVector< DtModelKey > &) |
| Called when the selection has changed in any map area, emits a signal and updates valid actions. | |
| virtual void | changeSelection (const QVector< DtModelKey > &keys) |
| Changes the selection in the active map area. | |
| virtual void | modelDataAdded (const DtModelKey &key) |
| virtual void | setupMenuConnection (DtMainMenuType) |
| Called when the menu system recreates a menu, if the menu recreated is the view menu, setup connections again. | |
| DtFeatureActionManager * | featureActionManager () const |
| DtFeatureActionManager * | backupFeatureActionManager () const |
| virtual void | revertFeatureActionManager () |
| Reverts feature action manager to backup. | |
| virtual void | mergeFeatureActionManager (const DtFeatureActionManager &) |
| Merges in new feature action manager. Currently merge only changes shortcuts. | |
Signals | |
| void | menuItemsValidated () |
| Emitted after all menu items have been validated. | |
| void | changedActiveMap (DtTMMapArea *) |
| Sent when the active map changed. | |
| void | closing (const DtBaseWindow *) |
| Sent when closing. | |
| void | mapAreaCreated (DtTMArea *) |
| Sent when a new map area is created via createMapArea. | |
| void | miniMapAreaCreated (DtTMArea *) |
| void | selectionChanged (const QVector< DtModelKey > &) |
| void | menuRecreated (DtMainMenuType) |
| void | modelDataMarkedForUpdated (const DtModelData &) |
| void | modelDataRemovedFromUpdate (const DtModelData &) |
| void | preTickSignal () |
| void | postTickSignal () |
Public Member Functions | |
| DtBaseWindow (QWidget *parent=NULL, const Qt::WindowFlags &flags=0) | |
| virtual | ~DtBaseWindow () |
| virtual bool | init (const DtTMFactory *f, DtTMMiniMap *m=0, int mode=DtWindow_NoAction) |
| Initialize all of the gui. | |
| virtual bool | createMiniMap (const DtTMFactory *f) |
| Create miniMap from DtTMFactory. | |
| virtual bool | initMiniMap (const DtTMFactory *f, QDockWidget *parent=0) |
| Initialize minimap. | |
| virtual DtTMMapArea * | areaMap (unsigned value=0) const |
| Returns pointer to one of the are maps controlled by this window. | |
| virtual DtTMMapArea * | activeMap () const |
| Returns pointer to the current active map area. | |
| virtual DtTMRubberBand * | rubberBand (unsigned value=0) const |
| Grab the rubber band of a specific map area. | |
| virtual DtTMRubberBand * | rubberBand (DtTMMapArea *) const |
| Grab the rubber band of a specific map area. | |
| virtual unsigned | numberOfMapAreas () |
| Returns the number of map areas in myMapAreaList. | |
| virtual DtTMMiniMap * | miniMap () const |
| Returns pointer to terrain minimap. | |
| virtual void | loadDatabaseFile (const QString &f) |
| This function passes the database file to all of the map areas If you want to have different databases load on different map areas then you're going to have to overwrite this function. | |
| virtual bool | initMapArea (DtTMMapArea *area, const DtTMFactory *f) |
| Initialize one specific area map. | |
| virtual bool | initAllMapAreas (const DtTMFactory *f) |
| Initialize all area maps. | |
| virtual void | toggleMinimap (bool b) |
| Show or hide the miniMap. | |
| virtual void | closeEvent (QCloseEvent *e) |
| close the window | |
| virtual bool | shouldTick () |
| Returns whether or not this window should tick based on frame rate. | |
| virtual void | markForUpdate (const DtModelData &data) |
| Marks the specified data for update. | |
| virtual void | markForUpdate (DtModelDataIter *iter) |
| virtual void | removeFromUpdate (const DtModelData &data) |
| Removes the specified data for update. | |
| virtual void | markAllForUpdate () |
| Marks all data for update on next tick. | |
| virtual void | removeAllForUpdate () |
| Removes all data for update. | |
| virtual void | setDisplayFrameRate (int) |
| Sets the display frame rate value in FPS. | |
| virtual int | displayFrameRate () const |
| returns the display frame rate in FPS. | |
| virtual DtEventController & | eventController () |
| virtual const DtEventController & | eventController () const |
| virtual double | elapsedRunTime () const |
| virtual double | numberOfFrames () const |
| virtual DtMenuWidget * | menuWidget () |
| virtual DtStdContextMenu * | contextMenus () |
| virtual void | setFullScreenMode (bool b) |
| Shows window in full screen or normal mode. | |
| virtual bool | hasViewToolbar (int type) const |
| Returns true if the specified view type has been added to the myViewMenuToolbarMap. | |
| virtual QWidget * | toolbarFor (int type) |
| virtual bool | hasViewToolbar (QWidget *) const |
| virtual int | toolbarMenuId (QWidget *) const |
| virtual QTextStream & | write (QTextStream &ts) |
| archival operators | |
| virtual QTextStream & | read (QTextStream &ts) |
| virtual void | initFromAppSettings () |
| Initialize window from current application settings. | |
| virtual void | clear () |
| Tells all map areas to clear out any information it might have about the current database. | |
| virtual void | symbolMapChanged () |
| Clear symbols from all map areas and tells the menu widget as well as other widgets to update contents based on new symbol mappings. | |
| virtual void | setUpdateOnTick (bool b, bool updateMini=false) |
| Tells all children maps (and mini map) to update on next tick. | |
| virtual void | recreateMenu (DtMainMenuType menu) |
| Deletes and recreates the supplied menu in the existing slot. | |
| virtual void | activateRubberBand () |
| Activates the rubber band of the active map area on the mini-map. | |
| virtual void | attachEventController (DtEventController *) |
| If you are creating an event controller that can be used with this window, call this method to add it to event controllers that are tickable. | |
| QList< DtEventController * > & | attachedEventControllers () |
| Does not include the default event controller. | |
| virtual DtPopupMenu * | menuFromAction (QAction *) |
| Calls down to the menu (if it exists) to return the menu that has the QAction. | |
| virtual DtPopupMenu * | menuForType (DtMainMenuType type) |
| Calls down to the menu (if it exists) to return the menu from the menu type. | |
| virtual void | postProcessOptions () |
| Called after options are read from file. | |
| bool | hasRubberBands () const |
| virtual void | addToolbarMapping (int id, QWidget *w) |
| Adds toolbars to internal mapping without adding to menu. | |
| virtual void | removeToolbarMapping (int id) |
| Removes toolbars to internal mapping without removing from view menu. | |
| virtual DtTMMapArea * | mapContainsData (const DtModelData *data) const |
| If a map area contains the model data, returns the map area that contains it. | |
| virtual void | bringToFront () |
| Raises the window to be the topmost on the desktop. | |
| virtual void | clearFrameRates () |
| Call when running as fast as possible to zero out frame rate statistics. | |
Static Public Member Functions | |
| static DtBaseWindow * | create (QWidget *parent, const Qt::WindowFlags &flags) |
| Returns a newly created instance of a DtTerrainWindow. | |
Protected Member Functions | |
| virtual void | tickEventControllers () |
| Ticks this windows event controller and all attached. | |
| virtual bool | initContextMenus (const DtTMFactory *f) |
| virtual bool | initMenuWidget (const DtTMFactory *f) |
| Initializes the menu bar by calling the factory to create it. | |
| virtual bool | createFeatureActionManager (const DtTMFactory *f) |
| Creates and initializes feature action manager. | |
| virtual void | addDefaultShortcutsAndIcons (const DtTMFactory *f) |
| Called after feature action manager is created, adds default shortcuts and icons to the system. | |
| virtual void | createMenuWidget (const DtTMFactory *f) |
| Creates a new menu widget from the factory. Called by initMenuWidget. | |
| virtual void | initViewMenuToolbarMap () |
| Initializes the view/menu toolbar map by associating a view menu action with a toolbar to toggle on and off. | |
| virtual bool | initMapConnections (DtTMMapArea *area) |
| Initializes connections for the map area. | |
| virtual bool | initMenuConnections () |
| virtual bool | initFromApplicationtoLatin1 () |
| Creates symbols in the map areas based on DtLocalControlModelData found in the application dictionary. | |
| virtual Qt::ToolBarArea | dockToolbarPosition () const |
| Returns Left or Right depending on language layout. | |
| virtual Qt::DockWidgetArea | dockWidgetPosition () const |
| virtual void | moveDockWindow (QToolBar *, Qt::ToolBarArea) |
| Resurrect old call to place toolbar. | |
| virtual void | moveDockWindow (QDockWidget *, Qt::DockWidgetArea) |
| virtual QMenu * | createPopupMenu () |
| virtual QWidget * | centerWidget (QWidget *itemToCenter) |
| Creates a widget and layout that will center (horizontally) the supplied widget. | |
Static Protected Attributes | |
| static const int | theDefaultDisplayFrameRate |
Provides the necessary gui framework to create a window with a map frame inside it.
There are no actual gui items in here, however making it easy for the programmer to extend and make your own gui. As an alternative, you are not required to use this class at all in order to show maps. In which case, this class serves as a good example of the items you might need in order to get a working map up and running with the smallest effort
| DtBaseWindow::DtBaseWindow | ( | QWidget * | parent = NULL, |
| const Qt::WindowFlags & | flags = 0 |
||
| ) |
|
virtual |
|
virtual |
Initialize all of the gui.
Your initial window configuration should be set up here. The minimap being passed is done in case you have a global minimap that spans windows. otherwise leave it at zero.
Reimplemented in DtTMWindow.
|
virtual |
Create miniMap from DtTMFactory.
|
virtual |
Initialize minimap.
Reimplemented in DtTMWindow.
|
virtual |
Returns pointer to one of the are maps controlled by this window.
Returns zero if the requiested areaMap does not exist.
|
virtual |
Returns pointer to the current active map area.
Returns null if there is not active map.
|
virtual |
Grab the rubber band of a specific map area.
Returns null if it does not exist.
|
virtual |
Grab the rubber band of a specific map area.
Returns null if it does not exist.
|
virtual |
Returns the number of map areas in myMapAreaList.
|
virtual |
Returns pointer to terrain minimap.
|
virtual |
This function passes the database file to all of the map areas If you want to have different databases load on different map areas then you're going to have to overwrite this function.
|
virtual |
Initialize one specific area map.
Reimplemented in DtTerrainWindow.
|
virtual |
Initialize all area maps.
|
virtual |
Show or hide the miniMap.
Override if you want want the full container of a minimap to go away.
|
virtual |
close the window
|
virtual |
Returns whether or not this window should tick based on frame rate.
Reimplemented in DtTerrainWindow.
|
virtual |
Marks the specified data for update.
|
virtual |
|
virtual |
Removes the specified data for update.
|
virtual |
Marks all data for update on next tick.
|
virtual |
Removes all data for update.
|
virtual |
Sets the display frame rate value in FPS.
|
virtual |
returns the display frame rate in FPS.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
inlinevirtual |
References myContextMenus.
|
virtual |
Shows window in full screen or normal mode.
If switching to full screen mode, stashes the dock widgets that are currently shown, hides all the dock widgets and then makes the window a full screen window. If returning to normal mode, reshows the dock widgets that were stashed and shows window in normal mode
Reimplemented in DtTMWindow.
|
virtual |
Returns true if the specified view type has been added to the myViewMenuToolbarMap.
|
virtual |
|
virtual |
|
virtual |
archival operators
Reimplemented in DtTMWindow.
|
virtual |
Reimplemented in DtTMWindow.
|
virtual |
Initialize window from current application settings.
Called after app settings are read in from settings file
Reimplemented in DtTMWindow, and DtTerrainWindow.
|
virtual |
Tells all map areas to clear out any information it might have about the current database.
|
virtual |
Clear symbols from all map areas and tells the menu widget as well as other widgets to update contents based on new symbol mappings.
Tells all children maps (and mini map) to update on next tick.
|
virtual |
Deletes and recreates the supplied menu in the existing slot.
Asks the menu widget to do so. Will emit signal menuRecreated with the menu type
|
virtual |
Activates the rubber band of the active map area on the mini-map.
|
virtual |
If you are creating an event controller that can be used with this window, call this method to add it to event controllers that are tickable.
Called as a side effect of calling setBaseWindow in the event controller. Will also connect a slot to the destroyed signal of the event controller to remove it from the internal tickable list
|
inline |
Does not include the default event controller.
References myAttachedEventControllers.
|
virtual |
Calls down to the menu (if it exists) to return the menu that has the QAction.
|
virtual |
Calls down to the menu (if it exists) to return the menu from the menu type.
|
virtual |
Called after options are read from file.
Reimplemented in DtTMWindow, and DtTerrainWindow.
|
inline |
References myRubberBandList.
|
virtual |
Adds toolbars to internal mapping without adding to menu.
|
virtual |
Removes toolbars to internal mapping without removing from view menu.
|
virtual |
If a map area contains the model data, returns the map area that contains it.
|
virtual |
Raises the window to be the topmost on the desktop.
|
virtual |
Call when running as fast as possible to zero out frame rate statistics.
|
virtualslot |
|
virtualslot |
Initialize and add a new map area.
Returns the current count. Or the number of MapAreas currently initialized in this window
Reimplemented in DtTMWindow, and DtTerrainWindow.
|
virtualslot |
Remove a map area from active service.
|
virtualslot |
Remove a map area from active service.
|
virtualslot |
change the current active map
|
virtualslot |
change the current active rubber band.
Also changes the active map related to that rubber band.
|
virtualslot |
This is called from add symbols from symbol generator.
|
virtualslot |
|
virtualslot |
Removes this keyed entry from local map dictionaries.
|
virtualslot |
This is called from remove symbols emit from symbol generator.
|
virtualslot |
This is called from modify symbols emit from symbol generator.
|
virtualslot |
Redraws the background. Also keeps a frame rate counter.
Reimplemented in DtTerrainWindow.
|
virtualslot |
Emits preUpdateTick() signal.
|
virtualslot |
Emits postUpdateTick signal.
|
virtualslot |
Uses our view/toolbar map to toggle toolbars on and off as connected via menu item items.
The menu item type is discovered as a function of passing the sender (a QAction) into the menu system to return its type
|
virtualslot |
Updates the view menu based on current toolbar status.
|
virtualslot |
Hides/shows all visible/hidden toolbars.
Reimplemented in DtTMWindow.
|
virtualslot |
|
virtualslot |
|
virtualslot |
Update valid actions.
This function decides which menu or button items are valid in your current state and disables/enables things accordingly
Reimplemented in DtTMWindow.
|
virtualslot |
Called when the selection has changed in any map area, emits a signal and updates valid actions.
Reimplemented in DtTMWindow.
|
virtualslot |
Changes the selection in the active map area.
|
virtualslot |
|
virtualslot |
Called when the menu system recreates a menu, if the menu recreated is the view menu, setup connections again.
|
inlineslot |
References myFeatureActionManager.
|
inlineslot |
References myBackupFeatureActionManager.
|
virtualslot |
Reverts feature action manager to backup.
|
virtualslot |
Merges in new feature action manager. Currently merge only changes shortcuts.
|
signal |
Emitted after all menu items have been validated.
|
signal |
Sent when the active map changed.
|
signal |
Sent when closing.
|
signal |
Sent when a new map area is created via createMapArea.
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
static |
Returns a newly created instance of a DtTerrainWindow.
Reimplemented in DtTMWindow, and DtTerrainWindow.
|
protectedvirtual |
Ticks this windows event controller and all attached.
|
protectedvirtual |
|
protectedvirtual |
Initializes the menu bar by calling the factory to create it.
Will also tell the menu bar to create itself by calling the "create" method
|
protectedvirtual |
Creates and initializes feature action manager.
|
protectedvirtual |
Called after feature action manager is created, adds default shortcuts and icons to the system.
Reimplemented in DtTMWindow, and DtTerrainWindow.
|
protectedvirtual |
Creates a new menu widget from the factory. Called by initMenuWidget.
|
protectedvirtual |
Initializes the view/menu toolbar map by associating a view menu action with a toolbar to toggle on and off.
Reimplemented in DtTMWindow, and DtTerrainWindow.
|
protectedvirtual |
Initializes connections for the map area.
Reimplemented in DtTerrainWindow.
|
protectedvirtual |
|
protectedvirtual |
Creates symbols in the map areas based on DtLocalControlModelData found in the application dictionary.
|
protectedvirtual |
Returns Left or Right depending on language layout.
|
protectedvirtual |
|
protectedvirtual |
Resurrect old call to place toolbar.
|
protectedvirtual |
|
protectedvirtual |
Creates a widget and layout that will center (horizontally) the supplied widget.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by hasRubberBands().
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by contextMenus().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by attachedEventControllers().
|
protected |
|
protected |
Referenced by featureActionManager().
|
protected |
Referenced by backupFeatureActionManager().