Extends two interfaces SVTK_ViewModelBase and SALOME_View.
#include <SVTK_ViewModel.h>

Public Types | |
| enum | { HorizontalGradient, VerticalGradient, FirstDiagonalGradient, SecondDiagonalGradient, FirstCornerGradient, SecondCornerGradient, ThirdCornerGradient, FourthCornerGradient, LastGradient = FourthCornerGradient } |
| enum | { CrystalEyesType, RedBlueType, InterlacedType, LeftType, RightType, DresdenType, AnaglyphType, CheckerboardType, SplitViewPortHorizontalType } |
| typedef SVTK_ViewWindow | TViewWindow |
Signals | |
| void | actorAdded (SVTK_ViewWindow *, VTKViewer_Actor *) |
| void | actorRemoved (SVTK_ViewWindow *, VTKViewer_Actor *) |
Signals inherited from SVTK_ViewModelBase | |
| void | selectionChanged () |
| To declare signal on selection changed. More... | |
Public Member Functions | |
| SVTK_Viewer () | |
| virtual | ~SVTK_Viewer () |
| virtual SUIT_ViewWindow * | createView (SUIT_Desktop *) |
| See SUIT_ViewModel::createView. More... | |
| virtual void | setViewManager (SUIT_ViewManager *theViewManager) |
| See SUIT_ViewModel::createView. More... | |
| virtual void | contextMenuPopup (QMenu *) |
| See SUIT_ViewModel::contextMenuPopup. More... | |
| virtual QString | getType () const |
| See SUIT_ViewModel::getType. More... | |
| QColor | backgroundColor () const |
| Get background color of the viewer [obsolete]. More... | |
| void | setBackgroundColor (const QColor &) |
| Set background color to the viewer [obsolete]. More... | |
| Qtx::BackgroundData | background () const |
| Get background color of the viewer. More... | |
| void | setBackground (const Qtx::BackgroundData &) |
| Set background color to the viewer. More... | |
| double | trihedronSize () const |
| Get size of trihedron of the viewer (see SVTK_Renderer::SetTrihedronSize) More... | |
| bool | trihedronRelative () const |
| Shows if the size of trihedron relative (see SVTK_Renderer::SetTrihedronSize) More... | |
| void | setTrihedronSize (const double, const bool=true) |
| Set size of trihedron of the viewer (see SVTK_Renderer::SetTrihedronSize) More... | |
| bool | isStaticTrihedronVisible () const |
| Get visibility status of the static trihedron. More... | |
| void | setStaticTrihedronVisible (const bool) |
| Set visibility status of the static trihedron. More... | |
| int | projectionMode () const |
| Gets projection mode. More... | |
| void | setProjectionMode (const int) |
| Sets projection mode. More... | |
| int | stereoType () const |
| Gets stereo type. More... | |
| void | setStereoType (const int) |
| Sets stereo type. More... | |
| int | anaglyphFilter () const |
| Gets anaglyph filter. More... | |
| void | setAnaglyphFilter (const int) |
| Sets anaglyph filter. More... | |
| bool | isQuadBufferSupport () const |
| Get support quad-buffered stereo. More... | |
| void | setQuadBufferSupport (const bool) |
| Set support quad-buffered stereo. More... | |
| int | interactionStyle () const |
| Gets interaction style. More... | |
| void | setInteractionStyle (const int) |
| Sets interaction style. More... | |
| int | zoomingStyle () const |
| Gets zooming style. More... | |
| void | setZoomingStyle (const int) |
| Sets zooming style. More... | |
| Preselection_Mode | preSelectionMode () const |
| Gets current preselection mode (standard, dynamic or disabled) More... | |
| void | setPreSelectionMode (Preselection_Mode) |
| Sets new preselection mode. More... | |
| int | incrementalSpeed () const |
| Get incremental speed (see SVTK_InteractorStyle::ControllerIncrement) More... | |
| int | incrementalSpeedMode () const |
| Returns modification mode of incremental speed (see SVTK_InteractorStyle::ControllerIncrement) More... | |
| void | setIncrementalSpeed (const int, const int=0) |
| Set the incremental speed for view operation (see SVTK_InteractorStyle::ControllerIncrement) More... | |
| int | spacemouseBtn (const int) const |
| Gets spacemouse button for specified function. More... | |
| void | setSpacemouseButtons (const int, const int, const int) |
| Sets spacemouse buttons. More... | |
| void | enableSelection (bool isEnabled) |
| bool | isSelectionEnabled () const |
| void | enableMultiselection (bool isEnable) |
| bool | isMultiSelectionEnabled () const |
| int | getSelectionCount () const |
| void | Display (const SALOME_VTKPrs *) |
| See #SALOME_View::Display( const SALOME_Prs* ) More... | |
| void | Erase (const SALOME_VTKPrs *, const bool=false) |
| See SALOME_View::Erase( const SALOME_VTKPrs*, const bool = false ) More... | |
| void | EraseAll (SALOME_Displayer *, const bool=false) |
| See SALOME_View::EraseAll( SALOME_Displayer*, const bool = false ) More... | |
| virtual void | GetVisible (SALOME_ListIO &) |
| See #SALOME_View::getVisible( SALOME_ListIO& ) More... | |
| SALOME_Prs * | CreatePrs (const char *entry=0) |
| See SALOME_View::CreatePrs( const char* entry = 0 ) More... | |
| virtual bool | isVisible (const Handle(SALOME_InteractiveObject)&) |
| See SALOME_View::isVisible( const Handle(SALOME_InteractiveObject)& ) More... | |
| virtual void | Repaint () |
| See SALOME_View::Repaint() More... | |
Public Member Functions inherited from SALOME_View | |
| virtual | ~SALOME_View () |
| Destructor. More... | |
| void | Display (SALOME_Displayer *, const SALOME_Prs *) |
| This Display() method should be called to display given presentation created anywhere by anybody. More... | |
| void | Erase (SALOME_Displayer *, const SALOME_Prs *, const bool=false) |
| This Erase() method should be called to erase given presentation created anywhere by anybody. More... | |
| void | LocalSelection (const SALOME_Prs *, const int) |
| This LocalSelection() method should be called to activate sub-shapes selection created anywhere by anybody. More... | |
| void | LocalSelection (const SALOME_Prs *, const std::list< int >) |
| virtual void | Display (const SALOME_OCCPrs *) |
| Display SALOME_OCCPrs presentation. More... | |
| virtual void | Display (const SALOME_Prs2d *) |
| Display SALOME_Prs2d presentation. More... | |
| virtual void | Erase (const SALOME_OCCPrs *, const bool=false) |
| Erase SALOME_OCCPrs. More... | |
| virtual void | Erase (const SALOME_Prs2d *, const bool=false) |
| Erase SALOME_Prs2d. More... | |
| virtual void | LocalSelection (const SALOME_OCCPrs *, const int) |
| Local selection SALOME_OCCPrs. More... | |
| virtual void | LocalSelection (const SALOME_OCCPrs *, const std::list< int >) |
| Multiple local selection SALOME_OCCPrs. More... | |
| virtual void | LocalSelection (const SALOME_VTKPrs *, const int) |
| Local selection SALOME_VTKPrs. More... | |
| virtual void | LocalSelection (const SALOME_Prs2d *, const int) |
| Local selection SALOME_Prs2d. More... | |
| virtual void | GlobalSelection (const bool=false) const |
| Deactivates selection of sub-shapes (must be redefined with OCC viewer) More... | |
| virtual void | BeforeDisplay (SALOME_Displayer *, const SALOME_Prs *) |
| virtual void | AfterDisplay (SALOME_Displayer *, const SALOME_Prs *) |
| virtual void | BeforeErase (SALOME_Displayer *, const SALOME_Prs *) |
| virtual void | AfterErase (SALOME_Displayer *, const SALOME_Prs *) |
Static Public Member Functions | |
| static QString | Type () |
| Define string representation of the viewer type. More... | |
| static QString | backgroundData (QStringList &, QIntList &, QIntList &) |
| static void | stereoData (QStringList &, QIntList &) |
Protected Slots | |
| void | onMousePress (SUIT_ViewWindow *, QMouseEvent *) |
| void | onMouseMove (SUIT_ViewWindow *, QMouseEvent *) |
| void | onMouseRelease (SUIT_ViewWindow *, QMouseEvent *) |
| void | onDumpView () |
| void | onChangeBackground () |
| void | onActorAdded (VTKViewer_Actor *) |
| void | onActorRemoved (VTKViewer_Actor *) |
Private Member Functions | |
| void | updateToolBars () |
Private Attributes | |
| Qtx::BackgroundData | myDefaultBackground |
| double | myTrihedronSize |
| bool | myTrihedronRelative |
| bool | myIsStaticTrihedronVisible |
| bool | mySelectionEnabled |
| bool | myMultiSelectionEnabled |
| int | myIncrementSpeed |
| int | myIncrementMode |
| int | myProjMode |
| int | myStereoType |
| int | myAnaglyphFilter |
| bool | myQuadBufferSupport |
| int | myStyle |
| int | myZoomingStyle |
| Preselection_Mode | myPreSelectionMode |
| int | mySpaceBtn [3] |
Additional Inherited Members | |
Public Slots inherited from SVTK_ViewModelBase | |
| void | onSelectionChanged () |
| To invoke Qt selectionChanged signal. More... | |
Static Public Attributes inherited from SUIT_ViewModel | |
| static InteractionStyle2StatesMap | myStateMap |
| static InteractionStyle2ButtonsMap | myButtonMap |
Protected Attributes inherited from SUIT_ViewModel | |
| SUIT_ViewManager * | myViewManager |
| anonymous enum |
| anonymous enum |
| SVTK_Viewer::SVTK_Viewer | ( | ) |
Constructor
References myAnaglyphFilter, myDefaultBackground, myIncrementMode, myIncrementSpeed, myIsStaticTrihedronVisible, myPreSelectionMode, myProjMode, myQuadBufferSupport, mySelectionEnabled, mySpaceBtn, myStereoType, myStyle, myTrihedronRelative, myTrihedronSize, myZoomingStyle, and Standard_Preselection.
|
virtual |
Destructor
|
signal |
|
signal |
| int SVTK_Viewer::anaglyphFilter | ( | ) | const |
References myAnaglyphFilter.
| Qtx::BackgroundData SVTK_Viewer::background | ( | ) | const |
References myDefaultBackground.
| QColor SVTK_Viewer::backgroundColor | ( | ) | const |
References background(), and Qtx::BackgroundData::color().
|
static |
Get data for supported background modes: gradient types, identifiers and supported image formats
References Qtx::CenterTexture, FirstCornerGradient, FirstDiagonalGradient, FourthCornerGradient, HorizontalGradient, SecondCornerGradient, SecondDiagonalGradient, Qtx::StretchTexture, ThirdCornerGradient, Qtx::TileTexture, and VerticalGradient.
|
virtual |
Builds popup for vtk viewer
Reimplemented from SUIT_ViewModel.
References SUIT_ViewManager::getActiveView(), SUIT_ViewModel::myViewManager, onChangeBackground(), and onDumpView().
|
virtual |
Create presentation corresponding to the entry
| entry | - entry |
Reimplemented from SALOME_View.
References SVTK_Prs::AddObject(), VTK::ActorCollectionCopy::GetActors(), SUIT_ViewModel::getViewManager(), and SALOME_Actor::hasIO().
|
virtual |
Create new instance of view window on desktop theDesktop.
| SUIT_ViewWindow* | - created view window pointer. |
Reimplemented from SUIT_ViewModel.
References actorAdded(), actorRemoved(), anaglyphFilter(), background(), incrementalSpeed(), incrementalSpeedMode(), SVTK_ViewWindow::Initialize(), interactionStyle(), isQuadBufferSupport(), isSelectionEnabled(), isStaticTrihedronVisible(), onActorAdded(), onActorRemoved(), preSelectionMode(), projectionMode(), SVTK_ViewWindow::SetAnaglyphFilter(), SVTK_ViewWindow::setBackground(), SVTK_ViewWindow::SetIncrementalSpeed(), SVTK_ViewWindow::SetInteractionStyle(), SVTK_ViewWindow::SetPreSelectionMode(), SVTK_ViewWindow::SetProjectionMode(), SVTK_ViewWindow::SetQuadBufferSupport(), SVTK_ViewWindow::SetSelectionEnabled(), SVTK_ViewWindow::SetSpacemouseButtons(), SVTK_ViewWindow::SetStaticTrihedronVisible(), SVTK_ViewWindow::SetStereoType(), SVTK_ViewWindow::SetTrihedronSize(), SVTK_ViewWindow::SetZoomingStyle(), spacemouseBtn(), stereoType(), trihedronRelative(), trihedronSize(), and zoomingStyle().
|
virtual |
Display presentation
| prs | - presentation |
Reimplemented from SALOME_View.
References SUIT_ViewManager::getViews(), and SUIT_ViewModel::myViewManager.
| void SVTK_Viewer::enableMultiselection | ( | bool | isEnable | ) |
Enables/disables selection of many object
| isEnabled | - new state |
! To be done for view windows
References myMultiSelectionEnabled.
| void SVTK_Viewer::enableSelection | ( | bool | isEnabled | ) |
Enables/disables selection
| isEnabled | - new state |
! To be done for view windows
References SUIT_ViewModel::getViewManager(), and mySelectionEnabled.
|
virtual |
Erase presentation
| prs | - presentation |
| forced | - removes object from view |
Reimplemented from SALOME_View.
References SUIT_ViewManager::getViews(), and SUIT_ViewModel::myViewManager.
|
virtual |
Erase all presentations
| forced | - removes all objects from view |
Reimplemented from SALOME_View.
References SALOME_View::EraseAll(), VTK::ActorCollectionCopy::GetActors(), SUIT_ViewManager::getViews(), SUIT_ViewModel::myViewManager, and Repaint().
| int SVTK_Viewer::getSelectionCount | ( | ) | const |
|
inlinevirtual |
Reimplemented from SUIT_ViewModel.
|
virtual |
objects visible in viewer
| theList | - visible objects collection |
Reimplemented from SALOME_View.
References SUIT_ViewManager::getViews(), and SUIT_ViewModel::myViewManager.
| int SVTK_Viewer::incrementalSpeed | ( | ) | const |
References myIncrementSpeed.
| int SVTK_Viewer::incrementalSpeedMode | ( | ) | const |
References myIncrementMode.
| int SVTK_Viewer::interactionStyle | ( | ) | const |
References myStyle.
|
inline |
| bool SVTK_Viewer::isQuadBufferSupport | ( | ) | const |
References myQuadBufferSupport.
|
inline |
| bool SVTK_Viewer::isStaticTrihedronVisible | ( | ) | const |
References myIsStaticTrihedronVisible.
|
virtual |
| obj | - object to be checked |
Reimplemented from SALOME_View.
References SUIT_ViewManager::getViews(), and SUIT_ViewModel::myViewManager.
|
protectedslot |
References actorAdded().
|
protectedslot |
References actorRemoved().
|
protectedslot |
SLOT: called if background color is to be changed changed, passes new color to view port
References SVTK_ViewWindow::background(), backgroundData(), SUIT_ViewManager::getActiveView(), QtxBackgroundDialog::getBackground(), Qtx::BackgroundData::isValid(), SUIT_ViewModel::myViewManager, and SVTK_ViewWindow::setBackground().
|
protectedslot |
SLOT: called on dump view operation is activated, stores scene to raster file
References SUIT_ViewManager::getActiveView(), and SUIT_ViewModel::myViewManager.
|
protectedslot |
SLOT: called on mouse move, empty implementation
|
protectedslot |
SLOT: called on mouse button press, empty implementation
|
protectedslot |
SLOT: called on mouse button release, empty implementation
| Preselection_Mode SVTK_Viewer::preSelectionMode | ( | ) | const |
References myPreSelectionMode.
| int SVTK_Viewer::projectionMode | ( | ) | const |
References myProjMode.
|
virtual |
Updates current viewer
Reimplemented from SALOME_View.
References SUIT_ViewManager::getViews(), and SUIT_ViewModel::myViewManager.
| void SVTK_Viewer::setAnaglyphFilter | ( | const int | theFilter | ) |
Sets anaglyph filter
| theFilter | - new anaglyph filter |
References SUIT_ViewModel::getViewManager(), and myAnaglyphFilter.
| void SVTK_Viewer::setBackground | ( | const Qtx::BackgroundData & | theBackground | ) |
Changes background
| theBackground | - new background data |
References SUIT_ViewManager::getViews(), Qtx::BackgroundData::isValid(), myDefaultBackground, and SUIT_ViewModel::myViewManager.
| void SVTK_Viewer::setBackgroundColor | ( | const QColor & | c | ) |
References background(), setBackground(), and Qtx::BackgroundData::setColor().
Set the incremental speed value and modification mode
| theValue | - new value |
| theMode | - new mode: 0 - arithmetic, 1 - geometrical progression |
References SUIT_ViewModel::getViewManager(), myIncrementMode, and myIncrementSpeed.
| void SVTK_Viewer::setInteractionStyle | ( | const int | theStyle | ) |
Sets interaction style: 0 - standard, 1 - keyboard free interaction
| theStyle | - new interaction style |
References SUIT_ViewModel::getViewManager(), and myStyle.
| void SVTK_Viewer::setPreSelectionMode | ( | Preselection_Mode | theMode | ) |
Sets preselection mode
| theMode | - new preselection mode |
References SUIT_ViewModel::getViewManager(), and myPreSelectionMode.
| void SVTK_Viewer::setProjectionMode | ( | const int | theMode | ) |
Sets projection mode: 0 - orthogonal, 1 - perspective projection
| theMode | - new projection mode |
References SUIT_ViewModel::getViewManager(), myProjMode, and SVTK_ViewWindow::Stereo.
| void SVTK_Viewer::setQuadBufferSupport | ( | const bool | theEnable | ) |
Set support quad-buffered stereo
| theEnable | - enable/disable support quad-buffered stereo |
References SUIT_ViewModel::getViewManager(), and myQuadBufferSupport.
Set the spacemouse buttons
| theBtn1,theBtn2,theBtn3 | - new buttons |
References SUIT_ViewModel::getViewManager(), and mySpaceBtn.
| void SVTK_Viewer::setStaticTrihedronVisible | ( | const bool | theIsVisible | ) |
Sets visibility status of the static trihedron
| theIsVisible | - new visibility status |
References SUIT_ViewModel::getViewManager(), and myIsStaticTrihedronVisible.
| void SVTK_Viewer::setStereoType | ( | const int | theType | ) |
Sets stereo type
| theType | - new stereo type |
References SUIT_ViewModel::getViewManager(), and myStereoType.
Sets trihedron size and relativeness( whether thihedron changes size in accordance with bounding box)
| theSize | - new size |
| theRelative | - new relativeness |
References SUIT_ViewModel::getViewManager(), myTrihedronRelative, and myTrihedronSize.
|
virtual |
Sets new view manager
| theViewManager | - new view manager |
Reimplemented from SUIT_ViewModel.
References onMouseMove(), onMousePress(), onMouseRelease(), and SUIT_ViewModel::setViewManager().
| void SVTK_Viewer::setZoomingStyle | ( | const int | theStyle | ) |
Sets zooming style: 0 - standard, 1 - advanced (at cursor)
| theStyle | - new zooming style |
References SUIT_ViewModel::getViewManager(), and myZoomingStyle.
| int SVTK_Viewer::spacemouseBtn | ( | const int | theIndex | ) | const |
| theIndex | - function by number (from 1 to 3) |
References mySpaceBtn.
|
static |
Get data for supported background modes: gradient types, identifiers and supported image formats
References AnaglyphType, CheckerboardType, CrystalEyesType, DresdenType, InterlacedType, LeftType, RedBlueType, RightType, and SplitViewPortHorizontalType.
| int SVTK_Viewer::stereoType | ( | ) | const |
References myStereoType.
| bool SVTK_Viewer::trihedronRelative | ( | ) | const |
References myTrihedronRelative.
| double SVTK_Viewer::trihedronSize | ( | ) | const |
References myTrihedronSize.
|
inlinestatic |
|
private |
| int SVTK_Viewer::zoomingStyle | ( | ) | const |
References myZoomingStyle.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |