src/BlocksGUI/BlocksGUI_QuadFaceDlg.h

Go to the documentation of this file.
00001 //  GEOM GEOMGUI : GUI for Geometry component
00002 //
00003 //  Copyright (C) 2003  CEA
00004 //
00005 //  This library is free software; you can redistribute it and/or
00006 //  modify it under the terms of the GNU Lesser General Public
00007 //  License as published by the Free Software Foundation; either
00008 //  version 2.1 of the License.
00009 //
00010 //  This library is distributed in the hope that it will be useful,
00011 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 //  Lesser General Public License for more details.
00014 //
00015 //  You should have received a copy of the GNU Lesser General Public
00016 //  License along with this library; if not, write to the Free Software
00017 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00018 //
00019 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00020 //
00021 //
00022 //
00023 //  File   : BlocksGUI_QuadFaceDlg.h
00024 //  Author : Julia DOROVSKIKH
00025 //  Module : GEOM
00026 
00027 #ifndef DIALOGBOX_QUAD_FACE_H
00028 #define DIALOGBOX_QUAD_FACE_H
00029 
00030 #include "GEOMBase_Skeleton.h"
00031 
00032 //=================================================================================
00033 // class    : BlocksGUI_QuadFaceDlg
00034 // purpose  :
00035 //=================================================================================
00036 class BlocksGUI_QuadFaceDlg : public GEOMBase_Skeleton
00037 {
00038   Q_OBJECT
00039 
00040   enum { Vertex1, Vertex2, Vertex3, Vertex4,
00041       Edge12, Edge22,
00042       Edge14, Edge24, Edge34, Edge44 };
00043 
00044 public:
00045   BlocksGUI_QuadFaceDlg (GeometryGUI*, QWidget* parent, bool modal = FALSE);
00046   ~BlocksGUI_QuadFaceDlg();
00047 
00048 protected:
00049   // redefined from GEOMBase_Helper
00050   virtual GEOM::GEOM_IOperations_ptr createOperation();
00051   virtual                       bool isValid (QString& msg);
00052   virtual                       bool execute (ObjectList& objects);
00053 
00054 private:
00055   void Init();
00056   void enterEvent (QEvent* e);
00057 
00058   void createSelWg (const QString&, QPixmap&, QWidget*, const int);
00059   void activateSelection();
00060 
00061 private:
00062   int                     myConstructorId;
00063 
00064   GEOM::GEOM_Object_var   myShape1;
00065   GEOM::GEOM_Object_var   myShape2;
00066   GEOM::GEOM_Object_var   myShape3;
00067   GEOM::GEOM_Object_var   myShape4;
00068 
00069   QFrame*                 myGrp1;
00070   QFrame*                 myGrp2;
00071   QFrame*                 myGrp3;
00072 
00073   QMap<int, QPushButton*> mySelBtn;
00074   QMap<int, QLineEdit*>   mySelName;
00075 
00076 private slots:
00077   void ClickOnOk();
00078   bool ClickOnApply();
00079   void ActivateThisDialog();
00080   void ConstructorsClicked( int constructorId );
00081 
00082   void SelectionIntoArgument();
00083   void SetEditCurrentArgument();
00084 };
00085 
00086 #endif // DIALOGBOX_QUAD_FACE_H