1 // Copyright (C) 2014-2017 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #include "XGUI_InspectionPanel.h"
22 #include "XGUI_SelectionMgr.h"
23 #include "XGUI_Selection.h"
24 #include "XGUI_Tools.h"
26 #include <ModuleBase_ViewerPrs.h>
27 #include <ModuleBase_Tools.h>
29 #include <ModelAPI_Result.h>
31 #include <GeomAPI_Ax3.h>
32 #include <GeomAPI_Box.h>
33 #include <GeomAPI_Circ.h>
34 #include <GeomAPI_Cone.h>
35 #include <GeomAPI_Cylinder.h>
36 #include <GeomAPI_Edge.h>
37 #include <GeomAPI_Ellipse.h>
38 #include <GeomAPI_Face.h>
39 #include <GeomAPI_Pln.h>
40 #include <GeomAPI_Pnt.h>
41 #include <GeomAPI_Shell.h>
42 #include <GeomAPI_Solid.h>
43 #include <GeomAPI_Sphere.h>
44 #include <GeomAPI_Torus.h>
45 #include <GeomAPI_Vertex.h>
46 #include <GeomAPI_Wire.h>
49 #include <QScrollArea>
52 #include <QTableWidget>
53 #include <QHeaderView>
54 #include <QTextBrowser>
55 #include <QResizeEvent>
58 #include <BRepBndLib.hxx>
59 #include <TopoDS_Iterator.hxx>
60 #include <TopTools_MapOfShape.hxx>
61 #include <TopTools_ListOfShape.hxx>
62 #include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic
64 // ================ Auxiliary functions ================
65 #define TITLE(val) ("<b>" + (val) + "</b>")
67 static void appendPointToParameters(const QString& thePointTitle,
68 const GeomPointPtr& theCoord,
71 theParams += TITLE(thePointTitle) +
72 "<br> X: " + QString::number(theCoord->x()) +
73 "<br> Y: " + QString::number(theCoord->y()) +
74 "<br> Z: " + QString::number(theCoord->z()) +
78 static void appendDirToParameters(const QString& theDirTitle,
79 const GeomDirPtr& theDirection,
82 theParams += TITLE(theDirTitle) +
83 "<br> DX: " + QString::number(theDirection->x()) +
84 "<br> DY: " + QString::number(theDirection->y()) +
85 "<br> DZ: " + QString::number(theDirection->z()) +
89 static void appendGroupNameToParameters(const QString& theGroupTitle, QString& theParams)
91 theParams += TITLE(theGroupTitle) + "<br>";
94 static void appendNamedValueToParameters(const QString& theName,
95 const double theValue,
98 theParams += theName + ": " + QString::number(theValue) + "<br>";
101 static void appendNamedValueToParameters(const QString& theName,
105 theParams += theName + ": " + (theValue ? "True" : "False") + "<br>";
109 // ================ XGUI_InspectionPanel ================
111 XGUI_InspectionPanel::XGUI_InspectionPanel(QWidget* theParent, XGUI_SelectionMgr* theMgr)
112 : QDockWidget(theParent),
113 mySelectionMgr(theMgr)
115 setWindowTitle(tr("Inspection Panel"));
116 setObjectName(INSPECTION_PANEL);
117 setStyleSheet("::title { position: relative; padding-left: 5px; text-align: left center }");
119 QSplitter* aSplitter = new QSplitter(Qt::Vertical, this);
121 // Create an internal widget
122 QWidget* aNameWgt = new QWidget(aSplitter);
123 QHBoxLayout* aNameLayout = new QHBoxLayout(aNameWgt);
124 aNameLayout->setContentsMargins(3, 0, 3, 0);
125 aNameLayout->addWidget(new QLabel(tr("Object"), aNameWgt));
126 myNameEdt = new QLineEdit(aNameWgt);
127 myNameEdt->setReadOnly(true);
128 aNameLayout->addWidget(myNameEdt);
130 aSplitter->addWidget(aNameWgt);
132 // Table with sub-shapes
133 mySubShapesTab = new QTableWidget(9, 2, aSplitter);
134 mySubShapesTab->setFocusPolicy(Qt::NoFocus);
135 mySubShapesTab->verticalHeader()->hide();
137 aTitles << tr("Sub-shapes") << tr("Number");
138 mySubShapesTab->setHorizontalHeaderLabels(aTitles);
140 QStringList aSubShapes;
141 aSubShapes << "SHAPE" << "COMPOUND" << "COMPSOLID" <<
142 "SOLID" << "SHELL" << "FACE" << "WIRE" << "EDGE" << "VERTEX";
144 foreach(QString aType, aSubShapes) {
145 QTableWidgetItem* aItem = new QTableWidgetItem(aType);
146 aItem->setFlags(Qt::ItemIsEnabled);
147 mySubShapesTab->setItem(i++, 0, aItem);
149 for (i = 0; i < 9; i++) {
150 QTableWidgetItem* aItem = new QTableWidgetItem("");
151 aItem->setFlags(Qt::ItemIsEnabled);
152 aItem->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
153 mySubShapesTab->setItem(i, 1, aItem);
155 mySubShapesTab->setColumnWidth(0, 90);
156 mySubShapesTab->setColumnWidth(1, 70);
158 //mySubShapesTab->setMaximumWidth(170);
159 //mySubShapesTab->setMinimumHeight(300);
161 aSplitter->addWidget(mySubShapesTab);
164 QWidget* aTypeWgt = new QWidget(aSplitter);
165 QHBoxLayout* aTypeLayout = new QHBoxLayout(aTypeWgt);
166 aTypeLayout->setContentsMargins(3, 0, 3, 0);
168 aTypeLayout->addWidget(new QLabel(tr("Type:"), aTypeWgt));
169 myTypeLbl = new QLabel("", aTypeWgt);
170 aTypeLayout->addWidget(myTypeLbl);
172 aSplitter->addWidget(aTypeWgt);
174 myTypeParams = new QTextBrowser(aSplitter);
175 myTypeParams->setReadOnly(true);
176 myTypeParams->setFocusPolicy(Qt::NoFocus);
177 myTypeParams->viewport()->setBackgroundRole(QPalette::Window);
179 aSplitter->addWidget(myTypeParams);
181 aSplitter->setCollapsible(0, false);
182 aSplitter->setCollapsible(1, false);
183 aSplitter->setCollapsible(2, false);
184 aSplitter->setCollapsible(3, false);
187 aSizes << 10 << 140 << 10;
188 aSplitter->setSizes(aSizes);
190 setWidget(aSplitter);
192 connect(mySelectionMgr, SIGNAL(selectionChanged()), SLOT(onSelectionChanged()));
195 //********************************************************************
196 XGUI_InspectionPanel::~XGUI_InspectionPanel()
200 //********************************************************************
201 void XGUI_InspectionPanel::setSubShapeValue(SudShape theId, int theVal)
203 mySubShapesTab->item(theId, 1)->setText(QString::number(theVal));
206 //********************************************************************
207 void XGUI_InspectionPanel::clearContent()
210 for (int i = 0; i <= VertexId; i++) {
211 mySubShapesTab->item((SudShape)i, 1)->setText("");
213 myTypeLbl->setText("");
217 //********************************************************************
218 void XGUI_InspectionPanel::onSelectionChanged()
221 XGUI_Selection* aSelection = mySelectionMgr->selection();
222 QList<ModuleBase_ViewerPrsPtr> aSelectedList =
223 aSelection->getSelected(ModuleBase_ISelection::Viewer);
225 QList<ModuleBase_ViewerPrsPtr> anOBSelected =
226 aSelection->getSelected(ModuleBase_ISelection::Browser);
227 if (!anOBSelected.isEmpty())
228 ModuleBase_ISelection::appendSelected(anOBSelected, aSelectedList);
230 if (aSelectedList.count() > 0) {
231 ModuleBase_ViewerPrsPtr aPrs = aSelectedList.first();
232 TopoDS_Shape aShape = ModuleBase_Tools::getSelectedShape(aPrs);
233 if (aShape.IsNull()) {
234 ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aPrs->object());
236 GeomShapePtr aShpPtr = aRes->shape();
238 aShape = aShpPtr->impl<TopoDS_Shape>();
244 GeomShapePtr aShapePtr(new GeomAPI_Shape());
245 aShapePtr->setImpl(new TopoDS_Shape(aShape));
247 ModuleBase_ViewerPrsPtr aPrsCopy(new ModuleBase_ViewerPrs(aPrs->object(), aShapePtr));
248 setName(XGUI_Tools::generateName(aPrsCopy));
249 setShapeContent(aShape);
250 setShapeParams(aShape);
254 //********************************************************************
255 void XGUI_InspectionPanel::setName(const QString& theName)
257 myNameEdt->setText(theName);
260 //********************************************************************
261 void XGUI_InspectionPanel::setShapeContent(const TopoDS_Shape& theShape)
265 int iType, nbTypes[TopAbs_SHAPE];
266 for (iType = 0; iType < TopAbs_SHAPE; ++iType) {
269 nbTypes[theShape.ShapeType()]++;
271 TopTools_MapOfShape aMapOfShape;
272 aMapOfShape.Add(theShape);
273 TopTools_ListOfShape aListOfShape;
274 aListOfShape.Append(theShape);
276 TopTools_ListIteratorOfListOfShape itL(aListOfShape);
277 for (; itL.More(); itL.Next()) {
278 TopoDS_Shape sp = itL.Value();
279 TopoDS_Iterator it(sp);
280 for (; it.More(); it.Next()) {
281 TopoDS_Shape s = it.Value();
282 if (aMapOfShape.Add(s)) {
283 aListOfShape.Append(s);
284 nbTypes[s.ShapeType()]++;
288 setSubShapeValue(VertexId, nbTypes[TopAbs_VERTEX]);
289 setSubShapeValue(EdgeId, nbTypes[TopAbs_EDGE]);
290 setSubShapeValue(WireId, nbTypes[TopAbs_WIRE]);
291 setSubShapeValue(FaceId, nbTypes[TopAbs_FACE]);
292 setSubShapeValue(ShellId, nbTypes[TopAbs_SHELL]);
293 setSubShapeValue(SolidId, nbTypes[TopAbs_SOLID]);
294 setSubShapeValue(CompsolidId, nbTypes[TopAbs_COMPSOLID]);
295 setSubShapeValue(CompoundId, nbTypes[TopAbs_COMPOUND]);
296 setSubShapeValue(ShapeId, aMapOfShape.Extent());
298 catch (Standard_Failure) {
302 //********************************************************************
303 void XGUI_InspectionPanel::setShapeParams(const TopoDS_Shape& theShape)
305 GeomShapePtr aShape(new GeomAPI_Shape);
306 aShape->setImpl(new TopoDS_Shape(theShape));
308 switch (aShape->shapeType()) {
309 case GeomAPI_Shape::VERTEX:
310 fillVertex(aShape->vertex());
312 case GeomAPI_Shape::EDGE:
313 fillEdge(aShape->edge());
315 case GeomAPI_Shape::FACE:
316 fillFace(aShape->face());
318 case GeomAPI_Shape::SOLID:
319 fillSolid(aShape->solid());
321 case GeomAPI_Shape::WIRE:
322 fillWire(aShape->wire());
324 case GeomAPI_Shape::SHELL:
325 fillShell(aShape->shell());
327 case GeomAPI_Shape::COMPSOLID:
328 case GeomAPI_Shape::COMPOUND:
329 fillContainer(aShape);
334 //********************************************************************
335 void XGUI_InspectionPanel::fillVertex(const GeomVertexPtr& theVertex)
337 GeomPointPtr aPoint = theVertex->point();
339 myTypeLbl->setText(tr("Vertex"));
342 appendPointToParameters(tr("Coordinates"), aPoint, aParams);
343 setParamsText(aParams);
346 //********************************************************************
347 void XGUI_InspectionPanel::fillEdge(const GeomEdgePtr& theEdge)
350 if (theEdge->isDegenerated())
351 appendNamedValueToParameters(tr("Degenerated"), true, aParams);
353 GeomPointPtr aStartPnt = theEdge->firstPoint();
354 GeomPointPtr aEndPnt = theEdge->lastPoint();
355 bool addStartEndPoints = false;
357 if (theEdge->isLine()) {
358 myTypeLbl->setText(tr("Line segment"));
359 addStartEndPoints = true;
362 GeomCirclePtr aCircle = theEdge->circle();
364 addStartEndPoints = aStartPnt->distance(aEndPnt) >= Precision::Confusion();
365 if (addStartEndPoints)
366 myTypeLbl->setText("Arc of circle");
368 myTypeLbl->setText("Circle");
370 appendPointToParameters(tr("Center"), aCircle->center(), aParams);
371 appendDirToParameters(tr("Normal"), aCircle->normal(), aParams);
372 appendGroupNameToParameters(tr("Dimensions"), aParams);
373 appendNamedValueToParameters(tr("Radius"), aCircle->radius(), aParams);
376 GeomEllipsePtr anEllipse = theEdge->ellipse();
378 addStartEndPoints = aStartPnt->distance(aEndPnt) >= Precision::Confusion();
379 if (addStartEndPoints)
380 myTypeLbl->setText("Arc of ellipse");
382 myTypeLbl->setText("Ellipse");
384 appendPointToParameters(tr("Center"), anEllipse->center(), aParams);
385 appendDirToParameters(tr("Normal"), anEllipse->normal(), aParams);
386 appendGroupNameToParameters(tr("Dimensions"), aParams);
387 appendNamedValueToParameters(tr("Major radius"), anEllipse->majorRadius(), aParams);
388 appendNamedValueToParameters(tr("Minor radius"), anEllipse->minorRadius(), aParams);
392 myTypeLbl->setText(tr("Edge"));
396 if (addStartEndPoints) {
397 appendPointToParameters(tr("Start point"), aStartPnt, aParams);
398 appendPointToParameters(tr("End point"), aEndPnt, aParams);
400 setParamsText(aParams);
403 //********************************************************************
404 void XGUI_InspectionPanel::fillWire(const GeomWirePtr& theWire)
407 appendNamedValueToParameters(tr("Closed"), theWire->isClosed(), aParams);
409 // check the wire is a polygon
410 std::list<GeomPointPtr> aPolygonPoints;
411 if (theWire->isPolygon(aPolygonPoints)) {
412 myTypeLbl->setText(tr("Polygon"));
413 int aCornerIndex = 0;
414 for (std::list<GeomPointPtr>::const_iterator aPtIt = aPolygonPoints.begin();
415 aPtIt != aPolygonPoints.end(); ++aPtIt)
416 appendPointToParameters(tr("Point") + " " + QString::number(++aCornerIndex),
420 myTypeLbl->setText(tr("Wire"));
422 setParamsText(aParams);
425 //********************************************************************
426 void XGUI_InspectionPanel::fillFace(const GeomFacePtr& theFace)
429 // 1. Plane and planar faces
430 GeomPlanePtr aPlane = theFace->getPlane();
432 bool isCommonCase = true;
433 // Check face bounded by circle or ellipse
434 std::list<GeomShapePtr> aSubs = theFace->subShapes(GeomAPI_Shape::EDGE);
435 if (aSubs.size() == 1) {
436 GeomEdgePtr anEdge = aSubs.front()->edge();
437 if (anEdge->isCircle() || anEdge->isEllipse()) {
439 isCommonCase = false;
443 // Check face bounded by a single wire which is rectangle
444 aSubs = theFace->subShapes(GeomAPI_Shape::WIRE);
445 if (aSubs.size() == 1) {
446 GeomWirePtr aWire = aSubs.front()->wire();
447 std::list<GeomPointPtr> aCorners;
448 if (aWire->isRectangle(aCorners)) {
449 GeomPointPtr aBaseCorner = aCorners.front();
450 aCorners.pop_front();
452 double aWidth = aBaseCorner->distance(aCorners.front());
453 double aHeight = aBaseCorner->distance(aCorners.back());
455 myTypeLbl->setText(tr("Rectangle"));
456 appendPointToParameters(tr("Corner"), aBaseCorner, aParams);
457 appendDirToParameters(tr("Normal"), aPlane->direction(), aParams);
458 appendGroupNameToParameters(tr("Dimensions"), aParams);
459 appendNamedValueToParameters(tr("Width"), aWidth, aParams);
460 appendNamedValueToParameters(tr("Height"), aHeight, aParams);
461 setParamsText(aParams);
463 isCommonCase = false;
469 setPlaneType(tr("Plane"), aPlane);
473 GeomSpherePtr aSphere = theFace->getSphere();
475 setSphereType(tr("Sphere"), aSphere);
478 GeomCylinderPtr aCylinder = theFace->getCylinder();
480 setCylinderType(tr("Cylinder"), aCylinder);
483 GeomConePtr aCone = theFace->getCone();
485 setConeType(tr("Cone"), aCone);
488 GeomTorusPtr aTorus = theFace->getTorus();
490 setTorusType(tr("Torus"), aTorus);
493 myTypeLbl->setText(tr("Face"));
500 //********************************************************************
501 void XGUI_InspectionPanel::fillShell(const GeomShellPtr& theShell)
504 GeomSpherePtr aSphere = theShell->getSphere();
506 setSphereType(tr("Sphere"), aSphere);
509 GeomCylinderPtr aCylinder = theShell->getCylinder();
511 setCylinderType(tr("Cylinder"), aCylinder);
514 GeomConePtr aCone = theShell->getCone();
516 setConeType(tr("Cone"), aCone);
519 GeomTorusPtr aTorus = theShell->getTorus();
521 setTorusType(tr("Torus"), aTorus);
523 // 5. Axis-aligned/Rotated Box
524 GeomBoxPtr aBox = theShell->getParallelepiped();
526 if (aBox->isAxesAligned())
527 setBoxType(tr("Box"), aBox);
529 setRotatedBoxType(tr("Rotated Box"), aBox);
533 myTypeLbl->setText(tr("Shell"));
540 //********************************************************************
541 void XGUI_InspectionPanel::fillSolid(const GeomSolidPtr& theSolid)
544 GeomSpherePtr aSphere = theSolid->getSphere();
546 setSphereType(tr("Sphere"), aSphere);
549 GeomCylinderPtr aCylinder = theSolid->getCylinder();
551 setCylinderType(tr("Cylinder"), aCylinder);
554 GeomConePtr aCone = theSolid->getCone();
556 setConeType(tr("Cone"), aCone);
559 GeomTorusPtr aTorus = theSolid->getTorus();
561 setTorusType(tr("Torus"), aTorus);
563 // 5. Axis-aligned/Rotated Box
564 GeomBoxPtr aBox = theSolid->getParallelepiped();
566 if (aBox->isAxesAligned())
567 setBoxType(tr("Box"), aBox);
569 setRotatedBoxType(tr("Rotated Box"), aBox);
573 myTypeLbl->setText(tr("Solid"));
580 //********************************************************************
581 void XGUI_InspectionPanel::fillContainer(const GeomShapePtr& theShape)
583 if (theShape->shapeType() == GeomAPI_Shape::COMPSOLID)
584 myTypeLbl->setText("CompSolid");
585 else if (theShape->shapeType() == GeomAPI_Shape::COMPOUND)
586 myTypeLbl->setText("Compound");
589 TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
591 BRepBndLib::Add(aShape, aBB);
596 gp_Pnt aMinPnt = aBB.CornerMin();
597 GeomPointPtr aMinPoint(new GeomAPI_Pnt(aMinPnt.X(), aMinPnt.Y(), aMinPnt.Z()));
599 gp_Pnt aMaxPnt = aBB.CornerMax();
600 GeomPointPtr aMaxPoint(new GeomAPI_Pnt(aMaxPnt.X(), aMaxPnt.Y(), aMaxPnt.Z()));
603 appendGroupNameToParameters(tr("Bounding box"), aParams);
604 appendPointToParameters(tr("Minimal corner"), aMinPoint, aParams);
605 appendPointToParameters(tr("Maximal corner"), aMaxPoint, aParams);
608 void XGUI_InspectionPanel::setPlaneType(const QString& theTitle,
609 const std::shared_ptr<GeomAPI_Pln>& thePlane)
611 myTypeLbl->setText(theTitle);
613 appendPointToParameters(tr("Origin"), thePlane->location(), aParams);
614 appendDirToParameters(tr("Normal"), thePlane->direction(), aParams);
615 setParamsText(aParams);
618 void XGUI_InspectionPanel::setSphereType(const QString& theTitle,
619 const std::shared_ptr<GeomAPI_Sphere>& theSphere)
621 myTypeLbl->setText(theTitle);
623 appendPointToParameters(tr("Center"), theSphere->center(), aParams);
624 appendGroupNameToParameters(tr("Dimensions"), aParams);
625 appendNamedValueToParameters(tr("Radius"), theSphere->radius(), aParams);
626 setParamsText(aParams);
629 void XGUI_InspectionPanel::setCylinderType(const QString& theTitle,
630 const std::shared_ptr<GeomAPI_Cylinder>& theCyl)
632 myTypeLbl->setText(theTitle);
634 appendPointToParameters(tr("Position"), theCyl->location(), aParams);
635 appendDirToParameters(tr("Axis"), theCyl->axis(), aParams);
636 appendGroupNameToParameters(tr("Dimensions"), aParams);
637 appendNamedValueToParameters(tr("Radius"), theCyl->radius(), aParams);
638 appendNamedValueToParameters(tr("Height"), theCyl->height(), aParams);
639 setParamsText(aParams);
642 void XGUI_InspectionPanel::setConeType(const QString& theTitle,
643 const std::shared_ptr<GeomAPI_Cone>& theCone)
645 myTypeLbl->setText(theTitle);
647 appendPointToParameters(tr("Position"), theCone->location(), aParams);
648 appendDirToParameters(tr("Axis"), theCone->axis(), aParams);
649 appendGroupNameToParameters(tr("Dimensions"), aParams);
650 appendNamedValueToParameters(tr("Radius 1"), theCone->radius1(), aParams);
651 appendNamedValueToParameters(tr("Radius 2"), theCone->radius2(), aParams);
652 appendNamedValueToParameters(tr("Height"), theCone->height(), aParams);
653 setParamsText(aParams);
656 void XGUI_InspectionPanel::setTorusType(const QString& theTitle,
657 const std::shared_ptr<GeomAPI_Torus>& theTorus)
659 myTypeLbl->setText(theTitle);
661 appendPointToParameters(tr("Center"), theTorus->center(), aParams);
662 appendDirToParameters(tr("Axis"), theTorus->direction(), aParams);
663 appendGroupNameToParameters(tr("Dimensions"), aParams);
664 appendNamedValueToParameters(tr("Major radius"), theTorus->majorRadius(), aParams);
665 appendNamedValueToParameters(tr("Minor radius"), theTorus->minorRadius(), aParams);
666 setParamsText(aParams);
669 void XGUI_InspectionPanel::setBoxType(const QString& theTitle,
670 const std::shared_ptr<GeomAPI_Box>& theBox)
672 myTypeLbl->setText(theTitle);
674 appendPointToParameters(tr("Position"), theBox->axes()->origin(), aParams);
675 appendGroupNameToParameters(tr("Dimensions"), aParams);
676 appendNamedValueToParameters(tr("Width"), theBox->width(), aParams);
677 appendNamedValueToParameters(tr("Depth"), theBox->depth(), aParams);
678 appendNamedValueToParameters(tr("Height"), theBox->height(), aParams);
679 setParamsText(aParams);
682 void XGUI_InspectionPanel::setRotatedBoxType(const QString& theTitle,
683 const std::shared_ptr<GeomAPI_Box>& theBox)
685 myTypeLbl->setText(theTitle);
687 std::shared_ptr<GeomAPI_Ax3> anAxes = theBox->axes();
688 appendPointToParameters(tr("Position"), anAxes->origin(), aParams);
689 appendDirToParameters(tr("Z axis"), anAxes->normal(), aParams);
690 appendDirToParameters(tr("X axis"), anAxes->dirX(), aParams);
691 appendGroupNameToParameters(tr("Dimensions"), aParams);
692 appendNamedValueToParameters(tr("Width"), theBox->width(), aParams);
693 appendNamedValueToParameters(tr("Depth"), theBox->depth(), aParams);
694 appendNamedValueToParameters(tr("Height"), theBox->height(), aParams);
695 setParamsText(aParams);
699 void XGUI_InspectionPanel::setParamsText(const QString& theText)
701 myTypeParams->setText(theText);