-
+// 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
+//
#ifndef DIALOGBOX_CLIPPING_H
#define DIALOGBOX_CLIPPING_H
#include "SALOME_InteractiveObject.hxx"
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
// QT Includes
-#include <qdialog.h>
-#include <qtable.h>
+#include <QDialog>
+#include <QPointer>
// VTK Includes
#include <vtkSmartPointer.h>
class QLabel;
class QPushButton;
-class QTable;
class QCheckBox;
+class QGroupBox;
class QComboBox;
-class QHButtonGroup;
+class QButtonGroup;
class QSpinBox;
class QTabWidget;
+class QListWidget;
-class QtxDblSpinBox;
+class SALOME_Actor;
-class SalomeApp_SelectionMgr;
+class QtxDoubleSpinBox;
-class VisuGUI;
+class SVTK_ViewWindow;
+class LightApp_SelectionMgr;
+
+class VisuGUI;
+class vtkPlaneSource;
+class vtkDataSetMapper;
class OrientedPlane;
+class VISU_Actor;
+class PreviewPlane;
namespace VISU {
class Prs3d_i;
enum Orientation {XY, YZ, ZX};
};
+//=================================================================================
+//class : OrientedPlane
+//purpose :
+//=================================================================================
+class OrientedPlane: public vtkPlane
+{
+ QPointer<SVTK_ViewWindow> myViewWindow;
+ vtkDataSetMapper* myMapper;
+
+public:
+ static OrientedPlane* New();
+ static OrientedPlane* New (SVTK_ViewWindow* vw);
+
+ vtkTypeMacro(OrientedPlane, vtkPlane);
+
+ VISU::Orientation myOrientation;
+ float myDistance;
+ double myAngle[2];
+
+ vtkPlaneSource* myPlaneSource;
+ SALOME_Actor* myActor;
+
+ void SetOrientation(VISU::Orientation theOrientation);
+ VISU::Orientation GetOrientation();
+
+ void SetDistance(float theDistance);
+ float GetDistance();
+
+ void ShallowCopy(OrientedPlane* theOrientedPlane);
+
+protected:
+ OrientedPlane();
+ OrientedPlane(SVTK_ViewWindow* vw);
+ ~OrientedPlane();
+
+ void Init();
+
+private:
+ OrientedPlane(const OrientedPlane&);
+ void operator=(const OrientedPlane&);
+};
//=================================================================================
// class : VisuGUI_ClippingDlg
public:
VisuGUI_ClippingDlg( VisuGUI* theModule,
- const char* name = 0,
- bool modal = false,
- WFlags fl = 0 );
+ bool modal = false );
float getDistance() { return (float)SpinBoxDistance->value(); }
void setDistance(const float theDistance) { SpinBoxDistance->setValue(theDistance); }
~VisuGUI_ClippingDlg();
private:
+ void keyPressEvent( QKeyEvent* e );
+
+ void SetPrs3d(VISU::Prs3d_i* thePrs);
+
+ VISU_Actor* getSelectedActor();
- SalomeApp_SelectionMgr* mySelectionMgr;
+ void applyLocalPlanes();
+
+ void removeAllClippingPlanes(VISU::Prs3d_i* thePrs);
+
+private:
+
+ LightApp_SelectionMgr* mySelectionMgr;
Handle(SALOME_InteractiveObject) myIO;
VisuGUI * myVisuGUI;
QTabWidget* TabPane;
QComboBox* ComboBoxOrientation;
- QtxDblSpinBox* SpinBoxDistance;
- QtxDblSpinBox* SpinBoxRot1;
- QtxDblSpinBox* SpinBoxRot2;
+ QtxDoubleSpinBox* SpinBoxDistance;
+ QtxDoubleSpinBox* SpinBoxRot1;
+ QtxDoubleSpinBox* SpinBoxRot2;
QWidget* WidgetIJKTab;
- QHButtonGroup* ButtonGroupIJKAxis;
+ QButtonGroup* ButtonGroupIJKAxis;
+ QGroupBox* GroupBoxIJKAxis;
QLabel* TextLabelIJKIndex;
QSpinBox* SpinBoxIJKIndex;
QCheckBox* CheckBoxIJKPlaneReverse;
QPushButton* buttonOk;
QPushButton* buttonCancel;
QPushButton* buttonApply;
+ QPushButton* buttonHelp;
bool myIsSelectPlane;
+ VISU_Actor* myDSActor;
+ QList<PreviewPlane*> myPreviewList;
+
protected:
QWidget* createParamsTab();
QWidget* createIJKParamsTab();
void ClickOnOk();
void ClickOnCancel();
void ClickOnApply();
+ void ClickOnHelp();
};
#endif // DIALOGBOX_TRANSPARENCYDLG_H
+
+