X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FXGUI%2FXGUI_Displayer.h;h=dd221d7bf9cbb9b9398e501f31fa1858270c48e6;hb=7e31817b90ba5e8208ffdec5e09f2b23ec196890;hp=78da19457d11969a3d4cdf34a811dd04829fced3;hpb=cbde248859fb0072f6012907391ea90cfc254574;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_Displayer.h b/src/XGUI/XGUI_Displayer.h index 78da19457..dd221d7bf 100644 --- a/src/XGUI/XGUI_Displayer.h +++ b/src/XGUI/XGUI_Displayer.h @@ -137,12 +137,14 @@ class XGUI_EXPORT XGUI_Displayer: public QObject void removeFilters(); /// Sets a flag to the displayer whether the internal viewer can be updated by - /// the updateViewer method call. If it is not enabled, this method do nothing + /// the updateViewer method call. If it is not enabled, this method do nothing. + /// This state maintain recurse, if the update is blocked twice or three times, the + /// viewer will not be updated until it is unblocked necessary times(twice or three in the example). /// \param isEnabled a boolean value bool enableUpdateViewer(const bool isEnabled); - /// Returns myEnableUpdateViewer flag - bool isUpdateEnabled() const { return myEnableUpdateViewer; } + /// Returns true if the viewer update is not blocked + bool isUpdateEnabled() const; /// Updates the viewer void updateViewer() const; @@ -231,15 +233,27 @@ class XGUI_EXPORT XGUI_Displayer: public QObject /// Returns Trihedron object if it is displayed Handle(AIS_InteractiveObject) getTrihedron() const; - // Set trihedron active (used in selection) or non active + /// Set trihedron active (used in selection) or non active void activateTrihedron(bool theIsActive); + /// Displays/erases thrihedron in current modes. It will be activated or deactivated + /// depending on the trihedron visible state and displayer active trihedron state + void displayTrihedron(bool theToDisplay) const; + + /// Returns true if the trihedron should be activated in current selection modes bool isTrihedronActive() const { return myIsTrihedronActive; } /// Converts shape type (TopAbs_ShapeEnum) to selection mode /// \param theShapeType a shape type from TopAbs_ShapeEnum static int getSelectionMode(int theShapeType); + /// Return true if the object is visible. If the object is feature, it returns true + /// if all results of the feature are shown + /// \param theDisplayer a displayer + /// \param theObject an object + /// \return a boolean value + static bool isVisible(XGUI_Displayer* theDislayer, const ObjectPtr& theObject); + signals: /// Signal on object display /// \param theObject a data object @@ -281,7 +295,8 @@ private: void deactivate(ObjectPtr theObject, const bool theUpdateViewer); /// Find a trihedron in a list of displayed presentations and deactivate it. - void deactivateTrihedron() const; + /// \param theUpdateViewer an update viewer flag + void deactivateTrihedron(const bool theUpdateViewer) const; /// Opens local context. Does nothing if it is already opened. void openLocalContext(); @@ -321,8 +336,8 @@ private: /// Selection modes installed for external objects in local context QIntList myActiveSelectionModes; - /// the enable update viewer flag - bool myEnableUpdateViewer; + /// Number of blocking of the viewer update. The viewer is updated only if it equals zero + int myViewerBlockedRecursiveCount; // Flag: use trihedgon for selection or not bool myIsTrihedronActive;