//*************************************************************************
void VisuGUI_ClippingPanel::onPresentationCreate(VISU::Prs3d_i* thePrs)
{
- printf("#### onPresentationCreate PrsNb = %i\n", myPresentations.size());
myPrsList->addItem(getPrsName(thePrs));
myPresentations.append(thePrs->GetEntry().c_str());
for (int i = 0; i < myPlanes.size(); i++) {
//*************************************************************************
void VisuGUI_ClippingPanel::onObjectDelete(QString theEntry)
{
- printf("#### onObjectDelete PrsSize = %i\n", myPresentations.size());
disconnect(myPrsList, SIGNAL(currentRowChanged(int)), this, SLOT(onPrsSelected(int)));
int i = 0;
foreach (QString aPrsEntry, myPresentations) {
void applyPlaneToPrs(int thePlaneNum, int thePrsNum, bool isChecked);
- QList<VISU::Prs3d_i*> getPrsList(_PTR(Study) theStudy, _PTR(SObject) theObject);
+ //QList<VISU::Prs3d_i*> getPrsList(_PTR(Study) theStudy, _PTR(SObject) theObject);
+ QStringList getPrsList(_PTR(Study) theStudy, _PTR(SObject) theObject);
+ VISU::Prs3d_i* getPrs(QString theEntry);
VisuGUI* myModule;
QCheckBox* myAutoApply;
QListOfPlanes myPlanes;
- QList<VISU::Prs3d_i*> myPresentations;
+ // QList<VISU::Prs3d_i*> myPresentations;
+ QStringList myPresentations; // Stores entries of presentation objects
ListOfPreview myPreview;
VisuGUI_ClippingPlaneDlg* myPlaneDlg;
createMenu( tr( "MEN_GAUSS" ), -1, -1, 30 );
//createMenu( GAUSS_CREATE_PRS, aMenuId, 10 );
- /* QString aViewerType = VVTK_Viewer::Type();
+ QString aViewerType = SVTK_Viewer::Type();
SUIT_Accel* accel = getApp()->accel();
accel->setActionKey( SUIT_Accel::PanLeft, Qt::Key_Left, aViewerType );
accel->setActionKey( SUIT_Accel::PanRight, Qt::Key_Right, aViewerType );
connect( getApp(), SIGNAL( viewManagerAdded( SUIT_ViewManager* ) ),
this, SLOT( OnViewManagerAdded (SUIT_ViewManager*) ) );
- */
+
// Prepare popup menus
QtxPopupMgr* mgr = popupMgr();
QString aRule;
{
std::string aFolderName = VISU::ColoredPrs3dCache_i::GetFolderName();
SALOMEDS::SObject_var aSObject = theStudy->FindObject(aFolderName.c_str());
+ if (CORBA::is_nil(aSObject)) {
+ aSObject = theStudy->FindObject("3D Cache System");
+ if (!CORBA::is_nil(aSObject)) {
+ SALOMEDS::StudyBuilder_var aBuilder = theStudy->NewBuilder();
+ SALOMEDS::GenericAttribute_var anAttr = aBuilder->FindOrCreateAttribute( aSObject, "AttributeName" );
+ SALOMEDS::AttributeName_var aNameAttr = SALOMEDS::AttributeName::_narrow( anAttr );
+ aNameAttr->SetValue( GetFolderName().c_str() );
+ }
+ }
if(!CORBA::is_nil(aSObject)){
CORBA::Object_var anObject = aSObject->GetObject();
VISU::ColoredPrs3dCache_var aCache = VISU::ColoredPrs3dCache::_narrow(anObject);
VISU::ColoredPrs3dCache_i
::GetFolderName()
{
- return "3D Cache System";
+ //return "3D Cache System";
+ return "Presentations";
}
//----------------------------------------------------------------------------