Salome HOME
Merge with version on tag OCC-V2_1_0d
[modules/geom.git] / src / PrimitiveGUI / PrimitiveGUI_ConeDlg.h
index 20ea84f8866e34ed4132dbe748d0e2ea421a5bc5..4cd7f5b88dc2f35a94730548980ad5cd81c8c3fa 100644 (file)
 #include "DlgRef_2Sel3Spin.h"
 #include "DlgRef_3Spin.h"
 
-#include "PrimitiveGUI.h"
-
-#include "GEOM_EdgeFilter.hxx"
-#include "GEOM_ShapeTypeFilter.hxx"
-
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
-
 //=================================================================================
 // class    : PrimitiveGUI_ConeDlg
 // purpose  :
@@ -50,45 +42,40 @@ class PrimitiveGUI_ConeDlg : public GEOMBase_Skeleton
     Q_OBJECT
 
 public:
-    PrimitiveGUI_ConeDlg(QWidget* parent = 0, const char* name = 0, PrimitiveGUI* thePrimitiveGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
+    PrimitiveGUI_ConeDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
     ~PrimitiveGUI_ConeDlg();
 
+protected:
+    // redefined from GEOMBase_Helper
+    virtual GEOM::GEOM_IOperations_ptr createOperation();
+    virtual bool isValid( QString& );
+    virtual bool execute( ObjectList& objects );
+
+    virtual void closeEvent( QCloseEvent* e );
+
 private:
     void Init();
     void enterEvent(QEvent* e);
-    void MakeConeSimulationAndDisplay();
-
-    PrimitiveGUI* myPrimitiveGUI;
-
-    double step;
-    int myConstructorId;
-    Handle(GEOM_ShapeTypeFilter) myVertexFilter;
-    Handle(GEOM_EdgeFilter) myEdgeFilter;  /* Filter selection */
-
-    gp_Pnt myPoint1;   /* topology used  */
-    gp_Dir myDir;
-    bool myOkPoint1;   /* to check when arguments is defined */
-    bool myOkDir;
-
-    Standard_Real myRadius1;
-    Standard_Real myRadius2; 
-    Standard_Real myHeight;
-    bool myOkRadius1;
-    bool myOkRadius2;
-    bool myOkHeight;
-
+    double getRadius1() const;
+    double getRadius2() const;
+    double getHeight() const;
+    
+    GEOM::GEOM_Object_var myPoint, myDir;
+    
     DlgRef_2Sel3Spin* GroupPoints;
     DlgRef_3Spin* GroupDimensions;
 
 private slots:
     void ClickOnOk();
-    void ClickOnApply();
+    bool ClickOnApply();
+    void ClickOnCancel();
     void ActivateThisDialog();
+    void DeactivateActiveDialog();
     void LineEditReturnPressed();
     void SelectionIntoArgument();
     void SetEditCurrentArgument();
-    void ConstructorsClicked(int constructorId);
-    void ValueChangedInSpinBox(double newValue);
+    void ConstructorsClicked(int);
+    void ValueChangedInSpinBox();
 
 };