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 | Protected Slots | Protected Member Functions | Protected Attributes
makVrv::DtObserverViewsWidget Class Reference

A widget class for managing different camera views the currently selected observer can be placed in. More...

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

Public Member Functions

 DtObserverViewsWidget (DtDe &de, QWidget *parent=0)
 Constructor of the page.
virtual ~DtObserverViewsWidget ()
 DTOR.
virtual QIcon icon ()
 Get the icon of the page.
virtual QString title ()
 Get the title of the page.
bool getClickedObserverViewInfo (DtUnicode &viewName, DtObserverViewsManager::ViewProjection &projection) const
 Gets the name and projection mode of the clicked observer view.
virtual void showSaveChangesMessage ()
 pops up an action confirmation message when the user is modifying the observers in the list
virtual void showClearWarningMessage ()
 Raises a confirmation message box to clear the contents of the observer views list.
virtual void showAssociateWarningMessage ()
 Raises a confirmation message box to associate the current contents of the observer views list with the currently loaded terrain.
virtual void showDissociateWarningMessage ()
 Raises a confirmation message box to dissociate any observer views that are currently associated with the currently loaded terrain.
virtual void requestSaveFilename ()
 Raises a message box offering options to 'Save As' or 'Don't Save'.
virtual void contextItemRequestSaveFilename ()
 Saves a single observer view.
virtual void resizeColumns ()
 Set the column size of the Observer view Table Widget.
- Public Member Functions inherited from makVrv::DtObserverViewsWidgetInterface
virtual ~DtObserverViewsWidgetInterface ()
 Virtual DTOR.
virtual void enableObserverViewsList (bool enabled)=0
 enables the observer views list
virtual void enableAddViewButton (bool enabled)=0
 enables the "add view" button
virtual void enableAssociateViewsToTerrainButton (bool enabled)=0
 enables the "associate views to terrain" button
virtual void enableSaveToFileButton (bool enabled)=0
 enables the "save views to file" button
virtual void enableDissociateViewsButton (bool enabled)=0
 enables the "dissociate views" button
virtual void enableLoadAndMergeViewsButton (bool enabled)=0
 enables the "load views" button
virtual void enableClearViewsButton (bool enabled)=0
virtual void enableSaveButton (bool enabled)=0
 If this is true, the dialog that is used when the export icon is pressed will contain a Save button (in addition to the Save As...) button.
virtual void setAssociateViewsToTerrainButtonOnExitMessageVisible (bool visible)=0
virtual void setSavedChangesButtonOnExitMessageVisible (bool visible)=0
virtual int viewListSize ()=0
virtual void dissociateViewFromTerrain (const std::string &viewName)=0

Protected Slots

virtual void onAddObserverView ()
 Calls down to logic to capture view and add it back here.
virtual void onViewSelectionChanged ()
 Calls down to logic to set a new observer view.
virtual void onItemPressed ()
 Calls down to logic to set a new observer view.
virtual void onClearObserverViews ()
 Calls down to logic to clear out observer views.
virtual void onAssociateViewsToTerrain ()
 Puts up dialog to allow user to specify a file to save all current views in and calls down to logic to do the save.
virtual void onSaveViewsToFile ()
 Puts up dialog to allow user to specify a file to save the currently selected view in and calls down to logic to do the save.
virtual void onLoadAndMergeViews ()
 Calls down to logic to load file and place view records found in there into the interface.
virtual void observerViewNameChanged ()
 Called when any aspect of the item data has changed.
void onRightClicked (QTreeWidgetItem *, QMouseEvent *, int col, int row)
 Determines the item that was clicked on and displays a context menu.
virtual void onDissociateViewsToTerrain ()
 dissociate the views from the current terrain loaded in scene
virtual void enableObserverViewsList (bool enabled)
 enables the observer views list
virtual void enableAddViewButton (bool enabled)
 enables the "add view" button
virtual void enableAssociateViewsToTerrainButton (bool enabled)
 enables the "associate views to terrain" button
virtual void enableSaveToFileButton (bool enabled)
 enables the "save views to file" button
virtual void enableSaveButton (bool enabled)
 If this is true, the dialog that is used when the "Save To File" icon is pressed will contain a Save button (in addition to the Save As...) button.
virtual void enableDissociateViewsButton (bool enabled)
 enables the "dissociate views" button
virtual void enableLoadAndMergeViewsButton (bool enabled)
 enables the "load views" button
virtual void enableClearViewsButton (bool enabled)
 enables the "clear views" button
virtual void setAssociateViewsToTerrainButtonOnExitMessageVisible (bool visible)
virtual void setSavedChangesButtonOnExitMessageVisible (bool visible)
virtual int viewListSize ()
virtual void dissociateViewFromTerrain (const std::string &viewName)

Protected Member Functions

virtual void activate ()
 Called when the page is displayed.
virtual void deactivate ()
 Called when the page is hidden.
void setupUi (QWidget *p)
 Sets up the contents of the widget onto the supplied parent.
virtual void insertObserverView (int index, const DtObserverViewInfoViewerData &observerData)
 Adds a new observer view mode, name and is default attributes to the list.
virtual void clearObserverViews ()
 Clears out observer views list.
virtual void deleteView (const std::string &, DtObserverViewsManager::ViewProjection projection)
 Removes the specified view from the observers view list.
virtual void renameObserverRecord (const std::string &newName, const std::string &oldName)
 Renames the observer record from old name to new name.
virtual void setDefaultView (const std::string &viewName, DtObserverViewsManager::ViewProjection projection)
 Set a view as default.
virtual void unSetDefaultView (const std::string &viewName, DtObserverViewsManager::ViewProjection projection)
 unset a default view
virtual bool eventFilter (QObject *obj, QEvent *event)
virtual void createQtTreeItem (QTreeWidgetItem &item, const DtObserverViewInfoViewerData &observerViewData)

Protected Attributes

QVBoxLayout * myMainLayout
QHBoxLayout * myButtonLayout
QTreeWidgetmyObserverViewsList
QPushButtonmyAddView
QPushButtonmyDissociateViews
QPushButtonmyAssociateViewsToTerrain
QPushButtonmySaveToFile
QPushButtonmyLoadViews
QPushButtonmyClearViews
DtItemIconsDelegatemyItemIconsDelegate
double myLastSelectionChangedSimTime
int myItemLeftClickedIndex
DtDemyDe
QMessageBoxmyMessageBox
QPushButtonmySavedChangesExitMessageButton
QPushButtonmySavedAsChangesExitMessageButton
QPushButtonmyDontSaveChangesExitMessageButton
QPushButtonmyAssociateViewsToTerrainExitMessageButton
bool mySaveEnabled
int myIconColumnSize

Additional Inherited Members

- Public Attributes inherited from makVrv::DtObserverViewsWidgetInterface
boost::signal< void()> signal_captureAndObserverView
 Signals.
boost::signal< void(const
DtUnicode
&, DtObserverViewsManager::ViewProjection,
bool) > 
signal_setObserverViewbyNameAndMode
 Called when the user click on a view and the system load it.
boost::signal< void()> signal_clearObserverViews
 Called when the user cleans observer view's list form the widget.
boost::signal< void()> signal_associateObserverViewsToCurrentTerrain
 Called when the user confirms to associate views with the current terrain from observer view's list form the widget.
boost::signal< void()> signal_dissociateObserverViewsToCurrentTerrain
 Called when the user confirms to dissociate views with the current terrain from observer view's list form the widget.
boost::signal< void(const
DtUnicode &)> 
signal_saveObserverViewsFileAs
 Called when the user presses the saveObserverViews button.
boost::signal< void()> signal_saveObserverViewsFile
boost::signal< void(const
DtUnicode &)> 
signal_saveSingleObserverViewsFile
 Called when the user saves a single observer view into a file.
boost::signal< void(const
DtUnicode &)> 
signal_loadObserverViewsFile
 Called when the user loads observer views from a file.
boost::signal< bool(const
DtUnicode &, const DtUnicode
&, DtObserverViewsManager::ViewProjection)> 
signal_renameObserverRecord
 Called when the user rename a observer view.
boost::signal< void(const
std::string
&, DtObserverViewsManager::ViewProjection)> 
signal_rightClickedOnObserverView
 Called when to save the data of a right clicked observer view.
boost::signal< void()> signal_saveLoadedFile
 Called when the user rename a observer view.

Detailed Description

A widget class for managing different camera views the currently selected observer can be placed in.

Constructor & Destructor Documentation

makVrv::DtObserverViewsWidget::DtObserverViewsWidget ( DtDe de,
QWidget *  parent = 0 
)

Constructor of the page.

virtual makVrv::DtObserverViewsWidget::~DtObserverViewsWidget ( )
virtual

DTOR.

Member Function Documentation

virtual QIcon makVrv::DtObserverViewsWidget::icon ( )
virtual

Get the icon of the page.

virtual QString makVrv::DtObserverViewsWidget::title ( )
virtual

Get the title of the page.

bool makVrv::DtObserverViewsWidget::getClickedObserverViewInfo ( DtUnicode viewName,
DtObserverViewsManager::ViewProjection projection 
) const

Gets the name and projection mode of the clicked observer view.

Returns false if there is no currently click object

virtual void makVrv::DtObserverViewsWidget::showSaveChangesMessage ( )
virtual

pops up an action confirmation message when the user is modifying the observers in the list

Implements makVrv::DtObserverViewsWidgetInterface.

virtual void makVrv::DtObserverViewsWidget::showClearWarningMessage ( )
virtual

Raises a confirmation message box to clear the contents of the observer views list.

Implements makVrv::DtObserverViewsWidgetInterface.

virtual void makVrv::DtObserverViewsWidget::showAssociateWarningMessage ( )
virtual

Raises a confirmation message box to associate the current contents of the observer views list with the currently loaded terrain.

Implements makVrv::DtObserverViewsWidgetInterface.

virtual void makVrv::DtObserverViewsWidget::showDissociateWarningMessage ( )
virtual

Raises a confirmation message box to dissociate any observer views that are currently associated with the currently loaded terrain.

Implements makVrv::DtObserverViewsWidgetInterface.

virtual void makVrv::DtObserverViewsWidget::requestSaveFilename ( )
virtual

Raises a message box offering options to 'Save As' or 'Don't Save'.

If the mySaveEnabled flag is true, the box will also contain the 'Save' option. If 'Save As' is chosen, it will call DtStaticFileDialog::getSaveFileNameWithExtension to request a file name, followed by a signal_saveObserverViewsFileAs if a filename has been selected; 'Save' generates a signal_saveObserverViewsFile.

Implements makVrv::DtObserverViewsWidgetInterface.

virtual void makVrv::DtObserverViewsWidget::contextItemRequestSaveFilename ( )
virtual

Saves a single observer view.

Implements makVrv::DtObserverViewsWidgetInterface.

virtual void makVrv::DtObserverViewsWidget::resizeColumns ( )
virtual

Set the column size of the Observer view Table Widget.

Implements makVrv::DtObserverViewsWidgetInterface.

virtual void makVrv::DtObserverViewsWidget::activate ( )
protectedvirtual

Called when the page is displayed.

virtual void makVrv::DtObserverViewsWidget::deactivate ( )
protectedvirtual

Called when the page is hidden.

void makVrv::DtObserverViewsWidget::setupUi ( QWidget *  p)
protected

Sets up the contents of the widget onto the supplied parent.

virtual void makVrv::DtObserverViewsWidget::insertObserverView ( int  index,
const DtObserverViewInfoViewerData observerData 
)
protectedvirtual

Adds a new observer view mode, name and is default attributes to the list.

Implements makVrv::DtObserverViewsWidgetInterface.

Reimplemented in makVrf::DtVrfObserverViewsWidget.

virtual void makVrv::DtObserverViewsWidget::clearObserverViews ( )
protectedvirtual

Clears out observer views list.

Implements makVrv::DtObserverViewsWidgetInterface.

virtual void makVrv::DtObserverViewsWidget::deleteView ( const std::string &  ,
DtObserverViewsManager::ViewProjection  projection 
)
protectedvirtual

Removes the specified view from the observers view list.

Implements makVrv::DtObserverViewsWidgetInterface.

virtual void makVrv::DtObserverViewsWidget::renameObserverRecord ( const std::string &  newName,
const std::string &  oldName 
)
protectedvirtual

Renames the observer record from old name to new name.

Implements makVrv::DtObserverViewsWidgetInterface.

virtual void makVrv::DtObserverViewsWidget::setDefaultView ( const std::string &  viewName,
DtObserverViewsManager::ViewProjection  projection 
)
protectedvirtual

Set a view as default.

Implements makVrv::DtObserverViewsWidgetInterface.

virtual void makVrv::DtObserverViewsWidget::unSetDefaultView ( const std::string &  viewName,
DtObserverViewsManager::ViewProjection  projection 
)
protectedvirtual

unset a default view

Implements makVrv::DtObserverViewsWidgetInterface.

virtual bool makVrv::DtObserverViewsWidget::eventFilter ( QObject obj,
QEvent *  event 
)
protectedvirtual
virtual void makVrv::DtObserverViewsWidget::onAddObserverView ( )
protectedvirtualslot

Calls down to logic to capture view and add it back here.

virtual void makVrv::DtObserverViewsWidget::onViewSelectionChanged ( )
protectedvirtualslot

Calls down to logic to set a new observer view.

Also will enable/disable buttons on selection Won't do anything if CTRL is pressed.

virtual void makVrv::DtObserverViewsWidget::onItemPressed ( )
protectedvirtualslot

Calls down to logic to set a new observer view.

Also will enable/disable buttons on selection Animates the observer view change if CTRL is pressed.

virtual void makVrv::DtObserverViewsWidget::onClearObserverViews ( )
protectedvirtualslot

Calls down to logic to clear out observer views.

virtual void makVrv::DtObserverViewsWidget::onAssociateViewsToTerrain ( )
protectedvirtualslot

Puts up dialog to allow user to specify a file to save all current views in and calls down to logic to do the save.

virtual void makVrv::DtObserverViewsWidget::onSaveViewsToFile ( )
protectedvirtualslot

Puts up dialog to allow user to specify a file to save the currently selected view in and calls down to logic to do the save.

virtual void makVrv::DtObserverViewsWidget::onLoadAndMergeViews ( )
protectedvirtualslot

Calls down to logic to load file and place view records found in there into the interface.

virtual void makVrv::DtObserverViewsWidget::observerViewNameChanged ( )
protectedvirtualslot

Called when any aspect of the item data has changed.

Will check to see if the name needs to be updated. If the name is the same as another name, will warn the user

void makVrv::DtObserverViewsWidget::onRightClicked ( QTreeWidgetItem ,
QMouseEvent *  ,
int  col,
int  row 
)
protectedslot

Determines the item that was clicked on and displays a context menu.

virtual void makVrv::DtObserverViewsWidget::onDissociateViewsToTerrain ( )
protectedvirtualslot

dissociate the views from the current terrain loaded in scene

virtual void makVrv::DtObserverViewsWidget::enableObserverViewsList ( bool  enabled)
protectedvirtualslot

enables the observer views list

virtual void makVrv::DtObserverViewsWidget::enableAddViewButton ( bool  enabled)
protectedvirtualslot

enables the "add view" button

virtual void makVrv::DtObserverViewsWidget::enableAssociateViewsToTerrainButton ( bool  enabled)
protectedvirtualslot

enables the "associate views to terrain" button

virtual void makVrv::DtObserverViewsWidget::enableSaveToFileButton ( bool  enabled)
protectedvirtualslot

enables the "save views to file" button

virtual void makVrv::DtObserverViewsWidget::enableSaveButton ( bool  enabled)
protectedvirtualslot

If this is true, the dialog that is used when the "Save To File" icon is pressed will contain a Save button (in addition to the Save As...) button.

virtual void makVrv::DtObserverViewsWidget::enableDissociateViewsButton ( bool  enabled)
protectedvirtualslot

enables the "dissociate views" button

virtual void makVrv::DtObserverViewsWidget::enableLoadAndMergeViewsButton ( bool  enabled)
protectedvirtualslot

enables the "load views" button

virtual void makVrv::DtObserverViewsWidget::enableClearViewsButton ( bool  enabled)
protectedvirtualslot

enables the "clear views" button

virtual void makVrv::DtObserverViewsWidget::setAssociateViewsToTerrainButtonOnExitMessageVisible ( bool  visible)
protectedvirtualslot
virtual void makVrv::DtObserverViewsWidget::setSavedChangesButtonOnExitMessageVisible ( bool  visible)
protectedvirtualslot
virtual int makVrv::DtObserverViewsWidget::viewListSize ( )
protectedvirtualslot
virtual void makVrv::DtObserverViewsWidget::dissociateViewFromTerrain ( const std::string &  viewName)
protectedvirtualslot
virtual void makVrv::DtObserverViewsWidget::createQtTreeItem ( QTreeWidgetItem item,
const DtObserverViewInfoViewerData observerViewData 
)
protectedvirtual

Member Data Documentation

QVBoxLayout* makVrv::DtObserverViewsWidget::myMainLayout
protected
QHBoxLayout* makVrv::DtObserverViewsWidget::myButtonLayout
protected
QTreeWidget* makVrv::DtObserverViewsWidget::myObserverViewsList
protected
QPushButton* makVrv::DtObserverViewsWidget::myAddView
protected
QPushButton* makVrv::DtObserverViewsWidget::myDissociateViews
protected
QPushButton* makVrv::DtObserverViewsWidget::myAssociateViewsToTerrain
protected
QPushButton* makVrv::DtObserverViewsWidget::mySaveToFile
protected
QPushButton* makVrv::DtObserverViewsWidget::myLoadViews
protected
QPushButton* makVrv::DtObserverViewsWidget::myClearViews
protected
DtItemIconsDelegate* makVrv::DtObserverViewsWidget::myItemIconsDelegate
protected
double makVrv::DtObserverViewsWidget::myLastSelectionChangedSimTime
protected
int makVrv::DtObserverViewsWidget::myItemLeftClickedIndex
protected
DtDe& makVrv::DtObserverViewsWidget::myDe
protected
QMessageBox* makVrv::DtObserverViewsWidget::myMessageBox
protected
QPushButton* makVrv::DtObserverViewsWidget::mySavedChangesExitMessageButton
protected
QPushButton* makVrv::DtObserverViewsWidget::mySavedAsChangesExitMessageButton
protected
QPushButton* makVrv::DtObserverViewsWidget::myDontSaveChangesExitMessageButton
protected
QPushButton* makVrv::DtObserverViewsWidget::myAssociateViewsToTerrainExitMessageButton
protected
bool makVrv::DtObserverViewsWidget::mySaveEnabled
protected
int makVrv::DtObserverViewsWidget::myIconColumnSize
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)