1 // Copyright (C) 2015 CEA/DEN, EDF R&D, OPEN CASCADE
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 email : webmaster.salome@opencascade.com
20 // GEOM GEOMGUI : GUI for Geometry component
21 // File : MeasureGUI_ShapeStatisticsDlg.h
22 // Author : Alexander KOVALEV, Open CASCADE (alexander.kovalev@opencascade.com)
24 #ifndef MEASUREGUI_SHAPESTATISTICSDLG_H
25 #define MEASUREGUI_SHAPESTATISTICSDLG_H
28 #include <GEOMBase_Helper.h>
29 #include "GEOM_GenericObjPtr.h"
38 #include <QtxIntSpinBox.h>
39 #include <QtxComboBox.h>
41 class Plot2d_Histogram;
43 //==========================================================================
44 // class : MeasureGUI_ShapeStatisticsDlg
46 //==========================================================================
48 class MeasureGUI_ShapeStatisticsDlg : public QDialog, public GEOMBase_Helper
53 MeasureGUI_ShapeStatisticsDlg( QWidget*, TopoDS_Shape aShape = TopoDS_Shape(), TopAbs_ShapeEnum aSubShapeType = TopAbs_SHAPE );
54 ~MeasureGUI_ShapeStatisticsDlg();
57 // redefined from GEOMBase_Helper
58 virtual GEOM::GEOM_IOperations_ptr createOperation();
59 virtual bool isValid (QString&);
60 virtual bool execute (ObjectList&);
61 virtual GEOM::GEOM_Object_ptr getFather (GEOM::GEOM_Object_ptr);
62 virtual QList<GEOM::GeomObjPtr> getSourceObjects();
65 void onEditMainShape();
66 void clickOnCompute();
68 void clickOnCreateGroups();
72 void fillTypes( bool, bool, bool );
73 void updateTypes( QList<GEOM::GeomObjPtr> theShapes );
74 TopAbs_ShapeEnum currentType();
77 SalomeApp_Application* myApp;
78 QLineEdit* myEditMainShape;
79 QtxComboBox* myCBTypes;
80 std::list<TopoDS_Shape> myShapes;
81 GEOM::GeomObjPtr myMainObj;
82 QtxIntSpinBox* myNbIntervals;
83 QGroupBox* myScalarRangeBox;
86 QPushButton* myButtonPlot;
87 QPushButton* myButtonCreateGr;
88 Plot2d_Histogram* myHistogram;
92 #endif // MEASUREGUI_SHAPESTATISTICSDLG_H