20 #ifndef XGUI_VIEWERPROXY_H
21 #define XGUI_VIEWERPROXY_H
24 #include <ModuleBase_IViewer.h>
25 #include <ModelAPI_Feature.h>
26 #include <ModelAPI_Result.h>
28 #include <AIS_Trihedron.hxx>
29 #include <AIS_ListOfInteractive.hxx>
32 #include <OCCViewer_ViewModel.h>
34 #include <AppElements_Viewer.h>
35 #include <AppElements_ViewWindow.h>
57 void connectViewProxy();
63 virtual Handle(AIS_Trihedron) trihedron()
const;
66 virtual Handle(V3d_Viewer) v3dViewer()
const;
69 virtual Handle(V3d_View) activeView()
const;
104 double theUpX,
double theUpY,
double theUpZ);
113 void connectToViewer();
126 virtual void clearSelectionFilters();
177 void setupColorScale();
189 virtual void setFitter(OCCViewer_Fitter* theFitter);
190 virtual OCCViewer_Fitter* fitter()
const;
213 void onTryCloseView(AppElements_ViewWindow*);
214 void onDeleteView(AppElements_ViewWindow*);
215 void onViewCreated(AppElements_ViewWindow*);
216 void onActivated(AppElements_ViewWindow*);
218 void onMousePress(AppElements_ViewWindow*, QMouseEvent*);
219 void onMouseRelease(AppElements_ViewWindow*, QMouseEvent*);
220 void onMouseDoubleClick(AppElements_ViewWindow*, QMouseEvent*);
221 void onMouseMove(AppElements_ViewWindow*, QMouseEvent*);
223 void onKeyPress(AppElements_ViewWindow*, QKeyEvent*);
224 void onKeyRelease(AppElements_ViewWindow*, QKeyEvent*);
226 void onViewTransformed(AppElements_ViewWindow::OperationType);
234 void displayHighlight(FeaturePtr theFeature,
const TopoDS_Shape& theIgnoreShape);
235 bool eraseHighlight();
236 void createPresentations(
const ResultPtr& theRes,
const TopoDS_Shape& theIgnoreShape);
241 AIS_ListOfInteractive myHighlights;
Interface to ViewWindow object which contains 3d scene.
Definition: ModuleBase_IViewWindow.h:34
A Base object for definition of connector object to Salome Viewer.
Definition: ModuleBase_IViewer.h:47
virtual bool canDragByMouse() const
Method returns True if the viewer can process editing objects by mouse drugging.
Definition: ModuleBase_IViewer.h:142
virtual void fitAll()=0
Performs the fit all for the active view.
virtual void setColorScaleTitle(const QString &theText)=0
Set title of color scale.
virtual void enableSelection(bool isEnabled)=0
Enable or disable selection in the viewer.
virtual void setColorScaleShown(bool on)=0
Show/Hide ColorScale object.
virtual void setColorScaleTextHeigth(int theH)=0
Set text height of color scale.
virtual void update()=0
Update current viewer.
virtual void setColorScaleSize(double theW, double theH)=0
Set size of color scale.
virtual bool enableDrawMode(bool isEnabled)=0
Enable or disable draw mode in the viewer.
virtual void setColorScaleRange(double theMin, double theMax)=0
Set range of color scale.
virtual void setColorScaleIntervals(int theNb)=0
Set number of intervals of color scale.
virtual void addSelectionFilter(const Handle &&theFilter)=0
Add selection filter to the viewer.
virtual void setColorScaleTextColor(const QColor &theColor)=0
Set color of text of color scale.
virtual void updateHighlight()
Fit all along Z (perpendicular to display)
Definition: ModuleBase_IViewer.h:148
virtual bool hasSelectionFilter(const Handle &&theFilter)=0
Returns true if the selection filter is set to the viewer.
virtual void setColorScalePosition(double theX, double theY)=0
Set position of color scale.
virtual bool isSelectionEnabled() const =0
Returns true if selection is enabled.
virtual void setText(const TextColor &theText, const int theSize)=0
Sets the text displayed in right-top corner of the 3D view.
virtual void removeSelectionFilter(const Handle &&theFilter)=0
Remove selection filter from the viewer.
virtual void eraseAll()=0
Erases all presentations from the viewer.
std::list< std::pair< std::wstring, std::vector< int > > > TextColor
Type for mapping from text to color to display the names lines in different colors.
Definition: ModuleBase_IViewer.h:201
virtual bool isColorScaleVisible() const =0
Returns True if ColorScale is visible.
virtual QWidget * activeViewPort() const =0
Returns currently active view port widget.
virtual void setViewProjection(double theX, double theY, double theZ, double theTwist)=0
Sets the view projection.
virtual bool isMultiSelectionEnabled() const =0
Returns true if multiselection is enabled.
virtual void enableMultiselection(bool isEnable)=0
Enable or disable multiselection in the viewer.
Proxy class which repersents or AppElements_Viewer or Salome Viewer dependently on current launching ...
Definition: XGUI_ViewerProxy.h:49
void enterViewPort()
Emits by mouse entering the view port.
void leaveViewPort()
Emits by mouse leaving of the view port.
Class which defines a configuration of the application (Workshop) and launches it.
Definition: XGUI_Workshop.h:83