Salome HOME
Internal issue 0022865: Restructurization of Partition packages.
[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 #include <QBitmap>
26
27 class QLineEdit;
28 class QCheckBox;
29 class QGroupBox;
30 class QPushButton;
31 class QLabel;
32 class QPoint;
33 class DlgRef_3Radio;
34 class DlgRef_1Sel;
35
36 class gp_Pnt;
37 class ShapeRec_FeatureDetector;
38
39 //=================================================================================
40 // class    : EntityGUI_Dlg
41 // purpose  :
42 //=================================================================================
43 class EntityGUI_FeatureDetectorDlg : public GEOMBase_Skeleton
44
45   Q_OBJECT
46
47 public:
48   EntityGUI_FeatureDetectorDlg(GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0);
49   ~EntityGUI_FeatureDetectorDlg();
50   
51   bool                               acceptMouseEvent() const;
52   void                               setStartPnt     ( const gp_Pnt& );
53   void                               setEndPnt       ( const gp_Pnt& );
54   int                                getConstructorId() {return myConstructorId;};
55   
56 protected:
57   // redefined from GEOMBase_Helper
58   virtual GEOM::GEOM_IOperations_ptr createOperation();
59   virtual bool                       execute( ObjectList& );
60   
61 private:
62   void                               Init();
63   bool                               setSelectionRect();
64   void                               showImageSample();
65
66   
67 private slots:
68   void                               SelectionIntoArgument();
69   void                               ConstructorsClicked( int );
70 //   void                               onViewClicked( int );
71   void                               onButtonClicked(); 
72   void                               ClickOnOk();
73   bool                               ClickOnApply();
74   
75   
76 private:
77   ShapeRec_FeatureDetector*          aDetector;
78   
79   gp_Ax3                             myWPlane;
80   gp_Ax3                             aGlobalCS;
81   
82   GEOM::GeomObjPtr                   myFace;
83   QString                            myFaceEntry;
84   
85   int                                myConstructorId;
86   
87   QGroupBox*                         mySelectionGroup;
88   
89   QLabel*                            mySnapshotLabel;
90   QLabel*                            myImgSampleLabel;
91   
92   DlgRef_1Sel*                       mySelWidget;
93   
94   gp_Pnt                             myStartPnt;
95   gp_Pnt                             myEndPnt;
96   QRect                              myRect;
97   
98   QPushButton*                       mySelButton;
99   QLineEdit*                         myLineEdit;
100   QPushButton*                       myPushButton; 
101   
102   // Picture dimensions and position
103   int                                height;
104   int                                width;
105   double                             pictureLeft;
106   double                             pictureTop;
107   
108   // Output slection widget
109   DlgRef_3Radio*                     myOutputGroup;;
110
111 };