#include "GeometryGUI.h"
#include "GEOM_Displayer.h"
-#include "SUIT_Desktop.h"
-#include "SUIT_Session.h"
-#include "SUIT_ViewWindow.h"
-#include "SUIT_OverrideCursor.h"
+#include <SUIT_Desktop.h>
+#include <SUIT_Session.h>
+#include <SUIT_ViewWindow.h>
+#include <SUIT_OverrideCursor.h>
-#include "VTKViewer_ViewWindow.h"
-#include "OCCViewer_ViewManager.h"
-#include "OCCViewer_ViewModel.h"
-#include "OCCViewer_ViewWindow.h"
+#include <OCCViewer_ViewManager.h>
+#include <OCCViewer_ViewModel.h>
+#include <OCCViewer_ViewWindow.h>
-#include "SALOME_ListIteratorOfListIO.hxx"
+#include <SALOME_ListIteratorOfListIO.hxx>
-#include "SVTK_ViewWindow.h"
-#include "SVTK_View.h"
-#include "SVTK_ViewModel.h"
-#include "SOCC_ViewModel.h"
-#include "SVTK_Prs.h"
-#include "SOCC_Prs.h"
+#include <SVTK_ViewWindow.h>
+#include <SVTK_View.h>
+#include <SVTK_ViewModel.h>
+#include <SOCC_ViewModel.h>
+#include <SVTK_Prs.h>
+#include <SOCC_Prs.h>
-#include "SalomeApp_Application.h"
-#include "SalomeApp_SelectionMgr.h"
-#include "SalomeApp_Study.h"
+#include <QtxActionMenuMgr.h>
+
+#include <SalomeApp_Application.h>
+#include <LightApp_SelectionMgr.h>
+#include <SalomeApp_Study.h>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
{
DisplayGUI* myDisplayGUI = GetDisplayGUI( getGeometryGUI() );
+ LightApp_SelectionMgr *Sel = getGeometryGUI()->getApp()->selectionMgr();
+ SALOME_ListIO selected;
+ Sel->selectedObjects( selected );
switch (theCommandID) {
case 211: // MENU VIEW - WIREFRAME/SHADING
{
myDisplayGUI->InvertDisplayMode();
int newMode = myDisplayGUI->GetDisplayMode();
- SUIT_Session::session()->activeApplication()->desktop()->menuBar()->
- changeItem( 211, newMode == 1 ? tr( "GEOM_MEN_WIREFRAME" ) : tr("GEOM_MEN_SHADING") );
+ getGeometryGUI()->action( 211 )->setMenuText( newMode == 1 ? tr( "GEOM_MEN_WIREFRAME" ) : tr("GEOM_MEN_SHADING") );
+ getGeometryGUI()->menuMgr()->update();
+// SUIT_Session::session()->activeApplication()->desktop()->menuBar()->
+// changeItem( 211, newMode == 1 ? tr( "GEOM_MEN_WIREFRAME" ) : tr("GEOM_MEN_SHADING") );
break;
}
case 212: // MENU VIEW - DISPLAY ALL
{
+ getGeometryGUI()->EmitSignalDeactivateDialog();
myDisplayGUI->DisplayAll();
break;
}
case 213: // MENU VIEW - DISPLAY ONLY
{
+ getGeometryGUI()->EmitSignalDeactivateDialog();
myDisplayGUI->DisplayOnly();
break;
}
}
case 216: // MENU VIEW - DISPLAY
{
+ getGeometryGUI()->EmitSignalDeactivateDialog();
myDisplayGUI->Display();
break;
}
break;
}
}
+ Sel->setSelectedObjects( selected );
return true;
}
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
SUIT_ViewManager* vman = vw->getViewManager();
if ( vman->getType() == OCCViewer_Viewer::Type() ||
- vman->getType() == VTKViewer_Viewer::Type() ) {
+ vman->getType() == SVTK_Viewer::Type() ) {
GEOM_Displayer( appStudy ).EraseAll();
}
}
if ( !anActiveStudy ) return;
//get SalomeApp selection manager
- SalomeApp_SelectionMgr* aSelMgr = app->selectionMgr();
+ LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
if ( !aSelMgr ) return;
SALOME_ListIO aList;
if ( !anActiveStudy ) return;
//get SalomeApp selection manager
- SalomeApp_SelectionMgr* aSelMgr = app->selectionMgr();
+ LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
if ( !aSelMgr ) return;
SALOME_ListIO aList;
if ( !viewWindow )
viewWindow = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
- if ( viewWindow->getViewManager()->getType() == VTKViewer_Viewer::Type() ) {
+ if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
SVTK_View* aView = ((SVTK_ViewWindow*)viewWindow)->getView();
aView->SetDisplayMode( mode );
}
int dispMode = 0;
if ( !viewWindow )
viewWindow = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
- if ( viewWindow->getViewManager()->getType() == VTKViewer_Viewer::Type() ) {
+ if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
SVTK_View* aView = ((SVTK_ViewWindow*)viewWindow)->getView();
dispMode = aView->GetDisplayMode();
}
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
if ( !app ) return;
- SalomeApp_SelectionMgr* aSelMgr = app->selectionMgr();
+ LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
if ( !aSelMgr ) return;
SUIT_OverrideCursor();
SALOME_ListIO aList;
- if ( viewWindow->getViewManager()->getType() == VTKViewer_Viewer::Type() ) {
+ if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>( viewWindow );
SVTK_View* aView = vw->getView();
SALOME_ListIteratorOfListIO It( aList );
for( ;It.More(); It.Next() ) {
- SVTK_Viewer* stvkViewer = (SVTK_Viewer*)(vw->getViewManager()->getViewModel());
- SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( stvkViewer->CreatePrs( It.Value()->getEntry() ) );
+ SVTK_Viewer* stvkViewer = dynamic_cast<SVTK_Viewer*>(vw->getViewManager()->getViewModel());
+ SVTK_Prs* vtkPrs = stvkViewer ? dynamic_cast<SVTK_Prs*>( stvkViewer->CreatePrs( It.Value()->getEntry() ) ) : 0;
if ( vtkPrs && !vtkPrs->IsNull() ) {
if ( mode == 0 )
aView->ChangeRepresentationToWireframe( vtkPrs->GetObjects() );
#include "SALOME_ListIO.hxx"
#include "SALOME_ListIteratorOfListIO.hxx"
-#include "VTKViewer_ViewModel.h"
-#include "OCCViewer_ViewModel.h"
-#include "OCCViewer_ViewWindow.h"
-
-#include "SVTK_ViewWindow.h"
-#include "SVTK_View.h"
-
-#include "SUIT_ViewManager.h"
-#include "SUIT_Application.h"
-#include "SUIT_Desktop.h"
-#include "SUIT_ResourceMgr.h"
-#include "SUIT_Session.h"
-#include "SUIT_OverrideCursor.h"
-#include "SUIT_MessageBox.h"
-
-#include "SalomeApp_Application.h"
-#include "SalomeApp_SelectionMgr.h"
-#include "SalomeApp_Study.h"
-#include "SalomeApp_Module.h"
+#include <SVTK_ViewModel.h>
+#include <SVTK_ViewWindow.h>
+#include <SVTK_View.h>
+
+#include <OCCViewer_ViewModel.h>
+#include <OCCViewer_ViewWindow.h>
+
+#include <SUIT_ViewManager.h>
+#include <SUIT_Application.h>
+#include <SUIT_Desktop.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+#include <SUIT_OverrideCursor.h>
+#include <SUIT_MessageBox.h>
+
+#include <SalomeApp_Application.h>
+#include <LightApp_SelectionMgr.h>
+#include <SalomeApp_Study.h>
+#include <SalomeApp_Module.h>
#include "SALOMEDSClient.hxx"
if( aDialogColor.isValid() )
{
QString type = desk->activeWindow()->getViewManager()->getType();
- if( type != OCCViewer_Viewer::Type() && type != VTKViewer_Viewer::Type() )
+ if( type != OCCViewer_Viewer::Type() && type != SVTK_Viewer::Type() )
MESSAGE("Settings Color is not supported for current Viewer");
resMgr->setValue( "Geometry", "SettingsShadingColor", aDialogColor );
SALOME_ListIO selected;
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
if ( app ) {
- SalomeApp_SelectionMgr* aSelMgr = app->selectionMgr();
+ LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
if ( aSelMgr && appStudy ) {
aSelMgr->selectedObjects( selected );
SALOME_ListIO selected;
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
if ( app ) {
- SalomeApp_SelectionMgr* aSelMgr = app->selectionMgr();
+ LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
if ( aSelMgr ) {
aSelMgr->selectedObjects( selected );
if ( !selected.IsEmpty() ) {
SUIT_ViewWindow* window = app->desktop()->activeWindow();
bool isOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
- bool isVTK = ( window && window->getViewManager()->getType() == VTKViewer_Viewer::Type() );
+ bool isVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
if ( isVTK ) {
SVTK_ViewWindow* vtkVW = dynamic_cast<SVTK_ViewWindow*>( window );
if ( !vtkVW )
#include "SALOME_ListIO.hxx"
#include "SALOME_ListIteratorOfListIO.hxx"
-#include "VTKViewer_ViewModel.h"
-#include "OCCViewer_ViewModel.h"
-#include "OCCViewer_ViewWindow.h"
+#include <SVTK_ViewModel.h>
+#include <SVTK_ViewWindow.h>
+#include <SVTK_View.h>
-#include "SVTK_ViewWindow.h"
-#include "SVTK_View.h"
+#include <OCCViewer_ViewModel.h>
+#include <OCCViewer_ViewWindow.h>
-#include "SUIT_ViewManager.h"
-#include "SUIT_Application.h"
-#include "SUIT_Desktop.h"
-#include "SUIT_ResourceMgr.h"
-#include "SUIT_Session.h"
-#include "SUIT_OverrideCursor.h"
+#include <SUIT_ViewManager.h>
+#include <SUIT_Application.h>
+#include <SUIT_Desktop.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+#include <SUIT_OverrideCursor.h>
-#include "SalomeApp_Application.h"
-#include "SalomeApp_SelectionMgr.h"
+#include <SalomeApp_Application.h>
+#include <LightApp_SelectionMgr.h>
#include <qframe.h>
#include <qlabel.h>
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
if ( !app )
return;
- SalomeApp_SelectionMgr* aSelMgr = app->selectionMgr();
+ LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
if ( !aSelMgr )
return;
SALOME_ListIO selected;
SUIT_ViewWindow* window = app->desktop()->activeWindow();
bool isOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
- bool isVTK = ( window && window->getViewManager()->getType() == VTKViewer_Viewer::Type() );
+ bool isVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
if ( isVTK ) {
SVTK_ViewWindow* vtkVW = dynamic_cast<SVTK_ViewWindow*>( window );