X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FOCCViewer%2FOCCViewer_ViewWindow.h;h=08f4202e36ebe299ccb832e69027767a49de7a94;hb=a6c6f1e04c7c1a22e856db2d6538bf5197f86c6c;hp=57b819862524d722f416c17f81756b822e7676f4;hpb=6878ef4d7381638ec39d1ca9d03afc21a69401aa;p=modules%2Fgui.git diff --git a/src/OCCViewer/OCCViewer_ViewWindow.h b/src/OCCViewer/OCCViewer_ViewWindow.h index 57b819862..08f4202e3 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.h +++ b/src/OCCViewer/OCCViewer_ViewWindow.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2015 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 @@ -143,7 +143,7 @@ class OCCVIEWER_EXPORT OCCViewer_ViewWindow : public SUIT_ViewWindow Q_OBJECT public: - enum { DumpId, FitAllId, FitRectId, ZoomId, PanId, GlobalPanId, + enum { DumpId, FitAllId, FitRectId, FitSelectionId, ZoomId, PanId, GlobalPanId, ChangeRotationPointId, RotationId, FrontId, BackId, TopId, BottomId, LeftId, RightId, ClockWiseId, AntiClockWiseId, ResetId, CloneId, ClippingId, MemId, RestoreId, @@ -151,19 +151,27 @@ public: SwitchInteractionStyleId, SwitchZoomingStyleId, SwitchPreselectionId, SwitchSelectionId, MaximizedId, SynchronizeId, ReturnTo3dViewId, + OrthographicId, PerspectiveId, StereoId, UserId }; enum OperationType{ NOTHING, PANVIEW, ZOOMVIEW, ROTATE, - PANGLOBAL, WINDOWFIT, FITALLVIEW, RESETVIEW, + PANGLOBAL, WINDOWFIT, FITALLVIEW, FITSELECTION, RESETVIEW, FRONTVIEW, BACKVIEW, TOPVIEW, BOTTOMVIEW, LEFTVIEW, RIGHTVIEW, - CLOCKWISEVIEW, ANTICLOCKWISEVIEW }; + CLOCKWISEVIEW, ANTICLOCKWISEVIEW, PROJECTION }; enum RotationPointType{ GRAVITY, SELECTED }; enum SketchingType { NoSketching, Rect, Polygon }; - enum Mode2dType { No2dMode, XYPlane, XZPlane, YZPlane}; + enum Mode2dType { No2dMode, XYPlane, XZPlane, YZPlane }; + enum ProjectionType { Orthographic, Perspective, Stereo }; + + enum StereoType { QuadBuffer, Anaglyph, RowInterlaced, ColumnInterlaced, ChessBoard, SideBySide, OverUnder, SoftPageFlip, NumberOfModes }; + + enum AnaglyphFilter { RedCyan, YellowBlue, GreenMagenta }; + + enum FocusIODType { Absolute, Relative }; OCCViewer_ViewWindow(SUIT_Desktop* theDesktop, OCCViewer_Viewer* theModel); virtual ~OCCViewer_ViewWindow(); @@ -206,10 +214,35 @@ public: virtual bool isSelectionEnabled() const; virtual void enableSelection( bool ); + virtual int projectionType() const; + virtual void setProjectionType( int ); + + virtual int stereoType() const; + virtual void setStereoType( const int ); + + virtual int anaglyphFilter() const; + virtual void setAnaglyphFilter( const int ); + + virtual void setStereographicFocus( const int, const double ); + virtual int stereographicFocusType() const; + virtual double stereographicFocusValue() const; + + virtual void setInterocularDistance( const int, const double ); + virtual int interocularDistanceType() const; + virtual double interocularDistanceValue() const; + + virtual bool isReverseStereo() const; + virtual void setReverseStereo( const bool ); + + virtual bool isVSync() const; + virtual void setVSync( const bool ); + + virtual bool isQuadBufferSupport() const; + virtual void setQuadBufferSupport( const bool ); + void setTransformEnabled( const OperationType, const bool ); bool transformEnabled( const OperationType ) const; - void set2dMode( Mode2dType ); Mode2dType get2dMode() const { return my2dMode; } @@ -223,6 +256,8 @@ public: virtual QColor backgroundColor() const; // obsolete virtual void setBackgroundColor( const QColor& ); // obsolete + virtual void showStaticTrihedron( bool ); + virtual Qtx::BackgroundData background() const; virtual void setBackground( const Qtx::BackgroundData& ); @@ -244,8 +279,10 @@ public slots: virtual void onRightView(); virtual void onClockWiseView(); virtual void onAntiClockWiseView(); + virtual void onProjectionType(); virtual void onResetView(); virtual void onFitAll(); + virtual void onFitSelection(); virtual void activateZoom(); virtual void activateWindowFit(); virtual void activateRotation(); @@ -258,7 +295,7 @@ public slots: virtual void onAmbientToogle(); virtual void onMemorizeView(); virtual void onRestoreView(); - virtual void onTrihedronShow(); + virtual void onTrihedronShow(bool); virtual void setRestoreFlag(); virtual void onSwitchInteractionStyle( bool on ); virtual void onSwitchZoomingStyle( bool on ); @@ -296,6 +333,8 @@ public: protected: virtual QString filter() const; + bool isOpenGlStereoSupport() const; + /* Transformation selected but not started yet */ bool transformRequested() const; bool setTransformRequested ( OperationType ); @@ -314,7 +353,7 @@ protected: void createActions(); void createToolBar(); - + virtual OperationType getButtonState(QMouseEvent* theEvent, int theInteractionStyle); viewAspect getViewParams() const; @@ -326,6 +365,8 @@ protected: virtual OCCViewer_ViewSketcher* createSketcher( int ); + void saveCursor(); + OCCViewer_ViewSketcher* mypSketcher; QList mySketchers;