VR-Forces Developer's Guide
 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 | Private Attributes
makVrv::DtObserverViewsWidget Class Reference

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

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

Public Member Functions

virtual ~DtObserverViewsWidget ()
 
virtual QIcon icon ()
 
virtual QString title ()
 
bool getClickedObserverViewInfo (DtUnicode &viewName, DtObserverViewsManager::ViewProjection &projection) const
 
virtual void showSaveChangesMessage ()
 
virtual void showClearWarningMessage ()
 
virtual void showAssociateWarningMessage ()
 
virtual void showDissociateWarningMessage ()
 
virtual void requestSaveFilename ()
 
virtual void contextItemRequestSaveFilename ()
 
virtual void resizeColumns ()
 
- Public Member Functions inherited from makVrv::DtObserverViewsWidgetInterface
virtual ~DtObserverViewsWidgetInterface ()
 
virtual void enableObserverViewsList (bool enabled)=0
 
virtual void enableAddViewButton (bool enabled)=0
 
virtual void enableAssociateViewsToTerrainButton (bool enabled)=0
 
virtual void enableSaveToFileButton (bool enabled)=0
 
virtual void enableDissociateViewsButton (bool enabled)=0
 
virtual void enableLoadAndMergeViewsButton (bool enabled)=0
 
virtual void enableClearViewsButton (bool enabled)=0
 
virtual void enableSaveButton (bool enabled)=0
 
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 ()
 
virtual void onViewSelectionChanged ()
 
virtual void onItemPressed ()
 
virtual void onClearObserverViews ()
 
virtual void onAssociateViewsToTerrain ()
 
virtual void onSaveViewsToFile ()
 
virtual void onLoadAndMergeViews ()
 
virtual void observerViewNameChanged ()
 
void onRightClicked (QTreeWidgetItem *, QMouseEvent *, int col, int row)
 
virtual void onDissociateViewsToTerrain ()
 
virtual void enableObserverViewsList (bool enabled)
 
virtual void enableAddViewButton (bool enabled)
 
virtual void enableAssociateViewsToTerrainButton (bool enabled)
 
virtual void enableSaveToFileButton (bool enabled)
 
virtual void enableSaveButton (bool enabled)
 
virtual void enableDissociateViewsButton (bool enabled)
 
virtual void enableLoadAndMergeViewsButton (bool enabled)
 
virtual void enableClearViewsButton (bool enabled)
 
virtual void setAssociateViewsToTerrainButtonOnExitMessageVisible (bool visible)
 
virtual void setSavedChangesButtonOnExitMessageVisible (bool visible)
 
virtual int viewListSize ()
 
virtual void dissociateViewFromTerrain (const std::string &viewName)
 

Protected Member Functions

 DtObserverViewsWidget (DtDe &de, QWidget *parent=0)
 
virtual void activate ()
 
virtual void deactivate ()
 
void setupUi (QWidget *p)
 
virtual void insertObserverView (int index, const DtObserverViewInfoViewerData &observerData)
 
virtual void clearObserverViews ()
 
virtual void deleteView (const std::string &, DtObserverViewsManager::ViewProjection projection)
 
virtual void renameObserverRecord (const std::string &newName, const std::string &oldName)
 
virtual void setDefaultView (const std::string &viewName, DtObserverViewsManager::ViewProjection projection)
 
virtual void unSetDefaultView (const std::string &viewName, DtObserverViewsManager::ViewProjection projection)
 
virtual bool eventFilter (QObject *obj, QEvent *event) override
 
virtual void dragEnterEvent (QDragEnterEvent *event) override
 
virtual void dropEvent (QDropEvent *event) override
 

Protected Attributes

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

Private Attributes

friend DtObserverViewsWidgetCreator
 

Additional Inherited Members

- Public Attributes inherited from makVrv::DtObserverViewsWidgetInterface
boost::signalslib::signal< void()> signal_captureAndObserverView
 
boost::signalslib::signal
< void(const DtUnicode
&, DtObserverViewsManager::ViewProjection,
bool) > 
signal_setObserverViewbyNameAndMode
 
boost::signalslib::signal< void()> signal_clearObserverViews
 
boost::signalslib::signal< void()> signal_associateObserverViewsToCurrentTerrain
 
boost::signalslib::signal< void()> signal_dissociateObserverViewsToCurrentTerrain
 
boost::signalslib::signal
< void(const DtUnicode &)> 
signal_saveObserverViewsFileAs
 
boost::signalslib::signal< void()> signal_saveObserverViewsFile
 
boost::signalslib::signal
< void(const DtUnicode &)> 
signal_saveSingleObserverViewsFile
 
boost::signalslib::signal
< void(const DtUnicode &)> 
signal_loadObserverViewsFile
 
boost::signalslib::signal
< bool(const DtUnicode
&, const DtUnicode
&, DtObserverViewsManager::ViewProjection)> 
signal_renameObserverRecord
 
boost::signalslib::signal
< void(const std::string
&, DtObserverViewsManager::ViewProjection)> 
signal_rightClickedOnObserverView
 
boost::signalslib::signal< void()> signal_saveLoadedFile
 

Constructor & Destructor Documentation

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

DTOR.

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

Constructor of the page.

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 
)
overrideprotectedvirtual

override for the QDialog eventFilter function, used to filter everything except a few event types.

virtual void makVrv::DtObserverViewsWidget::dragEnterEvent ( QDragEnterEvent *  event)
overrideprotectedvirtual

override for the QWidget drawEnterEvent function, used to determine if the dropped item is an osrx file.

virtual void makVrv::DtObserverViewsWidget::dropEvent ( QDropEvent *  event)
overrideprotectedvirtual

override for the QWidget dropEvent function, used to load the dropped osrx file.

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

Member Data Documentation

friend makVrv::DtObserverViewsWidget::DtObserverViewsWidgetCreator
private
QVBoxLayout* makVrv::DtObserverViewsWidget::myMainLayout
protected
QHBoxLayout* makVrv::DtObserverViewsWidget::myButtonLayout
protected
DtQtreeView* 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
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 Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)