X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FNewGeom%2FNewGeom_SalomeViewer.h;h=8012c4a015c25ad59a452ee9fe598ba28bc30ca3;hb=a63f4aea8cf064bae8339c926584316f218d98d5;hp=4f8812803f6a6570ef39187a223ed4edf1a399e4;hpb=5e0d2346938ebede83543d7e37ff6ff8fc907675;p=modules%2Fshaper.git diff --git a/src/NewGeom/NewGeom_SalomeViewer.h b/src/NewGeom/NewGeom_SalomeViewer.h index 4f8812803..8012c4a01 100644 --- a/src/NewGeom/NewGeom_SalomeViewer.h +++ b/src/NewGeom/NewGeom_SalomeViewer.h @@ -9,6 +9,8 @@ #include #include +#include + #include class SUIT_ViewWindow; @@ -29,7 +31,7 @@ class NewGeom_SalomeView: public ModuleBase_IViewWindow public: /// Constructor /// \param theViewer a reference to a viewer - NewGeom_SalomeView(OCCViewer_Viewer* theViewer) { myViewer = theViewer; } + NewGeom_SalomeView(OCCViewer_Viewer* theViewer); virtual Handle(V3d_View) v3dView() const; @@ -43,9 +45,13 @@ public: /// Returns current viewer OCCViewer_Viewer* viewer() const { return myViewer; } + /// Sets the current view + void setCurrentView(SUIT_ViewWindow* theView) { myCurrentView = theView; } + private: /// A reference to a viewer OCCViewer_Viewer* myViewer; + SUIT_ViewWindow* myCurrentView; }; @@ -120,6 +126,13 @@ Q_OBJECT /// by mouse drugging. If this is impossible thet it has to return False. virtual bool canDragByMouse() const; + /// Activate or deactivate viewer + /// \param toActivate - activation flag + void activateViewer(bool toActivate); + + // Fit all along Z (perpendicular to display) + virtual void Zfitall(); + private slots: void onMousePress(SUIT_ViewWindow*, QMouseEvent*); void onMouseRelease(SUIT_ViewWindow*, QMouseEvent*); @@ -134,6 +147,7 @@ Q_OBJECT void onActivated(SUIT_ViewWindow*); void onSelectionChanged(); + void onViewTransformed(OCCViewer_ViewWindow::OperationType); private: NewGeom_OCCSelector* mySelector;