Salome HOME
Fix for bug 0019870(Import/Export should show current directory).
[modules/geom.git] / src / BlocksGUI / BlocksGUI_ExplodeDlg.h
1 //  GEOM GEOMGUI : GUI for Geometry component
2 //
3 //  Copyright (C) 2003  CEA
4 //
5 //  This library is free software; you can redistribute it and/or
6 //  modify it under the terms of the GNU Lesser General Public
7 //  License as published by the Free Software Foundation; either
8 //  version 2.1 of the License.
9 //
10 //  This library is distributed in the hope that it will be useful,
11 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
12 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 //  Lesser General Public License for more details.
14 //
15 //  You should have received a copy of the GNU Lesser General Public
16 //  License along with this library; if not, write to the Free Software
17 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
18 //
19 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 //
21 //
22 //
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