1 // Copyright (C) 2007-2021 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 #ifndef ADVANCEDGUI_PIPETSHAPEDLG_H
21 #define ADVANCEDGUI_PIPETSHAPEDLG_H
23 #include <GEOMBase_Skeleton.h>
36 class SalomeApp_DoubleSpinBox;
38 //=================================================================================
39 // class : AdvancedGUI_4Spin
41 //=================================================================================
42 class AdvancedGUI_4Spin : public QWidget
52 QGridLayout *gridLayout1;
58 SalomeApp_DoubleSpinBox *SpinBox1;
59 SalomeApp_DoubleSpinBox *SpinBox2;
60 SalomeApp_DoubleSpinBox *SpinBox3;
61 SalomeApp_DoubleSpinBox *SpinBox4;
64 //=================================================================================
65 // class : AdvancedGUI_PipeTShapeDlg
67 //=================================================================================
68 class AdvancedGUI_PipeTShapeDlg: public GEOMBase_Skeleton
73 AdvancedGUI_PipeTShapeDlg (GeometryGUI*, QWidget* = 0);
74 ~AdvancedGUI_PipeTShapeDlg();
77 // redefined from GEOMBase_Helper
78 virtual GEOM::GEOM_IOperations_ptr createOperation();
79 virtual bool isValid (QString&);
80 virtual bool execute (ObjectList&);
81 virtual void restoreSubShapes (SALOMEDS::SObject_ptr);
82 virtual QList<GEOM::GeomObjPtr> getSourceObjects();
86 void enterEvent (QEvent*);
87 void resizeEvent (QResizeEvent *event);
88 void updateLabelImgPipeTShape();
89 bool CheckCompatiblePosition (GEOM::GEOM_Object_var theP1,
90 GEOM::GEOM_Object_var theP2,
91 GEOM::GEOM_Object_var theP3, double theTolerance);
94 QPixmap imagePipeTShape;
95 QPixmap imageReduction;
96 QLabel* LabelImgPipeTShape;
97 QLabel* LabelImgReduction;
100 DlgRef_3Spin* MainTubeGroupParams;
101 DlgRef_3Spin* IncidentTubeGroupParams;
102 DlgRef_2Spin* ChamferGroupParams;
103 DlgRef_1Spin* FilletGroupParams;
104 QCheckBox* HexMeshCheckBox;
106 // Thickness reduction parameters
107 AdvancedGUI_4Spin* LReductionGroupParams;
108 AdvancedGUI_4Spin* RReductionGroupParams;
109 AdvancedGUI_4Spin* IReductionGroupParams;
111 // Position parameters
112 DlgRef_6Sel* JunctionPointsSel;
114 QString CssNormal, CssAcceptable, CssRefused;
115 GEOM::GEOM_Object_var myPoint1, myPoint2, myPoint3;
116 bool myOkPoint1, myOkPoint2, myOkPoint3;
117 ObjectList pipeTShapeGroupObjects;
122 void ActivateThisDialog();
123 void currentChanged (int);
124 void SelectionIntoArgument();
125 void SetEditCurrentArgument();
126 void DisplayPreview (const bool activate = false, const bool update = true,
127 const bool toRemoveFromEngine = true, const double lineWidth = -1,
128 const int displayMode = -1, const int color = -1);
129 virtual void processPreview();
130 void SetPosition (bool);
131 void ChamferOrFillet (bool);
132 void SetDoubleSpinBoxStep (double);
133 void ValueChangedInSpinBox (double);
134 void UpdatePicture (QWidget* old, QWidget* now);
135 void ApplyNewDimensions();
136 bool executeNoCheck (ObjectList& objects);
139 #endif // ADVANCEDGUI_PIPETSHAPEDLG_H