]> SALOME platform Git repositories - modules/geom.git/blob - src/GenerationGUI/GenerationGUI_PipeDlg.h
Salome HOME
Merge branch 'V7_7_BR' into hydro/imps_2015
[modules/geom.git] / src / GenerationGUI / GenerationGUI_PipeDlg.h
1 // Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 // GEOM GEOMGUI : GUI for Geometry component
24 // File   : GenerationGUI_PipeDlg.h
25 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
26 //
27 #ifndef GENERATIONGUI_PIPEDLG_H
28 #define GENERATIONGUI_PIPEDLG_H
29
30 #include "GEOMBase_Skeleton.h"
31 #include "GEOM_GenericObjPtr.h"
32
33 typedef std::map<QString, QList<GEOM::GeomObjPtr> > ObjectMap;
34
35
36 class DlgRef_3Sel1Check;
37 class DlgRef_3Sel2Check3Spin;
38
39 //=================================================================================
40 // class    : GenerationGUI_PipeDlg
41 // purpose  :
42 //=================================================================================
43 class GenerationGUI_PipeDlg : public GEOMBase_Skeleton
44
45   Q_OBJECT
46
47 public:
48   GenerationGUI_PipeDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0 );
49   ~GenerationGUI_PipeDlg();
50   
51 protected:
52   // redefined from GEOMBase_Helper
53   virtual GEOM::GEOM_IOperations_ptr createOperation();
54   virtual bool                       isValid( QString& );
55   virtual bool                       execute( ObjectList& );    
56   virtual void                       addSubshapesToStudy();
57   virtual bool                       extractPrefix() const;
58   virtual void                       restoreSubShapes
59                                  (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
60   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
61
62 private:
63   void                               Init();
64   void                               enterEvent( QEvent* );
65   void                               updateGenGroup();
66   void                               resetGenGroup
67                                         (QCheckBox *theGenGroup,
68                                          const bool isChecked,
69                                          const bool isClearPrefix);
70   void                               addGroups
71                                       (GEOM::ListOfGO_var &theResult);
72   
73 private:
74   QList<GEOM::GeomObjPtr>            myBaseObjects;  /* Base shapes */
75   GEOM::GeomObjPtr                   myPath; /* Shape, defining the path */
76   GEOM::GeomObjPtr                   myVec;  /* Vector, defining the constant binormal direction */
77   QList<GEOM::GeomObjPtr>            myLocations; /* Locations on the path corresponding specified list of the Base shapes */
78   
79   DlgRef_3Sel1Check*                 GroupPoints;
80   DlgRef_3Sel2Check3Spin*            GroupMakePoints;
81   QCheckBox                         *myGenGroupCheckGP;
82   QLabel                            *myPrefixLblGP;
83   QLineEdit                         *myPrefixEditGP;
84   QCheckBox                         *myStepByStepCheckGMP;
85   QCheckBox                         *myGenGroupCheckGMP;
86   QLabel                            *myPrefixLblGMP;
87   QLineEdit                         *myPrefixEditGMP;
88   ObjectMap                          myGroupObjectsMap;
89
90 private slots:
91   void                               ClickOnOk();
92   bool                               ClickOnApply();
93   void                               ActivateThisDialog();
94   void                               SelectionIntoArgument();
95   void                               SetEditCurrentArgument();
96   void                               ConstructorsClicked( int );
97   void                               SelectionTypeButtonClicked();
98   void                               GenGroupClicked(bool);
99   void                               StepByStepClicked(bool);
100 };
101
102 #endif // GENERATIONGUI_PIPEDLG_H