src/BlocksGUI/BlocksGUI_TrsfDlg.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_TrsfDlg.h
00024 //  Author : Julia DOROVSKIKH
00025 //  Module : GEOM
00026 
00027 #ifndef DIALOGBOX_BLOCK_MULTITRSF_H
00028 #define DIALOGBOX_BLOCK_MULTITRSF_H
00029 
00030 #include "GEOMBase_Skeleton.h"
00031 
00032 class DlgRef_SpinBox;
00033 
00034 //=================================================================================
00035 // class    : BlocksGUI_TrsfDlg
00036 // purpose  :
00037 //=================================================================================
00038 class BlocksGUI_TrsfDlg : public GEOMBase_Skeleton
00039 {
00040   Q_OBJECT
00041 
00042   enum { MainObj1, Face1, Face2, MainObj2, Face1U, Face2U, Face1V, Face2V };
00043   enum { SpinBox1, SpinBox2U, SpinBox2V };
00044 
00045 public:
00046   BlocksGUI_TrsfDlg (GeometryGUI*, QWidget* parent, bool modal = FALSE);
00047   ~BlocksGUI_TrsfDlg();
00048 
00049 protected:
00050   // redefined from GEOMBase_Helper
00051   virtual GEOM::GEOM_IOperations_ptr createOperation();
00052   virtual bool                       isValid (QString& msg);
00053   virtual bool                       execute (ObjectList& objects);
00054 
00055 private:
00056   void Init();
00057   void enterEvent (QEvent* e);
00058 
00059   void createSelWg (const QString&, QPixmap&, QWidget*, const int);
00060   void activateSelection();
00061   void enableWidgets();
00062 
00063 private:
00064   int                        myConstructorId;
00065 
00066   GEOM::GEOM_Object_var      myShape;
00067   QMap<int, int>             myFaces;
00068 
00069   QFrame*                    myGrp1;
00070   QFrame*                    myGrp2;
00071 
00072   QMap<int, QPushButton*>    mySelBtn;
00073   QMap<int, QLineEdit*>      mySelName;
00074   QMap<int, DlgRef_SpinBox*> mySpinBox;
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   void ValueChangedInSpinBox (double newValue);
00086 };
00087 
00088 #endif // DIALOGBOX_BLOCK_MULTITRSF_H