Back to index

salome-geom  6.5.0
EntityGUI_FeatureDetectorDlg.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 // GEOM GEOMGUI : GUI for Geometry component
00024 // File   : EntityGUI_SketcherDlg.cxx
00025 // Author : Renaud NEDELEC, Open CASCADE S.A.S.
00026 
00027 
00028 #include <GEOMBase_Skeleton.h>
00029 #include <gp_Ax3.hxx>
00030 #include <QBitmap>
00031 
00032 class QLineEdit;
00033 class QCheckBox;
00034 class QGroupBox;
00035 class QPushButton;
00036 class QLabel;
00037 class QPoint;
00038 class DlgRef_3Radio;
00039 class DlgRef_1Sel;
00040 class DlgRef_1Sel1Frame;
00041 
00042 class gp_Pnt;
00043 class ShapeRec_FeatureDetector;
00044 
00045 //=================================================================================
00046 // class    : EntityGUI_Dlg
00047 // purpose  :
00048 //=================================================================================
00049 class EntityGUI_FeatureDetectorDlg : public GEOMBase_Skeleton
00050 { 
00051   Q_OBJECT
00052 
00053 public:
00054   EntityGUI_FeatureDetectorDlg(GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0);
00055   ~EntityGUI_FeatureDetectorDlg();
00056   
00057   bool                               acceptMouseEvent() const;
00058   void                               setStartPnt     ( const gp_Pnt& );
00059   void                               setEndPnt       ( const gp_Pnt& );
00060   int                                getConstructorId() {return myConstructorId;};
00061   
00062 protected:
00063   // redefined from GEOMBase_Helper
00064   virtual GEOM::GEOM_IOperations_ptr createOperation();
00065   virtual bool                       execute( ObjectList& );
00066   
00067 private:
00068   void                               Init();
00069   bool                               setSelectionRect();
00070   void                               showImageSample();
00071 
00072   
00073 private slots:
00074   void                               SelectionIntoArgument();
00075   void                               ConstructorsClicked( int );
00076 //   void                               onViewClicked( int );
00077   void                               onButtonClicked(); 
00078   void                               ClickOnOk();
00079   bool                               ClickOnApply();
00080   
00081   
00082 private:
00083   ShapeRec_FeatureDetector*          aDetector;
00084   
00085   gp_Ax3                             myWPlane;
00086   gp_Ax3                             aGlobalCS;
00087   
00088   GEOM::GeomObjPtr                   myFace;
00089   QString                            myFaceEntry;
00090   
00091   int                                myConstructorId;
00092   
00093   DlgRef_1Sel1Frame*                 mySelectionGroup; 
00094   DlgRef_1Sel*                       mySelWidget;
00095   
00096   // Output typeselection widget
00097   DlgRef_3Radio*                     myOutputGroup;;
00098   
00099   gp_Pnt                             myStartPnt;
00100   gp_Pnt                             myEndPnt;
00101   QRect                              myRect;
00102   
00103   // Picture dimensions and position
00104   int                                height;
00105   int                                width;
00106   double                             pictureLeft;
00107   double                             pictureTop;
00108 };