mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-03-24 10:47:55 +05:00
Adjust to HEAD modifications
This commit is contained in:
parent
369e0bc8cb
commit
cced5d27a9
@ -30,28 +30,29 @@
|
||||
#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>
|
||||
|
||||
@ -98,23 +99,30 @@ DisplayGUI::~DisplayGUI()
|
||||
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;
|
||||
}
|
||||
@ -130,6 +138,7 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
|
||||
}
|
||||
case 216: // MENU VIEW - DISPLAY
|
||||
{
|
||||
getGeometryGUI()->EmitSignalDeactivateDialog();
|
||||
myDisplayGUI->Display();
|
||||
break;
|
||||
}
|
||||
@ -149,6 +158,7 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
|
||||
break;
|
||||
}
|
||||
}
|
||||
Sel->setSelectedObjects( selected );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -198,7 +208,7 @@ void DisplayGUI::EraseAll()
|
||||
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();
|
||||
}
|
||||
}
|
||||
@ -230,7 +240,7 @@ void DisplayGUI::Display()
|
||||
if ( !anActiveStudy ) return;
|
||||
|
||||
//get SalomeApp selection manager
|
||||
SalomeApp_SelectionMgr* aSelMgr = app->selectionMgr();
|
||||
LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
|
||||
if ( !aSelMgr ) return;
|
||||
|
||||
SALOME_ListIO aList;
|
||||
@ -286,7 +296,7 @@ void DisplayGUI::Erase()
|
||||
if ( !anActiveStudy ) return;
|
||||
|
||||
//get SalomeApp selection manager
|
||||
SalomeApp_SelectionMgr* aSelMgr = app->selectionMgr();
|
||||
LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
|
||||
if ( !aSelMgr ) return;
|
||||
|
||||
SALOME_ListIO aList;
|
||||
@ -337,7 +347,7 @@ void DisplayGUI::SetDisplayMode( const int mode, SUIT_ViewWindow* viewWindow )
|
||||
|
||||
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 );
|
||||
}
|
||||
@ -373,7 +383,7 @@ int DisplayGUI::GetDisplayMode( SUIT_ViewWindow* viewWindow )
|
||||
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();
|
||||
}
|
||||
@ -409,14 +419,14 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
|
||||
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();
|
||||
|
||||
@ -424,8 +434,8 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
|
||||
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() );
|
||||
|
@ -41,25 +41,25 @@
|
||||
#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_MessageBox.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 <SalomeApp_Application.h>
|
||||
#include <LightApp_SelectionMgr.h>
|
||||
#include <SalomeApp_Study.h>
|
||||
#include <SalomeApp_Module.h>
|
||||
|
||||
#include "SALOMEDSClient.hxx"
|
||||
|
||||
@ -100,7 +100,7 @@ void GEOMToolsGUI::OnSettingsColor()
|
||||
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 );
|
||||
@ -170,7 +170,7 @@ void GEOMToolsGUI::OnRename()
|
||||
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 );
|
||||
@ -225,13 +225,13 @@ void GEOMToolsGUI::OnColor()
|
||||
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 )
|
||||
|
@ -33,22 +33,22 @@
|
||||
#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>
|
||||
@ -185,7 +185,7 @@ void GEOMToolsGUI_TransparencyDlg::ValueHasChanged( int newValue )
|
||||
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;
|
||||
@ -199,7 +199,7 @@ void GEOMToolsGUI_TransparencyDlg::ValueHasChanged( int newValue )
|
||||
|
||||
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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user