Salome HOME
SMH: 3.0.0 preparation - merged and adopted version (POLYWORK+HEAD)
[modules/visu.git] / src / VISUGUI / VisuGUI_CutLinesDlg.h
index fd2fdc64c25bd8eeae0cb25e5aea89f26810d1d4..c33b15669dec0241fb601b5657ec135529b2f25a 100644 (file)
 #ifndef VISUGUI_CUTLINESDLG_H
 #define VISUGUI_CUTLINESDLG_H
 
-#include <qdialog.h>
+#include "VisuGUI_CutPlanesDlg.h"
+
 #include <qhbuttongroup.h>
-#include "VISU_PrsObject_i.hh"
-#include "VisuGUI_ScalarBarDlg.h"
+#include <qvalidator.h>
+
+class SUIT_ViewManager;
+
+namespace VISU{
+  class CutLines_i;
+}
 
 class VisuGUI_CutLinesDlg: public QDialog
 {
     Q_OBJECT
 
 public:
-    VisuGUI_CutLinesDlg();
-    ~VisuGUI_CutLinesDlg() {};
+    VisuGUI_CutLinesDlg (QWidget* parent, bool theIsCreation = true, bool theIsModal = true);
+    ~VisuGUI_CutLinesDlg();
+
+    void initFromPrsObject (VISU::CutLines_i* thePrs);
+    int  storeToPrsObject (VISU::CutLines_i* thePrs);
 
-    void initFromPrsObject(VISU::CutLines_i* thePrs);
-    void storeToPrsObject(VISU::CutLines_i* thePrs);
+    bool isGenerateTable() { return myCreateTable->isChecked(); }
+    bool isGenerateCurves() { return myCreateTable->isChecked() && myCurvesCheck->isChecked(); }
+
+protected slots:
+  void accept();
+  void reject();
 
 private slots:
-  void onPlaneSelect(int theId);
-  void onCutSelect(int theId);
-   
+  void onPlaneSelect (int theId);
+  void onCutSelect (int theId, bool theUpdate = true);
+  void setBaseDefault (bool theUpdate = true);
+  void setDefault (int all = -1);
+  void DrawTable();
+  void onValueChanged (int theRow, int theCol);
+  void onPreviewCheck (bool thePreview);
+  void onRotation (double theValue);
+  void onPlanePos (const QString& theValue);
+  //jfa tmp:void onWindowActivated (SUIT_ViewWindow*);
 
 private:
+  void createPlanes();
+  void deletePlanes();
+
   QHButtonGroup* mySelPlane;
-  QAD_SpinBoxDbl* myRotXSpn;
-  QAD_SpinBoxDbl* myRotYSpn;
+  QtxDblSpinBox* myRotXSpn;
+  QtxDblSpinBox* myRotYSpn;
   QLabel* myRotXLbl;
   QLabel* myRotYLbl;
-  QAD_SpinBoxDbl* myPosSpn;
+  QtxDblSpinBox* myPosSpn;
+  QLineEdit* myBasePlanePos;
+  QCheckBox* myCBSetDef;
+  QCheckBox* myCreateTable;
+  QCheckBox* myCurvesCheck;
 
-  QHButtonGroup* mySelPlane2;  
-  QAD_SpinBoxDbl* myNbSpn;
-  QAD_SpinBoxDbl* myRotXSpn2;
-  QAD_SpinBoxDbl* myRotYSpn2;
+  QHButtonGroup* mySelPlane2;
+  QtxDblSpinBox* myNbSpn;
+  QtxDblSpinBox* myRotXSpn2;
+  QtxDblSpinBox* myRotYSpn2;
   QLabel* myRotXLbl2;
   QLabel* myRotYLbl2;
-  QAD_SpinBoxDbl* myPosSpn2;
+  QtxDblSpinBox* myPosSpn2;
+  QTable* myPosTable;
+  bool hasInit;
+
+  QDoubleValidator *mydvalidator;
+  VISU::CutLines_i* myCutLines;
+
+  VisuGUI_ScalarBarPane* myScalarPane;
+
+  VISU::CutPlanes::Orientation getOrientaion (bool IsBasePlane = true);
+  void setOrientation (const VISU::CutPlanes::Orientation orient);
+  void setOrientation2 (const VISU::CutPlanes::Orientation orient);
+
+  SALOME_Actor* myPreviewActor;
+  QCheckBox* myPreviewCheck;
+
+  VISU::CutLines_i* myPrs;
+
+  //jfa tmp:SUIT_ViewManager *myMgr;
+  //jfa tmp:SUIT_ViewWindow *myStudyWnd;
+
+  bool myIsCreation;
+
+  static bool MYGenerateTable;
+  static bool MYGenerateCurve;
 };
 #endif // VISUGUI_CUTLINESDLG_H