Salome HOME
5d6e457ae9dda5876d306033eb3d5f0e38db0ada
[modules/geom.git] / src / EntityGUI / EntityGUI_FeatureDetectorDlg.h
1 // This library is free software; you can redistribute it and/or
2 // modify it under the terms of the GNU Lesser General Public
3 // License as published by the Free Software Foundation; either
4 // version 2.1 of the License.
5 //
6 // This library is distributed in the hope that it will be useful,
7 // but WITHOUT ANY WARRANTY; without even the implied warranty of
8 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9 // Lesser General Public License for more details.
10 //
11 // You should have received a copy of the GNU Lesser General Public
12 // License along with this library; if not, write to the Free Software
13 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
14 //
15 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
16 //
17
18 // GEOM GEOMGUI : GUI for Geometry component
19 // File   : EntityGUI_SketcherDlg.cxx
20 // Author : Renaud NEDELEC, Open CASCADE S.A.S.
21
22
23 #include <GEOMBase_Skeleton.h>
24 #include <gp_Ax3.hxx>
25
26 class QLineEdit;
27 class QCheckBox;
28 class QGroupBox;
29 class QPushButton;
30 class QLabel;
31 class QPoint;
32 class DlgRef_3Radio;
33 class DlgRef_1Sel;
34
35 class gp_Pnt;
36
37 //=================================================================================
38 // class    : EntityGUI_Dlg
39 // purpose  :
40 //=================================================================================
41 class EntityGUI_FeatureDetectorDlg : public GEOMBase_Skeleton
42
43   Q_OBJECT
44
45 public:
46   EntityGUI_FeatureDetectorDlg(GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0);
47   ~EntityGUI_FeatureDetectorDlg();
48   
49   bool                               acceptMouseEvent() const;
50 //   void                               OnPointSelected( const gp_Pnt& );
51   void                               setStartPnt    ( const gp_Pnt& );
52   void                               setEndPnt      ( const gp_Pnt& );
53   int                                getConstructorId() {return myConstructorId;};
54   
55 protected:
56   // redefined from GEOMBase_Helper
57   virtual GEOM::GEOM_IOperations_ptr createOperation();
58   virtual bool                       execute( ObjectList& );
59   
60 private:
61   void                               Init();
62
63   
64 private slots:
65   void                               SetEditCurrentArgument();
66   void                               SelectionIntoArgument();
67   void                               ConstructorsClicked( int );
68 //   void                               onViewClicked( int );
69   void                               onButtonToggled( bool ); 
70   void                               ClickOnOk();
71   bool                               ClickOnApply();
72   
73   
74 private:
75   GEOM::GeomObjPtr                   myFace;
76   QString                            myFaceEntry;
77   
78   int                                myConstructorId;
79   
80   QGroupBox*                         mySelectionGroup;
81   
82   QLabel*                            mySnapshotLabel;
83   
84   DlgRef_1Sel*                       mySelWidget;
85   
86   gp_Pnt                             myStartPnt;
87   gp_Pnt                             myEndPnt;
88   
89   gp_Ax3                             myWPlane;
90   gp_Ax3                             aGlobalCS;
91   
92   QPushButton*                       myPushButton;
93   QPushButton*                       mySelButton;
94   
95   QLineEdit*                         myLineEdit;
96   
97   DlgRef_3Radio*                     myOutputGroup;;
98
99 };