+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// 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/
+//
#ifndef OCCVIEWER_VIEWWINDOW_H
#define OCCVIEWER_VIEWWINDOW_H
class SUIT_Desktop;
class OCCViewer_ViewPort3d;
+class OCCViewer_ClippingDlg;
+
#ifdef WIN32
#pragma warning( disable:4251 )
#endif
virtual void initLayout();
+ void updateEnabledDrawMode();
+
+ void setCuttingPlane( bool on, const double x = 0 , const double y = 0 , const double z = 0,
+ const double dx = 0, const double dy = 0, const double dz = 1);
+
+ virtual QString getVisualParameters();
+ virtual void setVisualParameters( const QString& parameters );
+
public slots:
void onFrontView();
void onViewFitAll();
void onRightView();
void onResetView();
void onFitAll();
- void onDumpView();
void activateZoom();
void activateWindowFit();
void activateRotation();
void activatePanning();
void activateGlobalPanning();
void onCloneView();
+ void onClipping( bool on );
void onMemorizeView();
void onRestoreView();
void onTrihedronShow();
protected:
enum { DumpId, FitAllId, FitRectId, ZoomId, PanId, GlobalPanId, RotationId,
- FrontId, BackId, TopId, BottomId, LeftId, RightId, ResetId, CloneId, MemId, RestoreId,
+ FrontId, BackId, TopId, BottomId, LeftId, RightId, ResetId, CloneId, ClippingId, MemId, RestoreId,
TrihedronShowId };
typedef QMap<int, QtxAction*> ActionsMap;
+ QImage dumpView();
/* Transformation selected but not started yet */
bool transformRequested() const { return ( myOperation != NOTHING ); }
virtual OperationType getButtonState(QMouseEvent* theEvent);
+ viewAspect getViewParams() const;
+
OperationType myOperation;
OCCViewer_Viewer* myModel;
OCCViewer_ViewPort3d* myViewPort;
ActionsMap myActionsMap;
double myCurScale;
+
+private:
+ OCCViewer_ClippingDlg* myClippingDlg;
+
};
#ifdef WIN32