// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
// File : OperationGUI_ChamferDlg.h
// Author : Damien COQUERET
// Module : GEOM
-// $Header$
#ifndef DIALOGBOX_CHAMFER_H
#define DIALOGBOX_CHAMFER_H
#include "GEOMBase_Skeleton.h"
-#include "DlgRef_1Sel2Spin.h"
+#include <TColStd_IndexedMapOfInteger.hxx>
-#include "OperationGUI.h"
+class DlgRef_SpinBox;
//=================================================================================
// class : OperationGUI_ChamferDlg
{
Q_OBJECT
-public:
- OperationGUI_ChamferDlg(QWidget* parent = 0, const char* name = 0, OperationGUI* theOperationGUI = 0, SALOME_Selection* Sel = 0, Handle(AIS_InteractiveContext) ic = 0, bool modal = FALSE, WFlags fl = 0);
- ~OperationGUI_ChamferDlg();
+ enum { MainObj1, MainObj2, Face1, Face2, MainObj3, Faces };
+ enum { SpinBox1, SpinBox21, SpinBox22, SpinBox31, SpinBox32 };
-private :
- void Init(Handle(AIS_InteractiveContext) ic);
- void enterEvent(QEvent* e);
- void closeEvent(QCloseEvent* e);
- void MakeFilletSimulationAndDisplay();
+public:
+ OperationGUI_ChamferDlg(GeometryGUI* theGeometryGUI, QWidget* parent);
+ virtual ~OperationGUI_ChamferDlg();
- void ResetStateOfDialog();
- void MakePreview();
+protected:
+ // redefined from GEOMBase_Helper
+ virtual GEOM::GEOM_IOperations_ptr createOperation();
+ virtual bool isValid( QString& msg );
+ virtual bool execute( ObjectList& objects );
- OperationGUI* myOperationGUI;
+private slots:
+ void ClickOnOk();
+ bool ClickOnApply();
+ void ActivateThisDialog();
+ void LineEditReturnPressed();
+ void SelectionIntoArgument();
+ void SetEditCurrentArgument();
+ void ValueChangedInSpinBox( double newValue );
+ void ConstructorsClicked( int constructorId );
- int myConstructorId; /* Current constructor id = radio button id */
+private:
+ void Init();
+ void enterEvent( QEvent* e );
+ void reset();
+ void createSelWg( const QString&, QPixmap&, QWidget*, const int );
+ int getConstructorId() const;
+ void activateSelection();
+ void enableWidgets();
- /* Interactive and local context management see also : bool myUseLocalContext() */
- Handle(AIS_InteractiveContext) myIC; /* Interactive context */
- Standard_Integer myLocalContextId; /* identify a local context used by this method */
- bool myUseLocalContext; /* true when this method as opened a local context */
+private:
+ int myConstructorId;
- TopoDS_Shape myShape;
- bool myOkShape;
- char* myShapeIOR;
- int myShapeType;
- double myD1;
- double myD2;
+ GEOM::GEOM_Object_var myShape;
+ QMap< int, int > myFace; // indexes of faces from second tab ( Face1,2 )
+ TColStd_IndexedMapOfInteger myFaces; // indexes of faces from first tab ( Faces )
- DlgRef_1Sel2Spin* Group1;
- DlgRef_1Sel2Spin* Group2;
- DlgRef_1Sel2Spin* Group3;
-
-private slots:
- void ClickOnOk();
- void ClickOnApply();
- void ClickOnCancel();
- void ActivateThisDialog();
- void DeactivateActiveDialog();
- void LineEditReturnPressed();
- void SelectionIntoArgument();
- void SetEditCurrentArgument();
- void ValueChangedInSpinBox(double newValue);
- void ConstructorsClicked(int constructorId);
+ QFrame* myGrp1;
+ QFrame* myGrp2;
+ QFrame* myGrp3;
+ QMap< int, QPushButton* > mySelBtn;
+ QMap< int, QLineEdit* > mySelName;
+ QMap< int, DlgRef_SpinBox* > mySpinBox;
};
#endif // DIALOGBOX_CHAMFER_H
-