Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
AdvancedGUI_PipeTShapeDlg.h
Go to the documentation of this file.
1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 
20 #ifndef ADVANCEDGUI_PIPETSHAPEDLG_H
21 #define ADVANCEDGUI_PIPETSHAPEDLG_H
22 
23 #include <GEOMBase_Skeleton.h>
24 
25 class DlgRef_1Spin;
26 class DlgRef_2Spin;
27 class DlgRef_3Spin;
28 class DlgRef_4Spin;
29 class DlgRef_3Sel;
30 class DlgRef_6Sel;
31 class QCheckBox;
32 class QLineEdit;
33 class QLabel;
34 class QGridLayout;
35 class QGroupBox;
36 class SalomeApp_DoubleSpinBox;
37 
38 //=================================================================================
39 // class : AdvancedGUI_4Spin
40 // purpose :
41 //=================================================================================
42 class AdvancedGUI_4Spin : public QWidget
43 {
44  Q_OBJECT
45 
46  public:
49 
50  public:
52  QGridLayout *gridLayout1;
53 
54  QLabel *TextLabel1;
55  QLabel *TextLabel2;
56  QLabel *TextLabel3;
57  QLabel *TextLabel4;
58  SalomeApp_DoubleSpinBox *SpinBox1;
59  SalomeApp_DoubleSpinBox *SpinBox2;
60  SalomeApp_DoubleSpinBox *SpinBox3;
61  SalomeApp_DoubleSpinBox *SpinBox4;
62 };
63 
64 //=================================================================================
65 // class : AdvancedGUI_PipeTShapeDlg
66 // purpose :
67 //=================================================================================
69 {
70  Q_OBJECT
71 
72 public:
75 
76 protected:
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::Study_ptr, SALOMEDS::SObject_ptr);
82  virtual QList<GEOM::GeomObjPtr> getSourceObjects();
83 
84 private:
85  void Init();
86  void enterEvent (QEvent*);
87  void resizeEvent (QResizeEvent *event);
89  bool CheckCompatiblePosition (GEOM::GEOM_Object_var theP1,
90  GEOM::GEOM_Object_var theP2,
91  GEOM::GEOM_Object_var theP3, double theTolerance);
92 
93 private:
94  QPixmap imagePipeTShape;
95  QPixmap imageReduction;
98 
99  // Main parameters
104  QCheckBox* HexMeshCheckBox;
105 
106  // Thickness reduction parameters
110 
111  // Position parameters
113 
115  GEOM::GEOM_Object_var myPoint1, myPoint2, myPoint3;
118 
119 private slots:
120  void ClickOnOk();
121  bool ClickOnApply();
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);
137 };
138 
139 #endif // ADVANCEDGUI_PIPETSHAPEDLG_H