cout << "BLSURFPluginGUI_HypothesisCreator::BLSURFPluginGUI_HypothesisCreator" << endl;
this->mySMPMap.clear();
- this->getGeomSelectionTool();
+ _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+ GeomToolSelected = new GeomSelectionTools(aStudy);
/* Initialize the Python interpreter */
assert(Py_IsInitialized());
QGridLayout* anSmpLayout = new QGridLayout(mySmpGroup);
mySizeMapTable = new QTableWidget( 0, SMP_NB_COLUMNS, mySmpGroup );
- anSmpLayout->addWidget(mySizeMapTable, 1, 0, 6, 1);
+ anSmpLayout->addWidget(mySizeMapTable, 1, 0, 8, 1);
QStringList sizeMapHeaders;
sizeMapHeaders << tr( "SMP_ENTRY_COLUMN" )<< tr( "SMP_NAME_COLUMN" ) << tr( "SMP_SIZEMAP_COLUMN" );
mySizeMapTable->setHorizontalHeaderLabels(sizeMapHeaders);
mySizeMapTable->setAlternatingRowColors(true);
mySizeMapTable->verticalHeader()->hide();
+ addAttractorButton = new QPushButton(tr("BLSURF_SM_ATTRACTOR"),mySmpGroup);
+ anSmpLayout->addWidget(addAttractorButton, 1, 1, 1, 1);
+
+ QFrame *line = new QFrame(mySmpGroup);
+ line->setFrameShape(QFrame::HLine);
+ line->setFrameShadow(QFrame::Sunken);
+ anSmpLayout->addWidget(line, 2, 1, 1, 1);
+
addSurfaceButton = new QPushButton(tr("BLSURF_SM_SURFACE"),mySmpGroup);
- anSmpLayout->addWidget(addSurfaceButton, 1, 1, 1, 1);
+ anSmpLayout->addWidget(addSurfaceButton, 3, 1, 1, 1);
addEdgeButton = new QPushButton(tr("BLSURF_SM_EDGE"),mySmpGroup);
- anSmpLayout->addWidget(addEdgeButton, 2, 1, 1, 1);
+ anSmpLayout->addWidget(addEdgeButton, 4, 1, 1, 1);
addPointButton = new QPushButton(tr("BLSURF_SM_POINT"),mySmpGroup);
- anSmpLayout->addWidget(addPointButton, 3, 1, 1, 1);
+ anSmpLayout->addWidget(addPointButton, 5, 1, 1, 1);
- QFrame *line = new QFrame(mySmpGroup);
- line->setFrameShape(QFrame::HLine);
- line->setFrameShadow(QFrame::Sunken);
- anSmpLayout->addWidget(line, 4, 1, 1, 1);
+ QFrame *line2 = new QFrame(mySmpGroup);
+ line2->setFrameShape(QFrame::HLine);
+ line2->setFrameShadow(QFrame::Sunken);
+ anSmpLayout->addWidget(line2, 6, 1, 1, 1);
removeButton = new QPushButton(tr("BLSURF_SM_REMOVE"),mySmpGroup);
- anSmpLayout->addWidget(removeButton, 5, 1, 1, 1);
+ anSmpLayout->addWidget(removeButton, 7, 1, 1, 1);
// ---
while (i.hasNext()) {
i.next();
const QString entry = i.key();
- string shapeName = that->getGeomSelectionTool()->getNameFromEntry(entry.toStdString());
+ string shapeName = GeomToolSelected->getNameFromEntry(entry.toStdString());
const QString sizeMap = i.value();
int row = mySizeMapTable->rowCount();
mySizeMapTable->setRowCount( row+1 );
int pos = fullSizeMap.find("return")+7;
QString sizeMap = QString::fromStdString(fullSizeMap.substr(pos, fullSizeMap.size()-pos));
that->mySMPMap[entry_sm[0]] = sizeMap;
- that->mySMPShapeTypeMap[entry_sm[0]] = that->getGeomSelectionTool()->entryToShape(entry_sm[0].toStdString()).ShapeType();
+ that->mySMPShapeTypeMap[entry_sm[0]] = GeomToolSelected->entryToShape(entry_sm[0].toStdString()).ShapeType();
MESSAGE("mySMPMap[" << entry_sm[0].toStdString() << "] = " << sizeMap.toStdString());
MESSAGE("mySMPShapeTypeMap[" << entry_sm[0].toStdString() << "] = " << that->mySMPShapeTypeMap[entry_sm[0]]);
}
TopoDS_Shape S;
string entry, shapeName;
- LightApp_SelectionMgr* aSel = that->getGeomSelectionTool()->selectionMgr();
+ LightApp_SelectionMgr* aSel = GeomToolSelected->selectionMgr();
SALOME_ListIO ListSelectedObjects;
aSel->selectedObjects(ListSelectedObjects, NULL, false );
if (!ListSelectedObjects.IsEmpty())
for (; Object_It.More(); Object_It.Next())
{
Handle(SALOME_InteractiveObject) anObject = Object_It.Value();
- entry = that->getGeomSelectionTool()->getEntryOfObject(anObject);
+ entry = GeomToolSelected->getEntryOfObject(anObject);
shapeName = anObject->getName();
- S = that->getGeomSelectionTool()->entryToShape(entry);
+ S = GeomToolSelected->entryToShape(entry);
if ((! S.IsNull()) && (S.ShapeType() == typeShapeAsked))
{
mySizeMapTable->setFocus();