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
19 #ifndef ADVANCEDGUI_PIPETSHAPEDLG_H
20 #define ADVANCEDGUI_PIPETSHAPEDLG_H
22 #include <GEOMBase_Skeleton.h>
35 class SalomeApp_DoubleSpinBox;
37 //=================================================================================
38 // class : AdvancedGUI_4Spin
40 //=================================================================================
41 class AdvancedGUI_4Spin : public QWidget
51 QGridLayout *gridLayout1;
57 SalomeApp_DoubleSpinBox *SpinBox1;
58 SalomeApp_DoubleSpinBox *SpinBox2;
59 SalomeApp_DoubleSpinBox *SpinBox3;
60 SalomeApp_DoubleSpinBox *SpinBox4;
63 //=================================================================================
64 // class : AdvancedGUI_PipeTShapeDlg
66 //=================================================================================
67 class AdvancedGUI_PipeTShapeDlg: public GEOMBase_Skeleton
72 AdvancedGUI_PipeTShapeDlg (GeometryGUI*, QWidget* = 0);
73 ~AdvancedGUI_PipeTShapeDlg();
76 // redefined from GEOMBase_Helper
77 virtual GEOM::GEOM_IOperations_ptr createOperation();
78 virtual bool isValid (QString&);
79 virtual bool execute (ObjectList&);
80 virtual void restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
84 void enterEvent (QEvent*);
85 void resizeEvent (QResizeEvent *event);
86 void updateLabelImgPipeTShape();
87 bool CheckCompatiblePosition (GEOM::GEOM_Object_var theP1,
88 GEOM::GEOM_Object_var theP2,
89 GEOM::GEOM_Object_var theP3, double theTolerance);
92 QPixmap imagePipeTShape;
93 QPixmap imageReduction;
94 QLabel* LabelImgPipeTShape;
95 QLabel* LabelImgReduction;
98 DlgRef_3Spin* MainTubeGroupParams;
99 DlgRef_3Spin* IncidentTubeGroupParams;
100 DlgRef_2Spin* ChamferGroupParams;
101 DlgRef_1Spin* FilletGroupParams;
102 QCheckBox* HexMeshCheckBox;
104 // Thickness reduction parameters
105 AdvancedGUI_4Spin* LReductionGroupParams;
106 AdvancedGUI_4Spin* RReductionGroupParams;
107 AdvancedGUI_4Spin* IReductionGroupParams;
109 // Position parameters
110 DlgRef_6Sel* JunctionPointsSel;
112 QString CssNormal, CssAcceptable, CssRefused;
113 GEOM::GEOM_Object_var myPoint1, myPoint2, myPoint3;
114 bool myOkPoint1, myOkPoint2, myOkPoint3;
115 ObjectList pipeTShapeGroupObjects;
120 void ActivateThisDialog();
121 void currentChanged (int);
122 void SelectionIntoArgument();
123 void SetEditCurrentArgument();
124 void DisplayPreview (const bool activate = false, const bool update = true,
125 const bool toRemoveFromEngine = true, const double lineWidth = -1,
126 const int displayMode = -1, const int color = -1);
127 virtual void processPreview();
128 void SetPosition (bool);
129 void ChamferOrFillet (bool);
130 void SetDoubleSpinBoxStep (double);
131 void ValueChangedInSpinBox (double);
132 void UpdatePicture (QWidget* old, QWidget* now);
133 void ApplyNewDimensions();
134 bool executeNoCheck (ObjectList& objects);
137 #endif // ADVANCEDGUI_PIPETSHAPEDLG_H