src/BlocksGUI/BlocksGUI_ExplodeDlg.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_ExplodeDlg.h
00024 //  Author : Julia DOROVSKIKH
00025 //  Module : GEOM
00026 
00027 #ifndef DIALOGBOX_BLOCK_EXPLODE_H
00028 #define DIALOGBOX_BLOCK_EXPLODE_H
00029 
00030 #include "GEOMBase_Skeleton.h"
00031 
00032 class DlgRef_SpinBox;
00033 class QTextEdit;
00034 class QCheckBox;
00035 
00036 //=================================================================================
00037 // class    : BlocksGUI_ExplodeDlg
00038 // purpose  :
00039 //=================================================================================
00040 class BlocksGUI_ExplodeDlg : public GEOMBase_Skeleton
00041 {
00042   Q_OBJECT
00043 
00044 public:
00045   BlocksGUI_ExplodeDlg (GeometryGUI*, QWidget* parent, bool modal = FALSE);
00046   ~BlocksGUI_ExplodeDlg();
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   virtual GEOM::GEOM_Object_ptr      getFather(GEOM::GEOM_Object_ptr theObj);
00054 
00055   virtual const char*                getNewObjectName() const; 
00056 
00057 private:
00058   void Init();
00059   void enterEvent (QEvent* e);
00060 
00061   void activateSelection();
00062 
00063   void updateButtonState();
00064   bool isAllSubShapes() const;
00065   int  shapeType() const;
00066 
00067   void clearTemporary();
00068 
00069 private:
00070   int                        myConstructorId;
00071 
00072   CORBA::Long                myNbBlocks;
00073   GEOM::GEOM_Object_var      myObject;
00074 
00075   ObjectList                 myTmpObjs;
00076 
00077   QFrame*                    myGrp1;
00078 
00079   QPushButton*               mySelBtn;
00080   QLineEdit*                 mySelName;
00081 
00082   DlgRef_SpinBox*            mySpinBoxMin;
00083   DlgRef_SpinBox*            mySpinBoxMax;
00084 
00085   QTextEdit*                 myBlocksNb;
00086 
00087   QCheckBox*                 myCheckBtn;
00088 
00089 private slots:
00090   void ClickOnOk();
00091   bool ClickOnApply();
00092   void ActivateThisDialog();
00093   void ConstructorsClicked (int constructorId);
00094 
00095   void SelectionIntoArgument();
00096   void SetEditCurrentArgument();
00097 
00098   void SubShapeToggled();
00099 
00100   void ValueChangedInSpinBox (double newValue);
00101 };
00102 
00103 #endif // DIALOGBOX_BLOCK_EXPLODE_H