#include "LightApp_Preferences.h"
#include "LightApp_Displayer.h"
-#include "SALOMEDS_IParameters.hxx"
+#include "SALOMEDSClient_ClientFactory.hxx"
+#include "SALOMEDSClient_IParameters.hxx"
#include "VVTK_ViewManager.h"
#include "VVTK_ViewWindow.h"
return;
_PTR(Study) studyDS = study->studyDS();
_PTR(AttributeParameter) ap = studyDS->GetModuleParameters("Interface Applicative", moduleName().latin1(), savePoint);
- SALOMEDS_IParameters ip(ap);
+ _PTR(IParameters) ip = ClientFactory::getIParameters(ap);
// viewers counters are used for storing view_numbers in IParameters
int svtkViewers( 0 ), vvtkViewers( 0 ), plotViewers( 0 );
// saving VVTK viewer parameters. VVTK (Gauss Viewers) are NOT created by SalomeApp since
// VVTK is declared in VISU, so here we store VVTK view window parameters.
// VisuGUI_Module::restoreVisualParameters() creates VVTK_Views and restores its parameters.
- ip.setProperty( "ActiveGaussViewer", "-1" );
+ ip->setProperty( "ActiveGaussViewer", "-1" );
getApp()->viewManagers( VVTK_Viewer::Type(), lst );
for ( QPtrListIterator<SUIT_ViewManager> it( lst ); it.current(); ++it ) {
SUIT_ViewManager* vman = it.current();
// gauss viewer parameters are retrieved using this "entry" string.
// name of parameter = caption of gauss ViewWindow
// value of parameter = ViewWindow's visual parameters
- ip.setParameter( "GaussViewer", vwin->caption().latin1(), vwin->getVisualParameters().latin1() );
+ ip->setParameter( "GaussViewer", vwin->caption().latin1(), vwin->getVisualParameters().latin1() );
if ( application()->desktop()->activeWindow() == vwin )
- ip.setProperty( "ActiveGaussViewer", QString::number( vvtkViewers ).latin1() );
+ ip->setProperty( "ActiveGaussViewer", QString::number( vvtkViewers ).latin1() );
vvtkViewers++;
}
}
/*
lst.clear();
getApp()->viewManagers( SVTK_Viewer::Type(), lst );
- ip.setProperty( "VtkViewersCount", QString::number( lst.count() ).latin1() );
+ ip->setProperty( "VtkViewersCount", QString::number( lst.count() ).latin1() );
*/
// main cycle to store parameters of displayed objects
Handle(SALOME_InteractiveObject) io = vActor->getIO();
// entry is "ecoded" = it does NOT contain component adress, since it is a
// subject to change on next component loading
- std::string entry = ip.encodeEntry( io->getEntry(), componentName );
+ std::string entry = ip->encodeEntry( io->getEntry(), componentName );
std::string param, vtkParam = vType.latin1(); vtkParam += gSeparator;
vtkParam += QString::number( *viewsCounter ).latin1(); vtkParam += gSeparator;
param = vtkParam + "Visibility";
- ip.setParameter( entry, param, "On" );
+ ip->setParameter( entry, param, "On" );
param = vtkParam + "Name";
- ip.setParameter( entry, param, vActor->getName() );
+ ip->setParameter( entry, param, vActor->getName() );
param = vtkParam + "RepresentationMode";
- ip.setParameter( entry, param, QString::number( vActor->GetRepresentation() ).latin1() );
+ ip->setParameter( entry, param, QString::number( vActor->GetRepresentation() ).latin1() );
param = vtkParam + "Opacity";
- ip.setParameter( entry, param, QString::number( vActor->GetOpacity() ).latin1() );
+ ip->setParameter( entry, param, QString::number( vActor->GetOpacity() ).latin1() );
float r, g, b;
vActor->GetColor(r, g, b);
QString colorStr = QString::number( r ); colorStr += gDigitsSep;
colorStr += QString::number( g ); colorStr += gDigitsSep;
colorStr += QString::number( b );
param = vtkParam + "Color";
- ip.setParameter( entry, param, colorStr.latin1() );
+ ip->setParameter( entry, param, colorStr.latin1() );
param = vtkParam + "LineWidth";
- ip.setParameter( entry, param, QString::number( vActor->GetLineWidth() ).latin1() );
+ ip->setParameter( entry, param, QString::number( vActor->GetLineWidth() ).latin1() );
if ( vActor->IsShrunkable() && vActor->IsShrunk() ) {
param = vtkParam + "ShrinkMode";
- ip.setParameter( entry, param, "On" );
+ ip->setParameter( entry, param, "On" );
param = vtkParam + "ShrinkFactor";
- ip.setParameter( entry, param, QString::number( vActor->GetShrinkFactor() ).latin1() );
+ ip->setParameter( entry, param, QString::number( vActor->GetShrinkFactor() ).latin1() );
}
VISU_ScalarMapAct* scalarMapActor = dynamic_cast<VISU_ScalarMapAct*>( vActor );
if ( scalarMapActor && scalarMapActor->IsShading() ) {
param = vtkParam + "Shading";
- ip.setParameter( entry, param, "On" );
+ ip->setParameter( entry, param, "On" );
}
if ( const VISU::Prs3d_i* vPrs = vActor->GetPrs3d() ) {
param = vtkParam + "ClippingPlane_";
planeValue += QString::number( origin[1] ).latin1(); planeValue += gDigitsSep;
planeValue += QString::number( origin[2] ).latin1();
param += QString::number( p+1 ).latin1();
- ip.setParameter( entry, param, planeValue );
+ ip->setParameter( entry, param, planeValue );
}
}
Handle(SALOME_InteractiveObject) io = sCurve->getIO();
// entry is "ecoded" = it does NOT contain component adress, since it is a
// subject to change on next component loading
- std::string entry = ip.encodeEntry( io->getEntry(), componentName );
+ std::string entry = ip->encodeEntry( io->getEntry(), componentName );
std::string param, plotParam = vType.latin1(); plotParam += gSeparator;
plotParam += QString::number( *viewsCounter ).latin1(); plotParam += gSeparator;
param = plotParam + "Visibility";
- ip.setParameter( entry, param, "On" );
+ ip->setParameter( entry, param, "On" );
}
}
} // for curves
return;
_PTR(Study) studyDS = study->studyDS();
_PTR(AttributeParameter) ap = studyDS->GetModuleParameters("Interface Applicative", moduleName().latin1(), savePoint);
- SALOMEDS_IParameters ip(ap);
+ _PTR(IParameters) ip = ClientFactory::getIParameters(ap);
// actors are stored in a map after displaying of them for quicker access in future
QMap<QString, QMap<QString, VISU_Actor*> > vtkActors; // map: entry to map: ViewType_<ID> to actor (SVTK/VVTK)
- std::vector<std::string> entries = ip.getEntries();
+ std::vector<std::string> entries = ip->getEntries();
for ( std::vector<std::string>::iterator entIt = entries.begin(); entIt != entries.end(); ++entIt ) {
- std::vector<std::string> paramNames = ip.getAllParameterNames( *entIt );
- std::vector<std::string> paramValues = ip.getAllParameterValues( *entIt );
+ std::vector<std::string> paramNames = ip->getAllParameterNames( *entIt );
+ std::vector<std::string> paramValues = ip->getAllParameterValues( *entIt );
std::vector<std::string>::iterator namesIt = paramNames.begin();
std::vector<std::string>::iterator valuesIt = paramValues.begin();
}
// entry is a normal entry - it should be "decoded" (setting base adress of component)
- QString entry( ip.decodeEntry( *entIt ).c_str() );
+ QString entry( ip->decodeEntry( *entIt ).c_str() );
for ( ; namesIt != paramNames.end(); ++namesIt, ++valuesIt ) {
std::string viewerType = ::getParam( *namesIt, ViewerType );
// parameters: it no SVTK view was saved, we need NOT any SVTK on restore. Here we close one
// default SVTK if needed.
/*
- QString openedSvtkViewerStr = ip.getProperty( "VtkViewersCount" ).c_str();
+ QString openedSvtkViewerStr = ip->getProperty( "VtkViewersCount" ).c_str();
int openedSvtkViewer = openedSvtkViewerStr.toInt( &ok );
if ( ok && openedSvtkViewer == 0 ) {
lst.clear();
// if active Gauss Viewer is set ( != -1) then raise the gauss view window.
bool ok;
- QString activeGaussViewerStr = ip.getProperty( "ActiveGaussViewer" ).c_str();
+ QString activeGaussViewerStr = ip->getProperty( "ActiveGaussViewer" ).c_str();
int activeGaussViewer = activeGaussViewerStr.toInt( &ok );
if ( ok && activeGaussViewer != -1 ) {
lst.clear();