1 // Copyright (C) 2015-2016 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"
30 #include "MeasureGUI_definitions.h"
39 #include <QtxIntSpinBox.h>
40 #include <QtxComboBox.h>
42 class Plot2d_Histogram;
44 //==========================================================================
45 // class : MeasureGUI_ShapeStatisticsDlg
47 //==========================================================================
49 class MEASUREGUI_EXPORT MeasureGUI_ShapeStatisticsDlg : public QDialog, public GEOMBase_Helper
54 MeasureGUI_ShapeStatisticsDlg( QWidget*, TopoDS_Shape aShape = TopoDS_Shape(), TopAbs_ShapeEnum aSubShapeType = TopAbs_SHAPE );
55 ~MeasureGUI_ShapeStatisticsDlg();
58 // redefined from GEOMBase_Helper
59 virtual GEOM::GEOM_IOperations_ptr createOperation();
60 virtual bool isValid (QString&);
61 virtual bool execute (ObjectList&);
62 virtual GEOM::GEOM_Object_ptr getFather (GEOM::GEOM_Object_ptr);
63 virtual QList<GEOM::GeomObjPtr> getSourceObjects();
66 void onEditMainShape();
67 void clickOnCompute();
69 void clickOnCreateGroups();
73 void fillTypes( bool, bool, bool );
74 void updateTypes( QList<GEOM::GeomObjPtr> theShapes );
75 TopAbs_ShapeEnum currentType();
78 SalomeApp_Application* myApp;
79 QLineEdit* myEditMainShape;
80 QtxComboBox* myCBTypes;
81 std::list<TopoDS_Shape> myShapes;
82 GEOM::GeomObjPtr myMainObj;
83 QtxIntSpinBox* myNbIntervals;
84 QGroupBox* myScalarRangeBox;
87 QPushButton* myButtonPlot;
88 QPushButton* myButtonCreateGr;
89 Plot2d_Histogram* myHistogram;
93 #endif // MEASUREGUI_SHAPESTATISTICSDLG_H