Salome HOME
Fix of issue 0020593: EDF 885 VISU: Unchecking Filter by Scalar does not remove white...
[modules/visu.git] / src / VISUGUI / VisuGUI_CutLinesDlg.h
index 596798bd7ea83ffd45c9a51f1b5d9db0d613464e..a0e5565ca20a636cb89d488b25afac466863701a 100644 (file)
@@ -1,42 +1,48 @@
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  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.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //  File   : VisuGUI_CutLinesDlg.h
 //  Author : VSV
 //  Module : VISU
-
+//
 #ifndef VISUGUI_CUTLINESDLG_H
 #define VISUGUI_CUTLINESDLG_H
 
 #include "VisuGUI_CutPlanesDlg.h"
 
-#include <qhbuttongroup.h>
-#include <qvalidator.h>
+#include <QCheckBox>
+
+class QLineEdit;
+class QTabWidget;
 
 class SUIT_ViewManager;
 class SalomeApp_Module;
+class VisuGUI_InputPane;
 
-namespace VISU{
+namespace VISU
+{
   class CutLines_i;
 }
 
-class VisuGUI_CutLinesDlg: public QDialog
+class VisuGUI_CutLinesDlg: public VisuGUI_ScalarBarBaseDlg
 {
     Q_OBJECT
 
@@ -44,12 +50,17 @@ public:
     VisuGUI_CutLinesDlg (SalomeApp_Module* theModule);
     ~VisuGUI_CutLinesDlg();
 
-    void initFromPrsObject (VISU::CutLines_i* thePrs);
-    int  storeToPrsObject (VISU::CutLines_i* thePrs);
+    virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
+                                   bool theInit );
+
+    virtual int  storeToPrsObject(VISU::ColoredPrs3d_i* thePrs);
 
     bool isGenerateTable() { return myCreateTable->isChecked(); }
     bool isGenerateCurves() { return myCreateTable->isChecked() && myCurvesCheck->isChecked(); }
 
+protected:
+  virtual QString GetContextHelpFilePath();
 protected slots:
   void accept();
   void reject();
@@ -65,39 +76,38 @@ private slots:
   void onAllCurvesInvertedCheck(bool theInvert);
   void onRotation (double theValue);
   void onPlanePos (const QString& theValue);
-  void onHelp();
-  //jfa tmp:void onWindowActivated (SUIT_ViewWindow*);
 
 private:
   void createPlanes();
   void deletePlanes();
   void updateGlyphs(bool update);
 
-  QHButtonGroup* mySelPlane;
-  QtxDblSpinBox* myRotXSpn;
-  QtxDblSpinBox* myRotYSpn;
+  QButtonGroup* mySelPlane;
+  QtxDoubleSpinBox* myRotXSpn;
+  QtxDoubleSpinBox* myRotYSpn;
   QLabel* myRotXLbl;
   QLabel* myRotYLbl;
-  QtxDblSpinBox* myPosSpn;
+  QtxDoubleSpinBox* myPosSpn;
   QLineEdit* myBasePlanePos;
   QCheckBox* myCBSetDef;
   QCheckBox* myCreateTable;
   QCheckBox* myCurvesCheck;
 
-  QHButtonGroup* mySelPlane2;
-  QtxDblSpinBox* myNbSpn;
-  QtxDblSpinBox* myRotXSpn2;
-  QtxDblSpinBox* myRotYSpn2;
+  QButtonGroup* mySelPlane2;
+  QtxDoubleSpinBox* myNbSpn;
+  QtxDoubleSpinBox* myRotXSpn2;
+  QtxDoubleSpinBox* myRotYSpn2;
   QLabel* myRotXLbl2;
   QLabel* myRotYLbl2;
-  QtxDblSpinBox* myPosSpn2;
-  QTable* myPosTable;
+  QtxDoubleSpinBox* myPosSpn2;
+  QTableWidget* myPosTable;
   bool hasInit;
 
   QDoubleValidator *mydvalidator;
-  VISU::CutLines_i* myCutLines;
+  SALOME::GenericObjPtr<VISU::CutLines_i> myCutLines;
 
-  VisuGUI_ScalarBarPane* myScalarPane;
+  QTabWidget*            myTabBox;
+  VisuGUI_InputPane*     myInputPane;
 
   VISU::CutPlanes::Orientation getOrientaion (bool IsBasePlane = true);
   void setOrientation (const VISU::CutPlanes::Orientation orient);
@@ -107,14 +117,9 @@ private:
   SALOME_Actor* myPreviewActorGlyphs;
   QCheckBox* myPreviewCheck;
   QCheckBox* myAllCurvesInvertedCheck;
+  QCheckBox* myUseAbsoluteLengthCheck;
 
-  VISU::CutLines_i* myPrs;
-
-  //jfa tmp:SUIT_ViewManager *myMgr;
-  //jfa tmp:SUIT_ViewWindow *myStudyWnd;
-
-  static bool MYGenerateTable;
-  static bool MYGenerateCurve;
+  SALOME::GenericObjPtr<VISU::CutLines_i> myPrsCopy;
 };
 
 #endif // VISUGUI_CUTLINESDLG_H