1 // Copyright (C) 2007-2012 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.
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 #ifndef ADVANCEDGUI_PIPETSHAPEDLG_H
21 #define ADVANCEDGUI_PIPETSHAPEDLG_H
23 #include <GEOMBase_Skeleton.h>
34 //=================================================================================
35 // class : AdvancedGUI_PipeTShapeDlg
37 //=================================================================================
38 class AdvancedGUI_PipeTShapeDlg: public GEOMBase_Skeleton {
42 AdvancedGUI_PipeTShapeDlg(GeometryGUI*, QWidget* = 0);
43 ~AdvancedGUI_PipeTShapeDlg();
46 // redefined from GEOMBase_Helper
47 virtual GEOM::GEOM_IOperations_ptr createOperation();
48 virtual bool isValid(QString&);
49 virtual bool execute(ObjectList&);
50 virtual void restoreSubShapes(SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
54 void enterEvent(QEvent*);
55 void resizeEvent(QResizeEvent *event);
56 void updateTshapeScreenshotLabel();
57 bool CheckCompatiblePosition(GEOM::GEOM_Object_var theP1,
58 GEOM::GEOM_Object_var theP2,
59 GEOM::GEOM_Object_var theP3, double theTolerance);
62 QPixmap imagePipeTShape;
63 QLabel* tshapeScreenShotLabel;
64 DlgRef_3Spin* MainTubeGroupParams;
65 DlgRef_3Spin* IncidentTubeGroupParams;
66 DlgRef_2Spin* ChamferGroupParams;
67 DlgRef_1Spin* FilletGroupParams;
68 DlgRef_6Sel* JunctionPointsSel;
70 QString CssNormal, CssAcceptable, CssRefused;
71 QCheckBox* HexMeshCheckBox;
72 GEOM::GEOM_Object_var myPoint1, myPoint2, myPoint3;
73 bool myOkPoint1, myOkPoint2, myOkPoint3;
75 ObjectList pipeTShapeGroupObjects;
80 void ActivateThisDialog();
81 void SelectionIntoArgument();
82 void SetEditCurrentArgument();
83 void DisplayPreview(const bool activate = false, const bool update = true,
84 const bool toRemoveFromEngine = true, const double lineWidth = -1,
85 const int displayMode = -1, const int color = -1);
86 virtual void processPreview();
87 void SetPosition(bool);
88 void ChamferOrFillet(bool);
89 void SetDoubleSpinBoxStep(double);
90 void ValueChangedInSpinBox( double );
91 void UpdatePicture(QWidget* old, QWidget* now);
92 void ApplyNewDimensions();
93 bool executeNoCheck( ObjectList& objects );
96 #endif // ADVANCEDGUI_PIPETSHAPEDLG_H