Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/geom.git] / src / GenerationGUI / GenerationGUI_PrismDlg.h
1 // Copyright (C) 2007-2012  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.
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_PrismDlg.h
25 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
26
27 #ifndef GENERATIONGUI_PRISMDLG_H
28 #define GENERATIONGUI_PRISMDLG_H
29
30 #include "GEOMBase_Skeleton.h"
31 #include "GEOM_GenericObjPtr.h"
32
33 class DlgRef_2Sel1Spin3Check1Spin;
34 class DlgRef_3Sel2Check3Spin;
35 class DlgRef_1Sel3Spin2Check1Spin;
36
37 //=================================================================================
38 // class    : GenerationGUI_PrismDlg
39 // purpose  :
40 //=================================================================================
41 class GenerationGUI_PrismDlg : public GEOMBase_Skeleton
42
43   Q_OBJECT
44
45 public:
46   GenerationGUI_PrismDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0 );
47   ~GenerationGUI_PrismDlg();
48   
49 protected:
50   // redefined from GEOMBase_Helper
51   virtual GEOM::GEOM_IOperations_ptr createOperation();
52   virtual bool                       isValid( QString& );
53   virtual bool                       execute( ObjectList& );    
54   virtual void                       addSubshapesToStudy();
55   virtual bool                       extractPrefix() const;
56
57 private:
58   void                               Init();
59   void                               enterEvent( QEvent* );
60  
61 private:
62   QList<GEOM::GeomObjPtr>            myBaseObjects;  /* Base shapes */
63   GEOM::GeomObjPtr                   myVec;  /* Vector, defining the direction */
64   GEOM::GeomObjPtr                   myPoint1, myPoint2;   /* Points for extrusion */ 
65   
66   DlgRef_2Sel1Spin3Check1Spin*       GroupVecH;
67   DlgRef_3Sel2Check3Spin*            Group2Points;
68   DlgRef_1Sel3Spin2Check1Spin*       GroupDXDYDZ;
69   
70 private slots:
71   void                               ClickOnOk();
72   bool                               ClickOnApply();
73   void                               ActivateThisDialog();
74   void                               SelectionIntoArgument();
75   void                               SetEditCurrentArgument();
76   void                               ConstructorsClicked( int );
77   void                               ValueChangedInSpinBox();
78   void                               SetDoubleSpinBoxStep( double );
79   void                               onReverse();
80   void                               onBothway();
81   void                               onScalePrism();
82 };
83
84 #endif // GENERATIONGUI_PRISMDLG_H