1. Prs3d::CreateActor need not SALOME Interactive Object as its input parameter.
2. Prs3d and its descendants can be created without passing Result_i* as input parameter.
3. RemovableObject_i::SetName will take one addtional argument which says wether to modify the corresponding name in the SALOMEDS.Study or not
VISU::Curve_i* curve =
dynamic_cast<VISU::Curve_i*>(VISU::GetServant(aCurve).in());
if (curve)
- curve->SetName(Name.latin1());
+ curve->SetName(Name.latin1(), true);
}
break;
}
VISU::Table_i* table =
dynamic_cast<VISU::Table_i*>(VISU::GetServant(aTable).in());
if (table)
- table->SetName(Name.latin1());
+ table->SetName(Name.latin1(), true);
}
break;
}
VISU::Container_i* container =
dynamic_cast<VISU::Container_i*>(VISU::GetServant(aContainer).in());
if (container)
- container->SetName(Name.latin1());
+ container->SetName(Name.latin1(), true);
}
break;
}
aAnimationDlg->show();
}
+//----------------------------------------------------------------------------
+template<unsigned int colored_prs3d_type_enum>
+void
+DoSameAs(VISU::Prs3d_i* thePrs3d)
+{
+ typedef typename TL::TColoredEnum2Type<colored_prs3d_type_enum>::TResult TColoredPrs3d;
+ TColoredPrs3d* aColoredPrs3d = dynamic_cast<TColoredPrs3d*>(thePrs3d);
+ TColoredPrs3d* aSameColoredPrs3d = new TColoredPrs3d(VISU::ColoredPrs3d_i::EPublishUnderTimeStamp);
+ aSameColoredPrs3d->SameAs(aColoredPrs3d);
+}
+
+//----------------------------------------------------------------------------
void
VisuGUI::
OnCopyPresentation()
switch (aPrsObject->GetType()) {
case VISU::TMESH:
{
- VISU::Mesh_i* aMeshPrs = dynamic_cast<VISU::Mesh_i*>(aPrsObject);
- VISU::Mesh_i* aSameMesh = new VISU::Mesh_i(aMeshPrs->GetCResult());
- aSameMesh->SameAs(aMeshPrs);
+ VISU::Mesh_i* aPrs = dynamic_cast<VISU::Mesh_i*>(aPrsObject);
+ VISU::Mesh_i* aSamePrs = new VISU::Mesh_i(aPrs->GetCResult());
+ aSamePrs->SameAs(aPrs);
}
break;
case VISU::TSCALARMAP:
- {
- VISU::ScalarMap_i* aScalarPrs = dynamic_cast<VISU::ScalarMap_i*>(aPrsObject);
- VISU::ScalarMap_i* aSameScalar = new VISU::ScalarMap_i(aScalarPrs->GetCResult());
- aSameScalar->SameAs(aScalarPrs);
- }
+ DoSameAs<VISU::TSCALARMAP>(aPrsObject);
break;
case VISU::TDEFORMEDSHAPE:
- {
- VISU::DeformedShape_i* aDefPrs = dynamic_cast<VISU::DeformedShape_i*>(aPrsObject);
- VISU::DeformedShape_i* aSameDeformed = new VISU::DeformedShape_i(aDefPrs->GetCResult());
- aSameDeformed->SameAs(aDefPrs);
- }
+ DoSameAs<VISU::TDEFORMEDSHAPE>(aPrsObject);
break;
case VISU::TSCALARMAPONDEFORMEDSHAPE:
- {
- VISU::ScalarMapOnDeformedShape_i* aDefPrs =
- dynamic_cast<VISU::ScalarMapOnDeformedShape_i*>(aPrsObject);
- VISU::ScalarMapOnDeformedShape_i* aSameScalarMapOnDeformed =
- new VISU::ScalarMapOnDeformedShape_i(aDefPrs->GetCResult());
- aSameScalarMapOnDeformed->SameAs(aDefPrs);
- }
+ DoSameAs<VISU::TSCALARMAPONDEFORMEDSHAPE>(aPrsObject);
break;
case VISU::TCUTPLANES:
- {
- VISU::CutPlanes_i* aCutPrs = dynamic_cast<VISU::CutPlanes_i*>(aPrsObject);
- VISU::CutPlanes_i* aSameCut = new VISU::CutPlanes_i(aCutPrs->GetCResult());
- aSameCut->SameAs(aCutPrs);
- }
+ DoSameAs<VISU::TCUTPLANES>(aPrsObject);
break;
case VISU::TCUTLINES:
- {
- VISU::CutLines_i* aCutPrs = dynamic_cast<VISU::CutLines_i*>(aPrsObject);
- VISU::CutLines_i* aSameCut = new VISU::CutLines_i(aCutPrs->GetCResult());
- aSameCut->SameAs(aCutPrs);
- }
+ DoSameAs<VISU::TCUTLINES>(aPrsObject);
break;
case VISU::TISOSURFACE:
- {
- VISU::IsoSurfaces_i* aIsoPrs = dynamic_cast<VISU::IsoSurfaces_i*>(aPrsObject);
- VISU::IsoSurfaces_i* aSameIso = new VISU::IsoSurfaces_i(aIsoPrs->GetCResult());
- aSameIso->SameAs(aIsoPrs);
- }
+ DoSameAs<VISU::TISOSURFACE>(aPrsObject);
break;
case VISU::TSTREAMLINES:
- {
- VISU::StreamLines_i* aLinesPrs = dynamic_cast<VISU::StreamLines_i*>(aPrsObject);
- VISU::StreamLines_i* aSameLines = new VISU::StreamLines_i(aLinesPrs->GetCResult());
- aSameLines->SameAs(aLinesPrs);
- }
+ DoSameAs<VISU::TSTREAMLINES>(aPrsObject);
break;
case VISU::TVECTORS:
- {
- VISU::Vectors_i* aVectorsPrs = dynamic_cast<VISU::Vectors_i*>(aPrsObject);
- VISU::Vectors_i* aSameVectors = new VISU::Vectors_i(aVectorsPrs->GetCResult());
- aSameVectors->SameAs(aVectorsPrs);
- }
+ DoSameAs<VISU::TVECTORS>(aPrsObject);
break;
case VISU::TPLOT3D:
- {
- VISU::Plot3D_i* aPlot3DPrs = dynamic_cast<VISU::Plot3D_i*>(aPrsObject);
- VISU::Plot3D_i* aSamePlot3D = new VISU::Plot3D_i(aPlot3DPrs->GetCResult());
- aSamePlot3D->SameAs(aPlot3DPrs);
- }
+ DoSameAs<VISU::TPLOT3D>(aPrsObject);
break;
}
UpdateObjBrowser(this);
setOrientation2(thePrs->GetOrientationType2());
hasInit = true;
- myCutLines = new VISU::CutLines_i(thePrs->GetCResult(),
- VISU::ColoredPrs3d_i::EDoNotPublish);
+ myCutLines = new VISU::CutLines_i(VISU::ColoredPrs3d_i::EDoNotPublish);
myCutLines->SameAs(thePrs);
myCutLines->CopyCurvesInverted(thePrs->GetCurvesInverted());
if (myCutLines->IsAllCurvesInverted()) myAllCurvesInvertedCheck->setChecked(true);
myPosSpn->setValue(thePrs->GetDisplacement());
hasInit = true;
// init table
- myCutPlanes = new VISU::CutPlanes_i(thePrs->GetCResult(),
- VISU::ColoredPrs3d_i::EDoNotPublish);
+ myCutPlanes = new VISU::CutPlanes_i(VISU::ColoredPrs3d_i::EDoNotPublish);
myCutPlanes->SameAs(thePrs);
DrawTable();
VISU_CutLines_i.cc \
VISU_Vectors_i.cc \
VISU_StreamLines_i.cc \
+ VISU_ScalarMapOnDeformedShape_i.cc \
+ VISU_ColoredPrs3dHolder_i.cc \
+ VISU_ColoredPrs3dCache_i.cc \
+ VISU_ColoredPrs3dFactory.cc \
VISU_Mesh_i.cc \
- VISU_Table_i.cc \
- VISU_Gen_i.cc \
VISU_ViewManager_i.cc \
- VISU_View_i.cc \
VISU_TimeAnimation.cxx \
+ VISU_View_i.cc \
+ VISU_Table_i.cc \
+ VISU_Gen_i.cc \
VISU_CorbaMedConvertor.cxx \
- VISU_DumpPython.cc \
- VISU_ScalarMapOnDeformedShape_i.cc \
- VISU_ColoredPrs3dHolder_i.cc \
- VISU_ColoredPrs3dCache_i.cc \
- VISU_ColoredPrs3dFactory.cc
+ VISU_DumpPython.cc
LIB_MOC = \
VISU_TimeAnimation.h
if(MYDEBUG) MESSAGE("ColoredPrs3dCache_i::ColoredPrs3dCache_i - this = "<<this);
SetStudyDocument(theStudy);
- SetName(GetFolderName());
+ SetName(GetFolderName(), false);
CORBA::String_var anIOR = GetID();
SALOMEDS::SComponent_var aSComponent = VISU::FindOrCreateVisuComponent(theStudy);
CORBA::String_var aFatherEntry = aSComponent->GetID();
VISU::ColoredPrs3dHolder::BasicInput theInput,
VISU::ColoredPrs3dHolder_i* theHolder)
{
- VISU::ColoredPrs3d_i* aPrs3d = VISU::CreatePrs3d_i(theType, GetStudyDocument());
+ VISU::ColoredPrs3d_i* aPrs3d = VISU::CreatePrs3d_i(theType, GetStudyDocument(), ColoredPrs3d_i::ERegisterInCache);
aPrs3d->SetHolderEntry( theHolder->GetEntry() );
aPrs3d->SetResultObject( theInput.myResult );
aPrs3d->SetMeshName( theInput.myMeshName );
//----------------------------------------------------------------------------
bool
CreatColoredPrs3d(ColoredPrs3d_i* theColoredPrs3d,
+ Result_i* theResult,
const std::string& theMeshName,
VISU::Entity theEntity,
const std::string& theFieldName,
try{
#endif
#endif
- if(theColoredPrs3d->Create(theMeshName, theEntity, theFieldName, theIteration))
+ theColoredPrs3d->SetCResult(theResult);
+ theColoredPrs3d->SetMeshName(theMeshName.c_str());
+ theColoredPrs3d->SetEntity(theEntity);
+ theColoredPrs3d->SetFieldName(theFieldName.c_str());
+ theColoredPrs3d->SetTimeStampNumber(theIteration);
+ if(theColoredPrs3d->Apply())
return true;
#ifndef _DEXCEPT_
#ifdef NO_CAS_CATCH
//----------------------------------------------------------------------------
VISU::ColoredPrs3d_i*
CreatePrs3d_i(VISUType theType,
- SALOMEDS::Study_ptr theStudy)
+ SALOMEDS::Study_ptr theStudy,
+ ColoredPrs3d_i::EPublishInStudyMode thePublishInStudyMode)
{
switch(theType){
case TSCALARMAP:
- return VISU::CreatePrs3dByEnum<TSCALARMAP>(theStudy);
+ return VISU::CreatePrs3dByEnum<TSCALARMAP>(theStudy, thePublishInStudyMode);
case TGAUSSPOINTS:
- return VISU::CreatePrs3dByEnum<TGAUSSPOINTS>(theStudy);
+ return VISU::CreatePrs3dByEnum<TGAUSSPOINTS>(theStudy, thePublishInStudyMode);
case TDEFORMEDSHAPE:
- return VISU::CreatePrs3dByEnum<TDEFORMEDSHAPE>(theStudy);
+ return VISU::CreatePrs3dByEnum<TDEFORMEDSHAPE>(theStudy, thePublishInStudyMode);
case TSCALARMAPONDEFORMEDSHAPE:
- return VISU::CreatePrs3dByEnum<TSCALARMAPONDEFORMEDSHAPE>(theStudy);
+ return VISU::CreatePrs3dByEnum<TSCALARMAPONDEFORMEDSHAPE>(theStudy, thePublishInStudyMode);
case TISOSURFACE:
- return VISU::CreatePrs3dByEnum<TISOSURFACE>(theStudy);
+ return VISU::CreatePrs3dByEnum<TISOSURFACE>(theStudy, thePublishInStudyMode);
case TSTREAMLINES:
- return VISU::CreatePrs3dByEnum<TSTREAMLINES>(theStudy);
+ return VISU::CreatePrs3dByEnum<TSTREAMLINES>(theStudy, thePublishInStudyMode);
case TPLOT3D:
- return VISU::CreatePrs3dByEnum<TPLOT3D>(theStudy);
+ return VISU::CreatePrs3dByEnum<TPLOT3D>(theStudy, thePublishInStudyMode);
case TCUTPLANES:
- return VISU::CreatePrs3dByEnum<TCUTPLANES>(theStudy);
+ return VISU::CreatePrs3dByEnum<TCUTPLANES>(theStudy, thePublishInStudyMode);
case TCUTLINES:
- return VISU::CreatePrs3dByEnum<TCUTLINES>(theStudy);
+ return VISU::CreatePrs3dByEnum<TCUTLINES>(theStudy, thePublishInStudyMode);
case TVECTORS:
- return VISU::CreatePrs3dByEnum<TVECTORS>(theStudy);
+ return VISU::CreatePrs3dByEnum<TVECTORS>(theStudy, thePublishInStudyMode);
}
return NULL;
}
//----------------------------------------------------------------------------
template<typename TPrs3d_i>
ColoredPrs3d_i*
- CreatePrs3dByType(SALOMEDS::Study_ptr theStudy)
+ CreatePrs3dByType(SALOMEDS::Study_ptr theStudy,
+ ColoredPrs3d_i::EPublishInStudyMode thePublishInStudyMode)
{
if(!theStudy->GetProperties()->IsLocked()){
typedef typename TPrs3d_i::TInterface TPrs3d;
- if(TPrs3d_i* aPresent = new TPrs3d_i(NULL,ColoredPrs3d_i::EPublishIndependently)){
+ if(TPrs3d_i* aPresent = new TPrs3d_i(thePublishInStudyMode)){
return aPresent;
}
}
//----------------------------------------------------------------------------
template<unsigned int type_enum>
ColoredPrs3d_i*
- CreatePrs3dByEnum(SALOMEDS::Study_ptr theStudy)
+ CreatePrs3dByEnum(SALOMEDS::Study_ptr theStudy,
+ ColoredPrs3d_i::EPublishInStudyMode thePublishInStudyMode)
{
typedef typename TL::TColoredEnum2Type<type_enum>::TResult TColoredPrs3d;
- return CreatePrs3dByType<TColoredPrs3d>(theStudy);
+ return CreatePrs3dByType<TColoredPrs3d>(theStudy,
+ thePublishInStudyMode);
};
//----------------------------------------------------------------------------
ColoredPrs3d_i*
CreatePrs3d_i(VISUType theType,
- SALOMEDS::Study_ptr theStudy);
+ SALOMEDS::Study_ptr theStudy,
+ ColoredPrs3d_i::EPublishInStudyMode thePublishInStudyMode);
//----------------------------------------------------------------------------
bool
CreatColoredPrs3d(ColoredPrs3d_i* theColoredPrs3d,
+ Result_i* theResult,
const std::string& theMeshName,
VISU::Entity theEntity,
const std::string& theFieldName,
return NULL;
if(TPrs3d_i::IsPossible(aResult, theMeshName, theEntity, theFieldName, theIteration)){
- TPrs3d_i* aPresent = new TPrs3d_i(aResult);
+ TPrs3d_i* aPresent = new TPrs3d_i(ColoredPrs3d_i::EPublishUnderTimeStamp);
- if(CreatColoredPrs3d(aPresent, theMeshName, theEntity, theFieldName, theIteration))
+ if(CreatColoredPrs3d(aPresent, aResult, theMeshName, theEntity, theFieldName, theIteration))
return aPresent;
aPresent->_remove_ref();
default: break;
}
- SetName(GenerateName().latin1());
+ SetName(GenerateName().latin1(), false);
CORBA::String_var anIOR = GetID();
std::string aFatherEntry = theCache.GetEntry();
QString aComment = QString("myComment=") + aType;
//============================================================================
VISU::ColoredPrs3d_i::
-ColoredPrs3d_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode) :
+ColoredPrs3d_i(EPublishInStudyMode thePublishInStudyMode) :
PrsObject_i(SALOMEDS::Study::_nil()),
- Prs3d_i(theResult),
+ Prs3d_i(),
myPublishInStudyMode(thePublishInStudyMode),
myIsTimeStampFixed(thePublishInStudyMode == EPublishUnderTimeStamp),
myScalarMapPL(NULL),
if(const ColoredPrs3d_i* aPrs3d = dynamic_cast<const ColoredPrs3d_i*>(theOrigin)){
ColoredPrs3d_i* anOrigin = const_cast<ColoredPrs3d_i*>(aPrs3d);
+ SetCResult(anOrigin->GetCResult());
SetMeshName(anOrigin->GetCMeshName().c_str());
SetEntity(anOrigin->GetEntity());
SetFieldName(anOrigin->GetCFieldName().c_str());
VISU::ColoredPrs3d_i
::SameAsParams(const ColoredPrs3d_i* theOrigin)
{
- int aTimeStampNumber = GetTimeStampNumber();
+ CORBA::Long aTimeStampNumber = GetTimeStampNumber();
SameAs(theOrigin);
SetTimeStampNumber(aTimeStampNumber);
OnSetInput();
if(MYDEBUG)
MESSAGE("ColoredPrs3d_i::Build - "<<myFieldName<<"; theBuildMode = "<<theBuildMode);
SALOMEDS::StudyBuilder_var aStudyBuilder = GetStudyDocument()->NewBuilder();
- if(myPublishInStudyMode != EDoNotPublish)
+ bool anIsPublishInStudy = (myPublishInStudyMode == EPublishUnderTimeStamp || myPublishInStudyMode == EPublishIndependently);
+ if(anIsPublishInStudy)
aStudyBuilder->NewCommand(); // There is a transaction
#ifndef _DEXCEPT_
try{
#endif
QString aComment;
- SetName("NoName");
+ SetName("NoName", false);
if(theBuildMode == ECreateNew || theBuildMode == ESameAs){
if(!IsRangeFixed())
SetSourceRange();
SetTitle(GetCFieldName().c_str());
}
if(myPublishInStudyMode == EPublishUnderTimeStamp){
- SetName(GenerateName().latin1());
+ SetName(GenerateName().latin1(), false);
aComment.sprintf("myComment=TIMESTAMP;myType=%d;myMeshName=%s;myEntityId=%d;myFieldName=%s;myTimeStampId=%d;myNumComponent=%d",
VISU::TTIMESTAMP,
GetCMeshName().c_str(),
true);
SetSObject(GetStudyDocument()->FindObjectIOR(anIOR));
}else if(myPublishInStudyMode == EPublishIndependently){
- SetName(GenerateName().latin1());
+ SetName(GenerateName().latin1(), false);
CORBA::String_var anIOR = GetID();
std::string aFatherEntry = VISU::FindOrCreate3DPresentationsFolder(GetStudyDocument());
aComment.sprintf("myComment=%s",
throw;
}
#endif
- if(myPublishInStudyMode != EDoNotPublish)
+ if(anIsPublishInStudy)
aStudyBuilder->CommitCommand();
return this;
}
/*!
The enumeration allow to define what mode should be used for the presentation building.
*/
- enum EPublishInStudyMode {EPublishUnderTimeStamp, EPublishIndependently, EDoNotPublish};
+ enum EPublishInStudyMode {EPublishUnderTimeStamp, EPublishIndependently, ERegisterInCache, EDoNotPublish};
explicit
- ColoredPrs3d_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+ ColoredPrs3d_i(EPublishInStudyMode thePublishInStudyMode);
explicit
ColoredPrs3d_i(Result_i* theResult,
SALOMEDS::SObject_var theSObject);
//---------------------------------------------------------------
VISU::CutLines_i::
-CutLines_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode) :
+CutLines_i(EPublishInStudyMode thePublishInStudyMode) :
PrsObject_i(SALOMEDS::Study::_nil()),
- Prs3d_i(theResult),
- ColoredPrs3d_i(theResult,thePublishInStudyMode),
- ScalarMap_i(theResult,thePublishInStudyMode),
+ Prs3d_i(),
+ ColoredPrs3d_i(thePublishInStudyMode),
+ ScalarMap_i(thePublishInStudyMode),
myCutLinesPL(NULL)
{}
//---------------------------------------------------------------
VISU_Actor*
VISU::CutLines_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor()
{
- if(VISU_Actor* anActor = TSuperClass::CreateActor(theIO)){
+ if(VISU_Actor* anActor = TSuperClass::CreateActor()){
anActor->SetVTKMapping(true);
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
int aDispMode = aResourceMgr->integerValue("VISU" , "cut_lines_represent", 2);
typedef ScalarMap_i TSuperClass;
explicit
- CutLines_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+ CutLines_i(EPublishInStudyMode thePublishInStudyModep);
explicit
CutLines_i(Result_i* theResult,
SALOMEDS::SObject_var theSObject);
//! Extends VISU_ColoredPrs3d_i::CreateActor
virtual
VISU_Actor*
- CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+ CreateActor();
void BuildTableOfReal(SALOMEDS::SObject_var theSObject);
//----------------------------------------------------------------------------
VISU::CutPlanes_i
-::CutPlanes_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode):
+::CutPlanes_i(EPublishInStudyMode thePublishInStudyMode):
PrsObject_i(SALOMEDS::Study::_nil()),
- Prs3d_i(theResult),
- ColoredPrs3d_i(theResult,thePublishInStudyMode),
- ScalarMap_i(theResult,thePublishInStudyMode),
+ Prs3d_i(),
+ ColoredPrs3d_i(thePublishInStudyMode),
+ ScalarMap_i(thePublishInStudyMode),
myCutPlanesPL(NULL)
{}
//----------------------------------------------------------------------------
VISU_Actor*
VISU::CutPlanes_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor()
{
- if(VISU_Actor* anActor = TSuperClass::CreateActor(theIO)){
+ if(VISU_Actor* anActor = TSuperClass::CreateActor()){
anActor->SetVTKMapping(true);
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
int aDispMode = aResourceMgr->integerValue("VISU" , "cut_planes_represent", 1);
typedef ScalarMap_i TSuperClass;
explicit
- CutPlanes_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+ CutPlanes_i(EPublishInStudyMode thePublishInStudyModep);
explicit
CutPlanes_i(Result_i* theResult,
SALOMEDS::SObject_var theSObject);
//! Redefines VISU_ColoredPrs3d_i::CreateActor
virtual
VISU_Actor*
- CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+ CreateActor();
static const std::string myComment;
//---------------------------------------------------------------
VISU::DeformedShape_i
-::DeformedShape_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode):
+::DeformedShape_i(EPublishInStudyMode thePublishInStudyMode):
PrsObject_i(SALOMEDS::Study::_nil()),
- Prs3d_i(theResult),
- ColoredPrs3d_i(theResult,thePublishInStudyMode),
- ScalarMap_i(theResult,thePublishInStudyMode),
+ Prs3d_i(),
+ ColoredPrs3d_i(thePublishInStudyMode),
+ ScalarMap_i(thePublishInStudyMode),
myDeformedShapePL(NULL)
{
if(MYDEBUG) MESSAGE("DeformedShape_i::DeformedShape_i");
//---------------------------------------------------------------
VISU_Actor*
VISU::DeformedShape_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO,
- bool toSupressShrinking)
+::CreateActor(bool toSupressShrinking)
{
- VISU_Actor* anActor = TSuperClass::CreateActor(theIO, true);
+ VISU_Actor* anActor = TSuperClass::CreateActor(true);
anActor->SetVTKMapping(false);
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
int aDispMode = aResourceMgr->integerValue("VISU", "deformed_shape_represent", 1);
//---------------------------------------------------------------
VISU_Actor*
VISU::DeformedShape_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor()
{
- return CreateActor(theIO, false);
+ return CreateActor(false);
}
typedef ScalarMap_i TSuperClass;
explicit
- DeformedShape_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+ DeformedShape_i(EPublishInStudyMode thePublishInStudyModep);
explicit
DeformedShape_i(Result_i* theResult,
SALOMEDS::SObject_var theSObject);
virtual
VISU_Actor*
- CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+ CreateActor();
virtual
VISU_Actor*
- CreateActor(const Handle(SALOME_InteractiveObject)& theIO,
- bool toSupressShrinking);
+ CreateActor(bool toSupressShrinking);
virtual
void
//----------------------------------------------------------------------------
-VISU::GaussPoints_i::
-GaussPoints_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode) :
+VISU::GaussPoints_i
+::GaussPoints_i(EPublishInStudyMode thePublishInStudyMode) :
PrsObject_i(SALOMEDS::Study::_nil()),
- Prs3d_i(theResult),
- ColoredPrs3d_i(theResult,thePublishInStudyMode),
+ Prs3d_i(),
+ ColoredPrs3d_i(thePublishInStudyMode),
myGaussPointsPL(NULL),
myColor(Qt::blue),
myIsActiveLocalScalarBar(true),
//----------------------------------------------------------------------------
-VISU::GaussPoints_i::
-GaussPoints_i(Result_i* theResult,
- SALOMEDS::SObject_var theSObject) :
+VISU::GaussPoints_i
+::GaussPoints_i(Result_i* theResult,
+ SALOMEDS::SObject_var theSObject) :
PrsObject_i(theSObject->GetStudy()),
Prs3d_i(theResult,theSObject),
ColoredPrs3d_i(theResult,theSObject),
//----------------------------------------------------------------------------
bool
VISU::GaussPoints_i
-::OnCreateActor(VISU_GaussPtsAct* theActor,
- const Handle(SALOME_InteractiveObject)& theIO)
+::OnCreateActor(VISU_GaussPtsAct* theActor)
{
try{
- TSuperClass::CreateActor(theActor,theIO);
+ TSuperClass::CreateActor(theActor);
theActor->GetPipeLine()->Delete();
UpdateActor(theActor);
return true;
VISU_GaussPtsAct1*
VISU::GaussPoints_i
-::OnCreateActor1(const Handle(SALOME_InteractiveObject)& theIO)
+::OnCreateActor1()
{
VISU_GaussPtsAct1* anActor = VISU_GaussPtsAct1::New();
- if(OnCreateActor(anActor,theIO))
+ if(OnCreateActor(anActor))
return anActor;
return NULL;
}
VISU_GaussPtsAct2*
VISU::GaussPoints_i
-::OnCreateActor2(const Handle(SALOME_InteractiveObject)& theIO)
+::OnCreateActor2()
{
VISU_GaussPtsAct2* anActor = VISU_GaussPtsAct2::New();
- if(OnCreateActor(anActor,theIO))
+ if(OnCreateActor(anActor))
return anActor;
return NULL;
}
VISU_Actor*
VISU::GaussPoints_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor()
{
- return OnCreateActor1(theIO);
+ return OnCreateActor1();
}
//----------------------------------------------------------------------------
typedef ColoredPrs3d_i TSuperClass;
explicit
- GaussPoints_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+ GaussPoints_i(EPublishInStudyMode thePublishInStudyModep);
explicit
GaussPoints_i(Result_i* theResult,
SALOMEDS::SObject_var theSObject);
GetPL();
bool
- OnCreateActor(VISU_GaussPtsAct* theActor,
- const Handle(SALOME_InteractiveObject)& theIO = NULL);
+ OnCreateActor(VISU_GaussPtsAct* theActor);
VISU_GaussPtsAct1*
- OnCreateActor1(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+ OnCreateActor1();
VISU_GaussPtsAct2*
- OnCreateActor2(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+ OnCreateActor2();
void
UpdateScalarBar(vtkScalarBarActor *theScalarBar,
//----------------------------------------------------------------------------
virtual
VISU_Actor*
- CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+ CreateActor();
virtual
VISU_GaussPtsAct2*
::CreatePrs3d(VISUType theType,
SALOMEDS::Study_ptr theStudy)
{
- if(ColoredPrs3d_i* aPrs3d = VISU::CreatePrs3d_i(theType, theStudy))
+ if(ColoredPrs3d_i* aPrs3d = CreatePrs3d_i(theType, theStudy, ColoredPrs3d_i::EPublishIndependently))
return aPrs3d->_this();
return Prs3d::_nil();
}
//---------------------------------------------------------------
VISU::IsoSurfaces_i
-::IsoSurfaces_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode) :
+::IsoSurfaces_i(EPublishInStudyMode thePublishInStudyMode) :
PrsObject_i(SALOMEDS::Study::_nil()),
- Prs3d_i(theResult),
- ColoredPrs3d_i(theResult,thePublishInStudyMode),
- ScalarMap_i(theResult,thePublishInStudyMode),
+ Prs3d_i(),
+ ColoredPrs3d_i(thePublishInStudyMode),
+ ScalarMap_i(thePublishInStudyMode),
myIsoSurfacesPL(NULL)
{}
//---------------------------------------------------------------
VISU_Actor*
VISU::IsoSurfaces_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor()
{
- if(VISU_Actor* anActor = TSuperClass::CreateActor(theIO)){
+ if(VISU_Actor* anActor = TSuperClass::CreateActor()){
anActor->SetVTKMapping(true);
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
int aDispMode = aResourceMgr->integerValue("VISU" , "iso_surfaces_represent", 2);
typedef ScalarMap_i TSuperClass;
explicit
- IsoSurfaces_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+ IsoSurfaces_i(EPublishInStudyMode thePublishInStudyModep);
explicit
IsoSurfaces_i(Result_i* theResult,
SALOMEDS::SObject_var theSObject);
virtual
VISU_Actor*
- CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+ CreateActor();
virtual
void
//----------------------------------------------------------------------------
VISU::Mesh_i
::Mesh_i(Result_i* theResult,
- SALOMEDS::SObject_ptr theSObject) :
+ SALOMEDS::SObject_ptr theSObject) :
PrsObject_i(theResult->GetStudyDocument()),
Prs3d_i(theResult,theSObject),
myMeshPL(VISU_MeshPL::New())
myPresentType = VISU::PresentationType(VISU::GetResourceMgr()->integerValue("VISU" , "mesh_represent", 2));
if(myEntity == VISU::NODE_ENTITY)
myPresentType = VISU::POINT;
- SetName(GenerateName().latin1());
+ SetName(GenerateName().latin1(), false);
myCellColor.R = 0.0; myCellColor.G = myCellColor.B = 1.0;
myNodeColor.R = myNodeColor.G = 1.0; myNodeColor.B = 1.0;
myLinkColor.R = myLinkColor.G = myLinkColor.B = 83/255.;
VISU_Actor*
VISU::Mesh_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor()
{
VISU_MeshAct* anActor = VISU_MeshAct::New();
try{
- VISU::Prs3d_i::CreateActor(anActor,theIO);
+ VISU::Prs3d_i::CreateActor(anActor);
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
bool toShrink = aResourceMgr->booleanValue("VISU", "mesh_shrink", false);
if (toShrink) anActor->SetShrink();
virtual Storable* Restore(const Storable::TRestoringMap& theMap);
- virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+ virtual VISU_Actor* CreateActor();
virtual void UpdateActor(VISU_Actor* theActor);
};
//---------------------------------------------------------------
VISU::Plot3D_i
-::Plot3D_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode) :
+::Plot3D_i(EPublishInStudyMode thePublishInStudyMode) :
PrsObject_i(SALOMEDS::Study::_nil()),
- Prs3d_i(theResult),
- ColoredPrs3d_i(theResult,thePublishInStudyMode),
- ScalarMap_i(theResult,thePublishInStudyMode),
+ Prs3d_i(),
+ ColoredPrs3d_i(thePublishInStudyMode),
+ ScalarMap_i(thePublishInStudyMode),
myPlot3DPL(NULL)
{}
//---------------------------------------------------------------
VISU_Actor*
VISU::Plot3D_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor()
{
- if(VISU_Actor* anActor = TSuperClass::CreateActor(theIO)){
+ if(VISU_Actor* anActor = TSuperClass::CreateActor()){
anActor->SetVTKMapping(true);
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
int aDispMode = aResourceMgr->integerValue("VISU", "plot3d_represent", 2);
typedef ScalarMap_i TSuperClass;
explicit
- Plot3D_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+ Plot3D_i(EPublishInStudyMode thePublishInStudyModep);
explicit
Plot3D_i(Result_i* theResult,
SALOMEDS::SObject_var theSObject);
virtual
VISU_Actor*
- CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+ CreateActor();
static const std::string myComment;
//----------------------------------------------------------------------------
VISU::Prs3d_i
-::Prs3d_i(Result_i* theResult) :
+::Prs3d_i() :
PrsObject_i(SALOMEDS::Study::_nil()),
myActorCollection(vtkActorCollection::New()),
mySObject(SALOMEDS::SObject::_nil()),
- myResult(theResult),
- myPipeLine(NULL)
+ myPipeLine(NULL),
+ myResult(NULL)
{
if(MYDEBUG) MESSAGE("Prs3d_i::Prs3d_i - this = "<<this);
myOffset[0] = myOffset[1] = myOffset[2] = 0;
myActorCollection->Delete();
- if(theResult){
- SetStudyDocument(theResult->GetStudyDocument());
- theResult->Register();
- }
}
//----------------------------------------------------------------------------
void
VISU::Prs3d_i
-::SetResultObject(VISU::Result_ptr theResult)
+::SetCResult(VISU::Result_i* theResult)
{
- Result_i* aResult = dynamic_cast<Result_i*>(GetServant(theResult).in());
- if(myResult != aResult){
+ if(myResult != theResult){
if(myResult)
myResult->Destroy();
- if(aResult)
- aResult->Register();
- SetStudyDocument(aResult->GetStudyDocument());
- myResult = aResult;
+ if(theResult){
+ theResult->Register();
+ SetStudyDocument(theResult->GetStudyDocument());
+ }
+ myResult = theResult;
myParamsTime.Modified();
}
}
+//----------------------------------------------------------------------------
+Result_i*
+VISU::Prs3d_i
+::GetCResult() const
+{
+ return myResult;
+}
+
//----------------------------------------------------------------------------
-VISU::Result_ptr
+void
VISU::Prs3d_i
-::GetResultObject()
+::SetResultObject(VISU::Result_ptr theResult)
{
- return myResult->_this();
+ SetCResult(dynamic_cast<Result_i*>(GetServant(theResult).in()));
}
//----------------------------------------------------------------------------
-Result_i*
+VISU::Result_ptr
VISU::Prs3d_i
-::GetCResult() const
-{
- return myResult;
+::GetResultObject()
+{
+ return myResult->_this();
}
VISU::Prs3d_i
::Restore(const Storable::TRestoringMap& theMap)
{
- SetName(VISU::Storable::FindValue(theMap,"myName").latin1());
+ SetName(VISU::Storable::FindValue(theMap,"myName").latin1(), false);
myOffset[0] = VISU::Storable::FindValue(theMap,"myOffset[0]").toFloat();
myOffset[1] = VISU::Storable::FindValue(theMap,"myOffset[1]").toFloat();
myOffset[2] = VISU::Storable::FindValue(theMap,"myOffset[2]").toFloat();
//----------------------------------------------------------------------------
void
VISU::Prs3d_i
-::CreateActor(VISU_Actor* theActor,
- const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor(VISU_Actor* theActor)
{
try{
- Handle(SALOME_InteractiveObject) anIO = theIO;
- if(anIO.IsNull() && (!mySObject->_is_nil())){
- anIO = GetIO();
+ Handle(SALOME_InteractiveObject) anIO = GetIO();
+ if(!anIO.IsNull() && anIO->hasEntry()){
theActor->setIO(anIO);
}
public virtual PrsObject_i
{
- Prs3d_i();
Prs3d_i(const Prs3d_i&);
public:
//----------------------------------------------------------------------------
//! A constructor to create a fresh instance of the class
- explicit
- Prs3d_i(Result_i* theResult);
+ Prs3d_i();
//! A constructor to restore an instance of the class
explicit
CORBA::Boolean
Apply();
+ //----------------------------------------------------------------------------
+ void
+ SetCResult(Result_i* theResult);
+
+ Result_i*
+ GetCResult() const;
+
virtual
void
SetResultObject(VISU::Result_ptr theResult);
VISU::Result_ptr
GetResultObject();
- //! Get corresponding Result_i
- Result_i*
- GetCResult() const;
-
+ //----------------------------------------------------------------------------
virtual
void
SetMeshName(const char* theMeshName);
//! To define a way to create VTK representation of the instance
virtual
VISU_Actor*
- CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL) = 0;
+ CreateActor() = 0;
//! To unregister the pointed actor
virtual
SetPipeLine(VISU_PipeLine* thePipeLine);
void
- CreateActor(VISU_Actor* theActor,
- const Handle(SALOME_InteractiveObject)& theIO = NULL);
+ CreateActor(VISU_Actor* theActor);
virtual
VISU_PipeLine*
//---------------------------------------------------------------
void
VISU::RemovableObject_i
-::SetName(const std::string& theName)
+::SetName(const std::string& theName,
+ bool theIsUpdateStudyAttr)
{
myName = theName;
- SALOMEDS::SObject_var aSObject = myStudy->FindObjectID(GetEntry().c_str());
- if(!aSObject->_is_nil()){
- SALOMEDS::StudyBuilder_var aBuilder = myStudy->NewBuilder();
- SALOMEDS::GenericAttribute_var anAttr = aBuilder->FindOrCreateAttribute( aSObject, "AttributeName" );
- SALOMEDS::AttributeName_var aNameAttr = SALOMEDS::AttributeName::_narrow( anAttr );
- aNameAttr->SetValue( theName.c_str() );
+ if(theIsUpdateStudyAttr){
+ SALOMEDS::SObject_var aSObject = myStudy->FindObjectID(GetEntry().c_str());
+ if(!aSObject->_is_nil()){
+ SALOMEDS::StudyBuilder_var aBuilder = myStudy->NewBuilder();
+ SALOMEDS::GenericAttribute_var anAttr = aBuilder->FindOrCreateAttribute( aSObject, "AttributeName" );
+ SALOMEDS::AttributeName_var aNameAttr = SALOMEDS::AttributeName::_narrow( anAttr );
+ aNameAttr->SetValue( theName.c_str() );
+ }
}
}
virtual
void
- SetName(const std::string& theName);
+ SetName(const std::string& theName,
+ bool theIsUpdateStudyAttr);
protected:
RemovableObject_i();
//---------------------------------------------------------------
VISU::ScalarMapOnDeformedShape_i
-::ScalarMapOnDeformedShape_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode) :
+::ScalarMapOnDeformedShape_i(EPublishInStudyMode thePublishInStudyMode) :
PrsObject_i(SALOMEDS::Study::_nil()),
- Prs3d_i(theResult),
- ColoredPrs3d_i(theResult,thePublishInStudyMode),
- ScalarMap_i(theResult,thePublishInStudyMode),
+ Prs3d_i(),
+ ColoredPrs3d_i(thePublishInStudyMode),
+ ScalarMap_i(thePublishInStudyMode),
myScalarMapOnDeformedShapePL(NULL),
myScalarIteration(1)
{}
//---------------------------------------------------------------
VISU_Actor*
VISU::ScalarMapOnDeformedShape_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor()
{
- VISU_Actor* anActor = TSuperClass::CreateActor(theIO, true);
+ VISU_Actor* anActor = TSuperClass::CreateActor(true);
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
int aDispMode = aResourceMgr->integerValue("VISU", "scalar_def_represent", 2);
bool toShrink = aResourceMgr->booleanValue("VISU", "scalar_def_shrink", false);
typedef ScalarMap_i TSuperClass;
explicit
- ScalarMapOnDeformedShape_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+ ScalarMapOnDeformedShape_i(EPublishInStudyMode thePublishInStudyModep);
explicit
ScalarMapOnDeformedShape_i(Result_i* theResult,
SALOMEDS::SObject_var theSObject);
virtual
VISU_Actor*
- CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+ CreateActor();
virtual
void
//----------------------------------------------------------------------------
VISU::ScalarMap_i::
-ScalarMap_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode) :
+ScalarMap_i(EPublishInStudyMode thePublishInStudyMode) :
PrsObject_i(SALOMEDS::Study::_nil()),
- Prs3d_i(theResult),
- ColoredPrs3d_i(theResult,thePublishInStudyMode)
+ Prs3d_i(),
+ ColoredPrs3d_i(thePublishInStudyMode)
{}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
VISU_Actor*
VISU::ScalarMap_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO, bool toSupressShrinking)
+::CreateActor(bool toSupressShrinking)
{
VISU_ScalarMapAct* anActor = VISU_ScalarMapAct::New();
try{
- TSuperClass::CreateActor(anActor,theIO);
+ TSuperClass::CreateActor(anActor);
anActor->SetBarVisibility(true);
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
int aDispMode = aResourceMgr->integerValue("VISU", "scalar_map_represent", 2);
//----------------------------------------------------------------------------
VISU_Actor*
VISU::ScalarMap_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor()
{
- return CreateActor(theIO, false);
+ return CreateActor(false);
}
//----------------------------------------------------------------------------
typedef ColoredPrs3d_i TSuperClass;
explicit
- ScalarMap_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+ ScalarMap_i(EPublishInStudyMode thePublishInStudyModep);
explicit
ScalarMap_i(Result_i* theResult,
SALOMEDS::SObject_var theSObject);
virtual
VISU_Actor*
- CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+ CreateActor();
virtual
VISU_Actor*
- CreateActor(const Handle(SALOME_InteractiveObject)& theIO,
- bool toSupressShrinking);
+ CreateActor(bool toSupressShrinking);
virtual
void
//---------------------------------------------------------------
VISU::StreamLines_i
-::StreamLines_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode) :
+::StreamLines_i(EPublishInStudyMode thePublishInStudyMode) :
PrsObject_i(SALOMEDS::Study::_nil()),
- Prs3d_i(theResult),
- ColoredPrs3d_i(theResult,thePublishInStudyMode),
- ScalarMap_i(theResult,thePublishInStudyMode),
- DeformedShape_i(theResult,thePublishInStudyMode),
+ Prs3d_i(),
+ ColoredPrs3d_i(thePublishInStudyMode),
+ ScalarMap_i(thePublishInStudyMode),
+ DeformedShape_i(thePublishInStudyMode),
myStreamLinesPL(NULL),
myAppendFilter(vtkAppendFilter::New())
{}
//---------------------------------------------------------------
VISU_Actor*
VISU::StreamLines_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor()
{
- if(VISU_Actor* anActor = TSuperClass::CreateActor(theIO, true)){
+ if(VISU_Actor* anActor = TSuperClass::CreateActor(true)){
anActor->SetVTKMapping(true);
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
int aDispMode = aResourceMgr->integerValue("VISU", "stream_lines_represent", 1);
typedef DeformedShape_i TSuperClass;
explicit
- StreamLines_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+ StreamLines_i(EPublishInStudyMode thePublishInStudyModep);
explicit
StreamLines_i(Result_i* theResult,
SALOMEDS::SObject_var theSObject);
//! Extends VISU_ColoredPrs3d_i::CreateActor
virtual
VISU_Actor*
- CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+ CreateActor();
//! Extends VISU_ColoredPrs3d_i::UpdateActor
virtual
{
MESSAGE("Table_i::~Table_i");
}
+
+//----------------------------------------------------------------------------
+void
+VISU::Table_i
+::SetTitle( const char* theTitle )
+{
+ SetName( theTitle, true );
+}
+
+//----------------------------------------------------------------------------
+char*
+VISU::Table_i
+::GetTitle()
+{
+ return CORBA::string_dup( GetName().c_str() );
+}
+
+//----------------------------------------------------------------------------
+void
+VISU::Table_i
+::SetOrientation( VISU::Table::Orientation theOrientation )
+{
+ myOrientation = theOrientation;
+}
+
+//----------------------------------------------------------------------------
+VISU::Table::Orientation
+VISU::Table_i
+::GetOrientation()
+{
+ return myOrientation;
+}
+
+//----------------------------------------------------------------------------
+SALOMEDS::SObject_var
+VISU::Table_i
+::GetSObject() const
+{
+ return mySObj;
+}
+
+//----------------------------------------------------------------------------
+char*
+VISU::Table_i
+::GetObjectEntry()
+{
+ return CORBA::string_dup( mySObj->GetID() );
+}
+
+//----------------------------------------------------------------------------
/*!
Gets number of rows in table
*/
VISU::Storable* VISU::Table_i::Create()
{
// generate name ...
- SetName(GetTableTitle());
+ SetName(GetTableTitle(), false);
// mpv (PAL 5357): if name attribute already exist at this label, use it as name of table
if ( GetName() == "" )
pCutLines = dynamic_cast<CutLines_i*>(GetServant(aCutLines).in());
}
if (!pCutLines)
- if (mySObj->GetName()) SetName(mySObj->GetName());
+ if (mySObj->GetName()) SetName(mySObj->GetName(), false);
}
if ( GetName() == "" )
- SetName(GenerateName());
+ SetName(GenerateName(), false);
// ... and build the object
return Build( false );
}
VISU::Storable* VISU::Table_i::Restore( const Storable::TRestoringMap& theMap, SALOMEDS::SObject_ptr SO)
{
if(MYDEBUG) MESSAGE(GetComment());
- SetName(VISU::Storable::FindValue(theMap,"myName").latin1());
+ SetName(VISU::Storable::FindValue(theMap,"myName").latin1(), false);
myTitle = VISU::Storable::FindValue(theMap,"myTitle").latin1();
myOrientation = ( VISU::Table::Orientation )( VISU::Storable::FindValue(theMap,"myOrientation").toInt() );
mySObj = SALOMEDS::SObject::_duplicate(SO);
{
MESSAGE("Curve_i::~Curve_i");
}
+
+//----------------------------------------------------------------------------
+void
+VISU::Curve_i
+::SetTitle( const char* theTitle )
+{
+ SetName( theTitle, true );
+}
+
+//----------------------------------------------------------------------------
+char*
+VISU::Curve_i
+::GetTitle()
+{
+ return CORBA::string_dup( GetName().c_str() );
+}
+
+//----------------------------------------------------------------------------
+void
+VISU::Curve_i
+::SetColor( const SALOMEDS::Color& theColor )
+{
+ myColor = theColor;
+ myAuto = false;
+}
+
+//----------------------------------------------------------------------------
+SALOMEDS::Color
+VISU::Curve_i
+::GetColor()
+{
+ return myColor;
+}
+
+//----------------------------------------------------------------------------
+void
+VISU::Curve_i
+::SetMarker( VISU::Curve::MarkerType theType )
+{
+ myMarker = theType;
+ myAuto = false;
+}
+
+//----------------------------------------------------------------------------
+VISU::Curve::MarkerType
+VISU::Curve_i
+::GetMarker()
+{
+ return myMarker;
+}
+
+//----------------------------------------------------------------------------
+void
+VISU::Curve_i
+::SetLine( VISU::Curve::LineType theType, CORBA::Long theWidth )
+{
+ myLine = theType;
+ myLineWidth = theWidth;
+ myAuto = false;
+}
+
+//----------------------------------------------------------------------------
+VISU::Curve::LineType
+VISU::Curve_i
+::GetLine()
+{
+ return myLine;
+}
+
+//----------------------------------------------------------------------------
+CORBA::Long
+VISU::Curve_i
+::GetLineWidth()
+{
+ return myLineWidth;
+}
+
+//----------------------------------------------------------------------------
/*!
Creates curve object
*/
VISU::Storable* VISU::Curve_i::Create()
{
// generate name ...
- SetName(GetVerTitle());
+ SetName(GetVerTitle(), false);
if ( GetName() == "" )
- SetName(GenerateName());
+ SetName(GenerateName(), false);
// ... and build the object
return Build( false );
}
{
if(MYDEBUG) MESSAGE(GetComment());
mySObj = SALOMEDS::SObject::_duplicate(theSO);
- SetName(VISU::Storable::FindValue(theMap,"myName").latin1());
+ SetName(VISU::Storable::FindValue(theMap,"myName").latin1(), false);
myHRow = VISU::Storable::FindValue(theMap,"myHRow").toInt();
myVRow = VISU::Storable::FindValue(theMap,"myVRow").toInt();
bool ok = false;
VISU::Storable* VISU::Container_i::Create()
{
// generate name ...
- SetName(GenerateName());
+ SetName(GenerateName(), false);
// ... and build the object
return Build( false );
}
{
if(MYDEBUG) MESSAGE(GetComment());
mySObj = SALOMEDS::SObject::_duplicate(SO);
- SetName(VISU::Storable::FindValue( theMap, "myName" ).latin1());
+ SetName(VISU::Storable::FindValue( theMap, "myName" ).latin1(), false);
QString val = VISU::Storable::FindValue( theMap, "myCurves" );
myCurves = QStringList::split( QString( "*" ), val, false );
return Build( true );
virtual ~Table_i();
virtual VISU::VISUType GetType() { return VISU::TTABLE;};
- virtual void SetTitle( const char* theTitle ) { SetName( theTitle ); }
- virtual char* GetTitle() { return CORBA::string_dup( GetName().c_str() ); }
+ virtual void SetTitle( const char* theTitle );
+ virtual char* GetTitle();
- virtual void SetOrientation( VISU::Table::Orientation theOrientation ) { myOrientation = theOrientation; }
- virtual VISU::Table::Orientation GetOrientation() { return myOrientation; }
+ virtual void SetOrientation( VISU::Table::Orientation theOrientation );
+ virtual VISU::Table::Orientation GetOrientation();
virtual CORBA::Long GetNbRows();
virtual CORBA::Long GetNbColumns();
public:
virtual Storable* Create();
- SALOMEDS::SObject_var GetSObject() const { return mySObj;}
+ SALOMEDS::SObject_var GetSObject() const;
+
+ virtual Storable* Restore( const Storable::TRestoringMap& theMap,
+ SALOMEDS::SObject_ptr SO);
- virtual Storable* Restore( const Storable::TRestoringMap& theMap, SALOMEDS::SObject_ptr SO);
static Storable* Restore(SALOMEDS::SObject_ptr theSObject,
const std::string& thePrefix,
const Storable::TRestoringMap& theMap);
+
virtual void ToStream( std::ostringstream& theStr );
static const std::string myComment;
virtual const char* GetComment() const;
virtual const char* GenerateName();
virtual const char* GetTableTitle();
- virtual char* GetObjectEntry() { return CORBA::string_dup( mySObj->GetID() ); }
+ virtual char* GetObjectEntry();
};
SALOMEDS::SObject_var ImportTables(const char* theFileName, SALOMEDS::Study_ptr theStudy);
bool ExportTableToFile(SALOMEDS::SObject_ptr theTable, const char* theFileName);
virtual ~Curve_i();
virtual VISU::VISUType GetType() { return VISU::TCURVE;};
- virtual void SetTitle( const char* theTitle ) { SetName( theTitle ); }
- virtual char* GetTitle() { return CORBA::string_dup( GetName().c_str() ); }
+ virtual void SetTitle( const char* theTitle );
+ virtual char* GetTitle();
- virtual void SetColor( const SALOMEDS::Color& theColor ) { myColor = theColor; myAuto = false; }
- virtual SALOMEDS::Color GetColor() { return myColor; }
+ virtual void SetColor( const SALOMEDS::Color& theColor );
+ virtual SALOMEDS::Color GetColor();
- virtual void SetMarker( VISU::Curve::MarkerType theType ) { myMarker = theType; myAuto = false; }
- virtual VISU::Curve::MarkerType GetMarker() { return myMarker; }
+ virtual void SetMarker( VISU::Curve::MarkerType theType );
+ virtual VISU::Curve::MarkerType GetMarker();
- virtual void SetLine( VISU::Curve::LineType theType, CORBA::Long theWidth )
- { myLine = theType; myLineWidth = theWidth; myAuto = false; }
- virtual VISU::Curve::LineType GetLine() { return myLine; }
- virtual CORBA::Long GetLineWidth() { return myLineWidth; }
+ virtual void SetLine( VISU::Curve::LineType theType, CORBA::Long theWidth );
+ virtual VISU::Curve::LineType GetLine();
+ virtual CORBA::Long GetLineWidth();
virtual void RemoveFromStudy();
int aTimeStampId = VISU::Storable::FindValue(aTimeMap,"myTimeStampId").toInt();
bool anIsCreated = false;
- TPrs3d* aPresent = new TPrs3d(theResult,VISU::ColoredPrs3d_i:: EDoNotPublish);
+ TPrs3d* aPresent = new TPrs3d(VISU::ColoredPrs3d_i::EDoNotPublish);
+ aPresent->SetCResult(theResult);
+ aPresent->SetMeshName(aMeshName.latin1());
+ aPresent->SetEntity(anEntity);
+ aPresent->SetFieldName(aFieldName.latin1());
+ aPresent->SetTimeStampNumber(aTimeStampId);
#ifdef NO_CAS_CATCH
try{
OCC_CATCH_SIGNALS;
CASCatch_TRY{
try{
#endif
- if(aPresent->Create(aMeshName.latin1(),anEntity,aFieldName.latin1(),aTimeStampId)){
+ if(aPresent->Apply()){
anIsCreated = true;
theData.myPrs[aFrameId++] = aPresent;
aMin = std::min(aPresent->GetMin(), aMin);
//---------------------------------------------------------------
VISU::Vectors_i
-::Vectors_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode) :
+::Vectors_i(EPublishInStudyMode thePublishInStudyMode) :
PrsObject_i(SALOMEDS::Study::_nil()),
- Prs3d_i(theResult),
- ColoredPrs3d_i(theResult,thePublishInStudyMode),
- ScalarMap_i(theResult,thePublishInStudyMode),
- DeformedShape_i(theResult,thePublishInStudyMode),
+ Prs3d_i(),
+ ColoredPrs3d_i(thePublishInStudyMode),
+ ScalarMap_i(thePublishInStudyMode),
+ DeformedShape_i(thePublishInStudyMode),
myLineWidth(1.0),
myVectorsPL(NULL)
{}
//---------------------------------------------------------------
VISU_Actor*
VISU::Vectors_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor()
{
VISU_VectorsAct* anActor = VISU_VectorsAct::New();
try{
- VISU::Prs3d_i::CreateActor(anActor,theIO);
+ VISU::Prs3d_i::CreateActor(anActor);
anActor->SetVTKMapping(true);
anActor->SetBarVisibility(true);
anActor->GetProperty()->SetColor(myColor.R,myColor.G,myColor.B);
typedef DeformedShape_i TSuperClass;
explicit
- Vectors_i(Result_i* theResult,
- EPublishInStudyMode thePublishInStudyMode = EPublishUnderTimeStamp);
+ Vectors_i(EPublishInStudyMode thePublishInStudyModep);
explicit
Vectors_i(Result_i* theResult,
SALOMEDS::SObject_var theSObject);
//! Redefines VISU_ColoredPrs3d_i::CreateActor
virtual
VISU_Actor*
- CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+ CreateActor();
//! Redefines VISU_ColoredPrs3d_i::UpdateActor
virtual