]> SALOME platform Git repositories - modules/geom.git/blob - src/BlocksGUI/BlocksGUI_ExplodeDlg.h
Salome HOME
rollback IPAL8963 3.0.0: "Incorrect input data" message
[modules/geom.git] / src / BlocksGUI / BlocksGUI_ExplodeDlg.h
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  GEOM GEOMGUI : GUI for Geometry component
23 //  File   : BlocksGUI_ExplodeDlg.h
24 //  Author : Julia DOROVSKIKH
25 //  Module : GEOM
26 //
27 #ifndef DIALOGBOX_BLOCK_EXPLODE_H
28 #define DIALOGBOX_BLOCK_EXPLODE_H
29
30 #include "GEOM_BlocksGUI.hxx"
31
32 #include "GEOMBase_Skeleton.h"
33
34 class DlgRef_SpinBox;
35 class QTextEdit;
36 class QCheckBox;
37
38 //=================================================================================
39 // class    : BlocksGUI_ExplodeDlg
40 // purpose  :
41 //=================================================================================
42 class GEOM_BLOCKSGUI_EXPORT BlocksGUI_ExplodeDlg : public GEOMBase_Skeleton
43 {
44   Q_OBJECT
45
46 public:
47   BlocksGUI_ExplodeDlg (GeometryGUI*, QWidget* parent, bool modal = FALSE);
48   ~BlocksGUI_ExplodeDlg();
49
50 protected:
51   // redefined from GEOMBase_Helper
52   virtual GEOM::GEOM_IOperations_ptr createOperation();
53   virtual bool                       isValid (QString& msg);
54   virtual bool                       execute (ObjectList& objects);
55   virtual GEOM::GEOM_Object_ptr      getFather(GEOM::GEOM_Object_ptr theObj);
56
57   virtual const char*                getNewObjectName() const; 
58
59 private:
60   void Init();
61   void enterEvent (QEvent* e);
62
63   void activateSelection();
64
65   void updateButtonState();
66   bool isAllSubShapes() const;
67   int  shapeType() const;
68
69   void clearTemporary();
70
71 private:
72   int                        myConstructorId;
73
74   CORBA::Long                myNbBlocks;
75   GEOM::GEOM_Object_var      myObject;
76
77   ObjectList                 myTmpObjs;
78
79   QFrame*                    myGrp1;
80
81   QPushButton*               mySelBtn;
82   QLineEdit*                 mySelName;
83
84   DlgRef_SpinBox*            mySpinBoxMin;
85   DlgRef_SpinBox*            mySpinBoxMax;
86
87   QTextEdit*                 myBlocksNb;
88
89   QCheckBox*                 myCheckBtn;
90
91 private slots:
92   void ClickOnOk();
93   bool ClickOnApply();
94   void ActivateThisDialog();
95   void ConstructorsClicked (int constructorId);
96
97   void SelectionIntoArgument();
98   void SetEditCurrentArgument();
99
100   void SubShapeToggled();
101
102   void ValueChangedInSpinBox (double newValue);
103 };
104
105 #endif // DIALOGBOX_BLOCK_EXPLODE_H