+ // Source box
+ QGroupBox* aSourceBox = new QGroupBox (tr("SOURCE_GRP"), aTopBox);
+ aSourceBox->setColumnLayout(0, Qt::Vertical);
+ QGridLayout* aSrcLayout = new QGridLayout( aSourceBox->layout() );
+ aSrcLayout->setSpacing( 6 );
+ aSrcLayout->setMargin( 0 );
+
+ QLabel* aTypeLbl = new QLabel( tr( "LBL_SOURCE_TYPE" ), aSourceBox);
+ aSrcLayout->addWidget(aTypeLbl, 0, 0);
+
+ myUseSrcCombo = new QComboBox(aSourceBox);
+ const char* aChoise[] = { "None", "Entity", "Family", "Group", "Presentation", 0 };
+ myUseSrcCombo->insertStrList(aChoise);
+ aSrcLayout->addWidget(myUseSrcCombo, 0, 1);
+
+ mySrcCombo = new QComboBox(aSourceBox);
+ mySrcCombo->setEnabled((myUseSrcCombo->currentItem() == 0));
+
+ connect(myUseSrcCombo, SIGNAL(activated(int)), this, SLOT(onSourceTypeChange(int)));
+
+ // Find All prs obj
+ //SUIT_Study* aActiveStudy = VISU::(myVisuGUI);
+ _PTR(Study) aActiveStudy = VISU::GetCStudy(VISU::GetAppStudy(myVisuGUI));
+ SalomeApp_SelectionMgr* aSel = VISU::GetSelectionMgr(myVisuGUI);
+ SALOME_ListIO selected;
+ aSel->selectedObjects(selected);
+ if (selected.Extent() > 0) {
+ Handle(SALOME_InteractiveObject) aIO = selected.First();
+ if (aIO->hasEntry()) {
+ _PTR(SObject) aSObject = aActiveStudy->FindObjectID(aIO->getEntry());
+ aSObject = aSObject->GetFather();
+ aSObject = aSObject->GetFather();
+ aSObject = aSObject->GetFather();
+ aSObject = aSObject->GetFather();
+ mySelectionObj = aSObject;
+ CORBA::Object_var anObject = VISU::ClientSObjectToObject(mySelectionObj);
+ VISU::Result_var aResult;
+ if (CORBA::is_nil(anObject)) {
+ mySelectionObj = mySelectionObj->GetFather();
+ }
+ _PTR(ChildIterator) aIter = aActiveStudy->NewChildIterator(mySelectionObj);
+
+ for (aIter->InitEx(true); aIter->More(); aIter->Next()) {
+ _PTR(SObject) aChildSObj = aIter->Value();
+ CORBA::Object_var aChildObject = VISU::ClientSObjectToObject(aChildSObj);
+
+ if (!CORBA::is_nil(aChildObject)) {
+ VISU::Prs3d_var aPrsObj = VISU::Prs3d::_narrow(aChildObject);
+ if (!CORBA::is_nil(aPrsObj)) { // if this is a Prs object
+ if ((aPrsObj->GetType() != VISU::TSTREAMLINES) &&
+ (aPrsObj->GetType() != VISU::TMESH)) {
+ _PTR(GenericAttribute) anAttr;
+ if (aChildSObj->FindAttribute(anAttr, "AttributeName")) {
+ _PTR(AttributeName) aName (anAttr);
+ myPrsLst += QString(aName->Value().c_str());
+ myPrsList.append(aPrsObj);
+ continue;
+ }
+ }
+ }
+ }
+ // else { // This is not a Prs object
+ _PTR(GenericAttribute) anAttr;
+ if (aChildSObj->FindAttribute(anAttr, "AttributeComment")) {
+ _PTR(AttributeComment) aComment (anAttr);
+ string aComm = aComment->Value();
+ QString strIn (aComm.c_str());
+ VISU::Storable::TRestoringMap aMap;
+ VISU::Storable::StrToMap(strIn,aMap);
+ bool isExist;
+ VISU::VISUType aType = (VISU::VISUType)VISU::Storable::FindValue(aMap,"myType",&isExist).toInt();
+ if (isExist) {
+ if ((aType == VISU::TFAMILY) || (aType == VISU::TGROUP) || (aType == VISU::TENTITY)) {
+ _PTR(GenericAttribute) aNameAttr;
+ if (aChildSObj->FindAttribute(aNameAttr, "AttributeName")) {
+ _PTR(AttributeName) aName (aNameAttr);
+ VISU::Prs3d_var aPrsObj = VISU::Prs3d::_narrow(aChildObject);
+ switch (aType) {
+ case VISU::TFAMILY:
+ myFamilisLst += QString(aName->Value().c_str());
+ myFamilyList.append(aPrsObj);
+ break;
+ case VISU::TGROUP:
+ myGroupsLst += QString(aName->Value().c_str());
+ myGroupList.append(aPrsObj);
+ break;
+ case VISU::TENTITY:
+ myEntitiesLst += QString(aName->Value().c_str());
+ myEntityList.append(aPrsObj);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // connect(myUseSrcChk, SIGNAL(toggled(bool)), mySrcCombo, SLOT(setEnabled(bool)));
+ aSrcLayout->addMultiCellWidget(mySrcCombo, 1, 1, 0, 1);
+
+ QLabel* aPercentLbl = new QLabel (tr("LBL_USED_POINTS"), aSourceBox);
+ aSrcLayout->addWidget(aPercentLbl, 2, 0);
+
+ myPntPercent = new QtxDblSpinBox( 0, 1, 0.1, aSourceBox );
+ aSrcLayout->addWidget(myPntPercent, 2, 1);
+
+ TopLayout->addMultiCellWidget(aSourceBox, 0, 0, 0, 1);
+
+ QLabel* aStepLenLbl = new QLabel (tr("LBL_STEP_LENGTH"), aTopBox);
+ TopLayout->addWidget(aStepLenLbl, 1, 0);
+ myStepLen = new QtxDblSpinBox( DBL_MIN, DBL_MAX, 0.1, aTopBox );