class QKeyEvent;
class QContextMenuEvent;
class ModuleBase_IViewWindow;
+#ifdef HAVE_SALOME
+class OCCViewer_Fitter;
+#else
+class AppElements_Fitter;
+#endif
/**
* \ingroup GUI
myShowHighlight = false;
}
+#ifdef HAVE_SALOME
+ virtual void setFitter(OCCViewer_Fitter* theFitter) = 0;
+ virtual OCCViewer_Fitter* currentFitter() const = 0;
+#else
+ virtual void setFitter(AppElements_Fitter* theFitter) = 0;
+ virtual AppElements_Fitter* currentFitter() const = 0;
+#endif
+
+ virtual void unsetFitter() = 0;
+
+
static Handle(Prs3d_Drawer) DefaultHighlightDrawer;
+
signals:
/// Signal emited when last view window is closed
void lastViewClosed();
workshop()->viewer()->set2dMode(true);
PartSet_Fitter* aFitter = new PartSet_Fitter(myCurrentSketch);
- XGUI_Workshop* aWorkshop = aConnector->workshop();
- aWorkshop->viewer()->setFitter(aFitter);
+ myModule->workshop()->viewer()->setFitter(aFitter);
}
void PartSet_SketcherMgr::stopSketch(ModuleBase_Operation* theOperation)
{
XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(myModule->workshop());
- XGUI_Workshop* aWorkshop = aConnector->workshop();
- PartSet_Fitter* aFitter = (PartSet_Fitter*)aWorkshop->viewer()->currentFitter();
- aWorkshop->viewer()->unsetFitter();
+ PartSet_Fitter* aFitter = (PartSet_Fitter*)myModule->workshop()->viewer()->currentFitter();
+ myModule->workshop()->viewer()->unsetFitter();
delete aFitter;
myIsMouseOverWindow = false;
}
}
+void SHAPERGUI_SalomeViewer::setFitter(OCCViewer_Fitter* theFitter)
+{
+ if (mySelector)
+ mySelector->viewer()->setFitter(theFitter);
+}
+
+OCCViewer_Fitter* SHAPERGUI_SalomeViewer::currentFitter() const
+{
+ if (mySelector)
+ return mySelector->viewer()->currentFitter();
+ return 0;
+}
+
+void SHAPERGUI_SalomeViewer::unsetFitter()
+{
+ if (mySelector)
+ mySelector->viewer()->unsetFitter();
+}
//void SHAPERGUI_SalomeViewer::Zfitall()
// \param theText is a title
virtual void setColorScaleTitle(const QString& theText);
+ virtual void setFitter(OCCViewer_Fitter* theFitter);
+ virtual OCCViewer_Fitter* currentFitter() const;
+ virtual void unsetFitter();
+
// Fit all along Z (perpendicular to display)
//virtual void Zfitall();
//virtual void Zfitall();
#ifdef HAVE_SALOME
- void setFitter(OCCViewer_Fitter* theFitter);
- OCCViewer_Fitter* currentFitter() const;
+ virtual void setFitter(OCCViewer_Fitter* theFitter);
+ virtual OCCViewer_Fitter* currentFitter() const;
#else
- void setFitter(AppElements_Fitter* theFitter);
- AppElements_Fitter* currentFitter() const;
+ virtual void setFitter(AppElements_Fitter* theFitter);
+ virtual AppElements_Fitter* currentFitter() const;
#endif
- void unsetFitter();
+ virtual void unsetFitter();
signals:
/// Emits by mouse entering the view port