VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtObserverViewsWidgetLogic Class Reference

The logic for controlling and updating the makVrv::DtObserverViewsWidget. More...

Inheritance diagram for makVrv::DtObserverViewsWidgetLogic:
Inheritance graph
[legend]

Public Member Functions

virtual ~DtObserverViewsWidgetLogic ()
 virtual DTOR
virtual void slot_captureAndAddObserverView ()
 Captures the current observer view and adds a new record to the interface.
virtual void slot_setObserverViewByNameAndMode (const DtUnicode &, DtObserverViewsManager::ViewProjection projection, bool animate=false)
 Sets the currently selected observer to the new view.
virtual void slot_clearObserverViews ()
 Clears out internal observer views and tells interface to do the same.
virtual void slot_associateObserverViewsToCurrentTerrain ()
 Tells the observer views manager to save out all records to a file with the loaded terrain files base name and .osrx extension.
virtual void slot_dissociateObserverViewsToCurrentTerrain ()
 Tells the observer views manager to delete the file of associated observer views.
virtual void slot_saveObserverViewsFileAs (const DtUnicode &filename)
 Saves out all observer view records to the specified filename.
virtual void slot_saveObserverViewsFile ()
 Saves out all observer view records to the observer views file that was last loaded (this filename is cleared by a terrain clear operation).
virtual void slot_deleteObserverView ()
 Deletes the specified observer view from interface and observer record list.
virtual void slot_saveObserverView ()
 Saves the specified observer view from interface and observer record list.
virtual void slot_loadObserverViewsFile (const DtUnicode &)
 Loads in the specified file and merges in records found into the internal records list and into the user interface.
virtual bool slot_renameObserverRecord (const DtUnicode &newName, const DtUnicode &oldName, DtObserverViewsManager::ViewProjection projection)
 Renames the observer view record internally and in the interface if the name does not already exist.
virtual
DtObserverViewsManager::ViewProjection 
observerViewProjectionMode (const makArchives::DtObserverStateRecord &record)
 get default observer view projection mode ("2D" or "3D").
void refreshObserverViewList ()
 updates the observer view list in the gui
void refreshWidget ()
 called when the widget is initialized/enabled
virtual void setRightClickedObserverViewData (const std::string &observeViewName, DtObserverViewsManager::ViewProjection projection)
 keep track of the latest observer view that received the onRightClick event
void slot_showExitMessageDialog ()
 Pops up a mesage if the observer view list has been modified.
void slot_savedLoadedFile ()
 saves if exists the observer view file associated to the terrain opened in the scene.

Static Public Member Functions

static DtObserverViewsWidgetLogiccreate (DtDe &de, DtObserverViewsWidgetInterface *iFace)
 Create and initialize the logic.

Protected Member Functions

virtual bool canAssociate () const
 helper function used to determine if the Associate icon should be enabled and if, for a close/exit warning dialog, the Associate button should be on the warning dialog.
virtual bool canDissociate () const
 helper function used to determine if the Dissociate icon should be enabled.
virtual bool canSave () const
 helper function used to determine if, for a close/exit warning dialog, the Save button should be on the warning dialog.
virtual bool canSaveAs () const
 helper function used to determine if the Save icon should be enabled and if, for a close/exit warning dialog, the Save As button should be on the warning dialog.
virtual bool canClear () const
 helper function used to determine if the Clear icon should be enabled.
virtual void slot_capturedObserverViewAdded (const makArchives::DtObserverStateRecord &observerView)
 listens when the observer view list has been modified
virtual void slot_observerViewRemoved (const makArchives::DtObserverStateRecord &observerView)
 listens when a observer view is removed from the list
virtual void slot_observerViewNameModified (const std::string &newName, const makArchives::DtObserverStateRecord &observerView)
 listens when the name of an observer view is modified
virtual void slot_observerViewsAssociatedToTerrain ()
 listens when the observer views are associated to the terrain in scene
virtual void slot_observerViewDissociatedToTerrain (const makArchives::DtObserverStateRecordsList &observerView)
 listens when the observer views are dissociated from the terrain in scene
virtual void slot_observerViewsImportedAndMerge (const makArchives::DtObserverStateRecordsList &observerViewList)
 listens when an osrx file records are loaded and added the current list
virtual void slot_observerViewsImportedAndReplaced (const makArchives::DtObserverStateRecordsList &observerViewList)
 listens when an osrx file records are loaded and replace the current list
virtual void slot_associatedViewsToTerrainLoaded (const makArchives::DtObserverStateRecordsList &observerViewList)
 listens when the associated observer views to a terrain are being added to the list
virtual void slot_associatedViewsToTerrainUnloaded (const makArchives::DtObserverStateRecordsList &observerViewList)
 listens when the associated observer views to a terrain are being removed from the list
virtual void slot_setDefaultObserverViewRecord (const makArchives::DtObserverStateRecord &)
 listens when an observer view is set as default
virtual void slot_unSetDefaultObserverViewRecord (const makArchives::DtObserverStateRecord &)
 listens when unsetting a default observer
virtual void slot_observerViewsAboutToBeCleared ()
 called when the observer view list is about to be cleared
virtual void slot_observerViewsCleared ()
 called AFTER the observer view list is cleared
virtual void slot_sceneTerrainLoaded (const DtUnicode &terreainFileName)
 listens when a terrain loaded in the scene
virtual void slot_terrainCleared ()
 listens when the loaded terrain in scene is cleared
virtual void slot_toggleDefaultObserverView (bool set)
 listens when a default observer view is set or unset
virtual void slot_postInitialize ()
 listens to postInitialize signal
virtual void slot_saveSingleObserverViewsFile (const DtUnicode &observerViewFileName)
 listens to save single observer view record signal
virtual void processEnableState ()
 /brief Enables/Disables buttons in interface based on whether or not there is an observer
 DtObserverViewsWidgetLogic (DtDe &de, DtObserverViewsWidgetInterface *iFace)
 Constructor (protected - use ::create() )

Protected Attributes

DtDemyDe
DtObserverViewsWidgetInterfacemyGui
DtObserverViewsManagermyObserverViewsManager
bool myHasSetupObserverRecords
std::string myObserversViewFile
std::string myTerrainFilename
DtSignalConnectionManager myConnections

Detailed Description

The logic for controlling and updating the makVrv::DtObserverViewsWidget.

Constructor & Destructor Documentation

virtual makVrv::DtObserverViewsWidgetLogic::~DtObserverViewsWidgetLogic ( )
virtual

virtual DTOR

makVrv::DtObserverViewsWidgetLogic::DtObserverViewsWidgetLogic ( DtDe de,
DtObserverViewsWidgetInterface iFace 
)
protected

Constructor (protected - use ::create() )

Member Function Documentation

static DtObserverViewsWidgetLogic* makVrv::DtObserverViewsWidgetLogic::create ( DtDe de,
DtObserverViewsWidgetInterface iFace 
)
static

Create and initialize the logic.

virtual void makVrv::DtObserverViewsWidgetLogic::slot_captureAndAddObserverView ( )
virtual

Captures the current observer view and adds a new record to the interface.

virtual void makVrv::DtObserverViewsWidgetLogic::slot_setObserverViewByNameAndMode ( const DtUnicode ,
DtObserverViewsManager::ViewProjection  projection,
bool  animate = false 
)
virtual

Sets the currently selected observer to the new view.

If the animate flag is true, the observer will move smoothly to the new view instead of a discrete jump

virtual void makVrv::DtObserverViewsWidgetLogic::slot_clearObserverViews ( )
virtual

Clears out internal observer views and tells interface to do the same.

virtual void makVrv::DtObserverViewsWidgetLogic::slot_associateObserverViewsToCurrentTerrain ( )
virtual

Tells the observer views manager to save out all records to a file with the loaded terrain files base name and .osrx extension.

virtual void makVrv::DtObserverViewsWidgetLogic::slot_dissociateObserverViewsToCurrentTerrain ( )
virtual

Tells the observer views manager to delete the file of associated observer views.

virtual void makVrv::DtObserverViewsWidgetLogic::slot_saveObserverViewsFileAs ( const DtUnicode filename)
virtual

Saves out all observer view records to the specified filename.

virtual void makVrv::DtObserverViewsWidgetLogic::slot_saveObserverViewsFile ( )
virtual

Saves out all observer view records to the observer views file that was last loaded (this filename is cleared by a terrain clear operation).

virtual void makVrv::DtObserverViewsWidgetLogic::slot_deleteObserverView ( )
virtual

Deletes the specified observer view from interface and observer record list.

virtual void makVrv::DtObserverViewsWidgetLogic::slot_saveObserverView ( )
virtual

Saves the specified observer view from interface and observer record list.

virtual void makVrv::DtObserverViewsWidgetLogic::slot_loadObserverViewsFile ( const DtUnicode )
virtual

Loads in the specified file and merges in records found into the internal records list and into the user interface.

If there are duplicate names, will make them unique by adding an index to them

virtual bool makVrv::DtObserverViewsWidgetLogic::slot_renameObserverRecord ( const DtUnicode newName,
const DtUnicode oldName,
DtObserverViewsManager::ViewProjection  projection 
)
virtual

Renames the observer view record internally and in the interface if the name does not already exist.

If it does, method returns false

virtual DtObserverViewsManager::ViewProjection makVrv::DtObserverViewsWidgetLogic::observerViewProjectionMode ( const makArchives::DtObserverStateRecord record)
virtual

get default observer view projection mode ("2D" or "3D").

Returns true if the observer mode is found. Otherwise, modeStr is set to "" and false is returned.

void makVrv::DtObserverViewsWidgetLogic::refreshObserverViewList ( )

updates the observer view list in the gui

void makVrv::DtObserverViewsWidgetLogic::refreshWidget ( )

called when the widget is initialized/enabled

virtual void makVrv::DtObserverViewsWidgetLogic::setRightClickedObserverViewData ( const std::string &  observeViewName,
DtObserverViewsManager::ViewProjection  projection 
)
virtual

keep track of the latest observer view that received the onRightClick event

void makVrv::DtObserverViewsWidgetLogic::slot_showExitMessageDialog ( )

Pops up a mesage if the observer view list has been modified.

Reimplemented in makVrf::DtVrfObserverViewsWidgetLogic.

void makVrv::DtObserverViewsWidgetLogic::slot_savedLoadedFile ( )

saves if exists the observer view file associated to the terrain opened in the scene.

virtual bool makVrv::DtObserverViewsWidgetLogic::canAssociate ( ) const
protectedvirtual

helper function used to determine if the Associate icon should be enabled and if, for a close/exit warning dialog, the Associate button should be on the warning dialog.

Called by processEnableState.

virtual bool makVrv::DtObserverViewsWidgetLogic::canDissociate ( ) const
protectedvirtual

helper function used to determine if the Dissociate icon should be enabled.

Called by processEnableState.

virtual bool makVrv::DtObserverViewsWidgetLogic::canSave ( ) const
protectedvirtual

helper function used to determine if, for a close/exit warning dialog, the Save button should be on the warning dialog.

Called by processEnableState.

virtual bool makVrv::DtObserverViewsWidgetLogic::canSaveAs ( ) const
protectedvirtual

helper function used to determine if the Save icon should be enabled and if, for a close/exit warning dialog, the Save As button should be on the warning dialog.

Called by processEnableState.

virtual bool makVrv::DtObserverViewsWidgetLogic::canClear ( ) const
protectedvirtual

helper function used to determine if the Clear icon should be enabled.

Called by processEnableState.

virtual void makVrv::DtObserverViewsWidgetLogic::slot_capturedObserverViewAdded ( const makArchives::DtObserverStateRecord observerView)
protectedvirtual

listens when the observer view list has been modified

virtual void makVrv::DtObserverViewsWidgetLogic::slot_observerViewRemoved ( const makArchives::DtObserverStateRecord observerView)
protectedvirtual

listens when a observer view is removed from the list

virtual void makVrv::DtObserverViewsWidgetLogic::slot_observerViewNameModified ( const std::string &  newName,
const makArchives::DtObserverStateRecord observerView 
)
protectedvirtual

listens when the name of an observer view is modified

virtual void makVrv::DtObserverViewsWidgetLogic::slot_observerViewsAssociatedToTerrain ( )
protectedvirtual

listens when the observer views are associated to the terrain in scene

virtual void makVrv::DtObserverViewsWidgetLogic::slot_observerViewDissociatedToTerrain ( const makArchives::DtObserverStateRecordsList observerView)
protectedvirtual

listens when the observer views are dissociated from the terrain in scene

virtual void makVrv::DtObserverViewsWidgetLogic::slot_observerViewsImportedAndMerge ( const makArchives::DtObserverStateRecordsList observerViewList)
protectedvirtual

listens when an osrx file records are loaded and added the current list

virtual void makVrv::DtObserverViewsWidgetLogic::slot_observerViewsImportedAndReplaced ( const makArchives::DtObserverStateRecordsList observerViewList)
protectedvirtual

listens when an osrx file records are loaded and replace the current list

virtual void makVrv::DtObserverViewsWidgetLogic::slot_associatedViewsToTerrainLoaded ( const makArchives::DtObserverStateRecordsList observerViewList)
protectedvirtual

listens when the associated observer views to a terrain are being added to the list

virtual void makVrv::DtObserverViewsWidgetLogic::slot_associatedViewsToTerrainUnloaded ( const makArchives::DtObserverStateRecordsList observerViewList)
protectedvirtual

listens when the associated observer views to a terrain are being removed from the list

virtual void makVrv::DtObserverViewsWidgetLogic::slot_setDefaultObserverViewRecord ( const makArchives::DtObserverStateRecord )
protectedvirtual

listens when an observer view is set as default

Reimplemented in makVrf::DtVrfObserverViewsWidgetLogic.

virtual void makVrv::DtObserverViewsWidgetLogic::slot_unSetDefaultObserverViewRecord ( const makArchives::DtObserverStateRecord )
protectedvirtual

listens when unsetting a default observer

Reimplemented in makVrf::DtVrfObserverViewsWidgetLogic.

virtual void makVrv::DtObserverViewsWidgetLogic::slot_observerViewsAboutToBeCleared ( )
protectedvirtual

called when the observer view list is about to be cleared

virtual void makVrv::DtObserverViewsWidgetLogic::slot_observerViewsCleared ( )
protectedvirtual

called AFTER the observer view list is cleared

virtual void makVrv::DtObserverViewsWidgetLogic::slot_sceneTerrainLoaded ( const DtUnicode terreainFileName)
protectedvirtual

listens when a terrain loaded in the scene

virtual void makVrv::DtObserverViewsWidgetLogic::slot_terrainCleared ( )
protectedvirtual

listens when the loaded terrain in scene is cleared

virtual void makVrv::DtObserverViewsWidgetLogic::slot_toggleDefaultObserverView ( bool  set)
protectedvirtual

listens when a default observer view is set or unset

virtual void makVrv::DtObserverViewsWidgetLogic::slot_postInitialize ( )
protectedvirtual

listens to postInitialize signal

virtual void makVrv::DtObserverViewsWidgetLogic::slot_saveSingleObserverViewsFile ( const DtUnicode observerViewFileName)
protectedvirtual

listens to save single observer view record signal

virtual void makVrv::DtObserverViewsWidgetLogic::processEnableState ( )
protectedvirtual

/brief Enables/Disables buttons in interface based on whether or not there is an observer

Member Data Documentation

DtDe& makVrv::DtObserverViewsWidgetLogic::myDe
protected
DtObserverViewsWidgetInterface* makVrv::DtObserverViewsWidgetLogic::myGui
protected
DtObserverViewsManager* makVrv::DtObserverViewsWidgetLogic::myObserverViewsManager
protected
bool makVrv::DtObserverViewsWidgetLogic::myHasSetupObserverRecords
protected
std::string makVrv::DtObserverViewsWidgetLogic::myObserversViewFile
protected
std::string makVrv::DtObserverViewsWidgetLogic::myTerrainFilename
protected
DtSignalConnectionManager makVrv::DtObserverViewsWidgetLogic::myConnections
protected

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

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)