-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#include <GeometryGUI.h>
#include <GEOMBase.h>
#include <GEOMUtils.hxx>
-#include <MeasureGUI_ShapeStatisticsDlg.h>
+#ifndef DISABLE_PLOT2DVIEWER
+ #include <MeasureGUI_ShapeStatisticsDlg.h>
+#endif
#include <OCCViewer_ViewModel.h>
#include <SVTK_ViewModel.h>
myLessFilterSpin = new SalomeApp_DoubleSpinBox(myFilterGrp);
myGreaterFilterSpin = new SalomeApp_DoubleSpinBox(myFilterGrp);
myApplyFilterButton = new QPushButton(tr("GEOM_BUT_APPLY"), myFilterGrp);
+#ifndef DISABLE_PLOT2DVIEWER
myPlotDistributionButton = new QPushButton(tr("GEOM_PLOT_DISTRIBUTION"), myFilterGrp);
+#endif
QGridLayout* filterLayout = new QGridLayout(myFilterGrp);
filterLayout->addWidget(myLessFilterCheck, 0, 0);
filterLayout->addWidget(myGreaterFilterCombo, 1, 1);
filterLayout->addWidget(myGreaterFilterSpin, 1, 2);
filterLayout->addWidget(myApplyFilterButton, 0, 3);
+#ifndef DISABLE_PLOT2DVIEWER
filterLayout->addWidget(myPlotDistributionButton, 1, 3);
+#endif
QVBoxLayout* layout = new QVBoxLayout(centralWidget());
layout->setMargin(0); layout->setSpacing(6);
connect(GroupPoints->PushButton4, SIGNAL(clicked()), this, SLOT(showOnlySelected()));
connect(myApplyFilterButton, SIGNAL(clicked()), this, SLOT(ClickOnOkFilter()));
+#ifndef DISABLE_PLOT2DVIEWER
connect(myPlotDistributionButton, SIGNAL(clicked()), this, SLOT(ClickOnPlot()));
+#endif
connect(myLessFilterCheck, SIGNAL(stateChanged(int)), this, SLOT(MeasureToggled()));
connect(myGreaterFilterCheck, SIGNAL(stateChanged(int)), this, SLOT(MeasureToggled()));
}
if (isOk)
- isOk = onAccept();
+ isOk = onAccept( true, true, false );
if (isOk)
ClickOnCancel();
GroupPoints->CheckButton1->isChecked() &&
shapeType() < GEOM::VERTEX);
+#ifndef DISABLE_PLOT2DVIEWER
myPlotDistributionButton->setEnabled( myFilterGrp->isEnabled() &&
( shapeType() == TopAbs_EDGE ||
shapeType() == TopAbs_FACE ||
shapeType() == TopAbs_SOLID ) );
+#endif
activateSelection();
}
if (!appStudy) return 0;
_PTR(Study) aStudy = appStudy->studyDS();
- _PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toLatin1().constData()));
+ _PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toUtf8().constData()));
+ if ( ! GeometryGUI::IsInGeomComponent( aSObj )) continue;
GEOM::GEOM_Object_var aGeomObj =
GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aSObj));
TopoDS_Shape aShape;
//=================================================================================
GEOM::GEOM_IOperations_ptr EntityGUI_SubShapeDlg::createOperation()
{
- return getGeomEngine()->GetIShapesOperations(getStudyId());
+ return getGeomEngine()->GetIShapesOperations();
}
//=================================================================================
TopTools_IndexedMapOfShape aSubShapesMap;
TopExp::MapShapes(myShape, aSubShapesMap);
- SALOME_View* view = GEOM_Displayer::GetActiveView();
+ //SALOME_View* view = GEOM_Displayer::GetActiveView();
getDisplayer()->Erase(myObject, false, false);
CORBA::String_var aMainEntry = myObject->GetStudyEntry();
QString anEntryBase = aMainEntry.in();
( myLessFilterCheck->isChecked() && !myGreaterFilterCheck->isChecked() && isLess ) ||
( myGreaterFilterCheck->isChecked() && !myLessFilterCheck->isChecked() && isGreater ) ) {
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject();
- io->setEntry( anEntry.toLatin1().constData() );
+ io->setEntry( anEntry.toUtf8().constData() );
io->setName( myObject->GetName() );
toSelect.Append(io);
}
updateButtonState();
}
+#ifndef DISABLE_PLOT2DVIEWER
//=================================================================================
// function : ClickOnPlot()
// purpose : opens "Shape Statistics" dialog box in order to plot sub-shapes distribution.
dlg->show();
}
}
+#endif
//=================================================================================
// function : MeasureToggled()