SHAPER  9.12.0
XGUI_FacesPanel Class Reference

A Hide Faces panel for making it possible to hide faces in the 3D view. More...

Inheritance diagram for XGUI_FacesPanel:
Inheritance graph

Public Slots

void onObjectDisplay (ObjectPtr theObject, AISObjectPtr theAIS)
 Slot called on an object erase. More...
 

Signals

void activated ()
 Signal about activating pane. More...
 
void deactivated ()
 Signal about deactivating pane. More...
 
void closed ()
 Signal is emitted by the top widget cross button click. More...
 

Public Member Functions

 XGUI_FacesPanel (QWidget *theParent, XGUI_Workshop *theWorkshop)
 Constructor. More...
 
virtual void reset (const bool isToFlushRedisplay)
 Clear content of list widget. More...
 
bool isEmpty () const
 Returns whether faces panel contains elements. More...
 
void selectionModes (QIntList &theModes)
 Fills container with the panel selection mode: FACE. More...
 
void selectionFilters (SelectMgr_ListOfFilter &theSelectionFilters)
 Appends into container of workshop selection filters. More...
 
bool isActivePanel () const
 Returns whether the panel is active or not. More...
 
void setActivePanel (const bool theIsActive)
 Stores the state if panel is active and highlight the panel in an active color. More...
 
bool isObjectHiddenByPanel (const ObjectPtr &theObject) const
 Returns true if the object is in internal container of hidden objects by this panel. More...
 
void restoreObjects (const std::set< ObjectPtr > &theHiddenObjects)
 Removed faces of the objects from the panel. More...
 
virtual bool processAction (ModuleBase_ActionType theActionType)
 Returns true if the event is processed. The default implementation is empty, returns false. More...
 
void processSelection ()
 Append selected item in the list and customize presentations to hide faces. More...
 
bool processDelete ()
 Deletes item in a list of elements. More...
 
void processUndo ()
 Delete last(s) item(s) added since the recent activation of the faces panel. More...
 
virtual bool eventFilter (QObject *theObject, QEvent *theEvent)
 Processing focus in/out for the faces control. More...
 
XGUI_Workshopworkshop () const
 

Protected Slots

void onDeleteItem ()
 Deletes element in list of items. More...
 
void onTransparencyChanged ()
 Upates hidden faces to be hidden or transparent. More...
 
void onClosed ()
 Closes faces panel restore all hidden faces by calling reset() More...
 
void flushRedisplay () const
 Flushes redisplay event and perform update of object browser icons (objects might be hidden/shown) More...
 

Protected Member Functions

virtual void closeEvent (QCloseEvent *theEvent)
 Reimplementation to emit a signal about the panel close. More...
 

Detailed Description

A Hide Faces panel for making it possible to hide faces in the 3D view.

The panel has multi-selector filled by faces elements. When the control is active it is possible to select faces in the viewer. The selected faces are hidden/transparent after selection and the corresponding item is appeared in the multi selector.

In order to redisplay a face, it is enough to click delete on the name of this face in the multiselector. When the panel is opened, the multiselector is empty. When the panel is closed, the multiselector is emptied and the faces are displayed again. The default position by of this dockable window is to the right of the view (in SALOME mode). If no feature is processed (in neutral point), this panel can be activated too. On feature edition start or finish, movement of the history line, undo/redo and other modification of the model, the multiselector is emptied.

Constructor & Destructor Documentation

◆ XGUI_FacesPanel()

XGUI_FacesPanel::XGUI_FacesPanel ( QWidget theParent,
XGUI_Workshop theWorkshop 
)

Constructor.

Parameters
theParentis a parent of the property panel

Member Function Documentation

◆ reset()

void XGUI_FacesPanel::reset ( const bool  isToFlushRedisplay)
virtual

Clear content of list widget.

Parameters
isToFlushRedisplayflag if redisplay should be flushed immediatelly

◆ isEmpty()

bool XGUI_FacesPanel::isEmpty ( ) const

Returns whether faces panel contains elements.

Returns
boolean value

◆ selectionModes()

void XGUI_FacesPanel::selectionModes ( QIntList &  theModes)

Fills container with the panel selection mode: FACE.

◆ selectionFilters()

void XGUI_FacesPanel::selectionFilters ( SelectMgr_ListOfFilter &  theSelectionFilters)

Appends into container of workshop selection filters.

Parameters
[out]selectionfilters

◆ isActivePanel()

bool XGUI_FacesPanel::isActivePanel ( ) const
inline

Returns whether the panel is active or not.

◆ setActivePanel()

void XGUI_FacesPanel::setActivePanel ( const bool  theIsActive)

Stores the state if panel is active and highlight the panel in an active color.

Parameters
theIsActivestate whether the panel should be activated or deactivated

◆ isObjectHiddenByPanel()

bool XGUI_FacesPanel::isObjectHiddenByPanel ( const ObjectPtr &  theObject) const
inline

Returns true if the object is in internal container of hidden objects by this panel.

Parameters
theObjecta checked object
Returns
boolean value

◆ restoreObjects()

void XGUI_FacesPanel::restoreObjects ( const std::set< ObjectPtr > &  theHiddenObjects)

Removed faces of the objects from the panel.

Parameters
containerof objects

found objects

◆ processAction()

bool XGUI_FacesPanel::processAction ( ModuleBase_ActionType  theActionType)
virtual

Returns true if the event is processed. The default implementation is empty, returns false.

◆ processSelection()

void XGUI_FacesPanel::processSelection ( )

Append selected item in the list and customize presentations to hide faces.

◆ processDelete()

bool XGUI_FacesPanel::processDelete ( )

Deletes item in a list of elements.

Returns
whether the delete action is processed

◆ processUndo()

void XGUI_FacesPanel::processUndo ( )

Delete last(s) item(s) added since the recent activation of the faces panel.

◆ eventFilter()

bool XGUI_FacesPanel::eventFilter ( QObject theObject,
QEvent theEvent 
)
virtual

Processing focus in/out for the faces control.

Parameters
theObjectsource object of event
theEventan event

◆ onObjectDisplay

void XGUI_FacesPanel::onObjectDisplay ( ObjectPtr  theObject,
AISObjectPtr  theAIS 
)
slot

Slot called on an object erase.

◆ closeEvent()

void XGUI_FacesPanel::closeEvent ( QCloseEvent *  theEvent)
protectedvirtual

Reimplementation to emit a signal about the panel close.

◆ activated

void XGUI_FacesPanel::activated ( )
signal

Signal about activating pane.

◆ deactivated

void XGUI_FacesPanel::deactivated ( )
signal

Signal about deactivating pane.

◆ closed

void XGUI_FacesPanel::closed ( )
signal

Signal is emitted by the top widget cross button click.

◆ onDeleteItem

void XGUI_FacesPanel::onDeleteItem ( )
protectedslot

Deletes element in list of items.

◆ onTransparencyChanged

void XGUI_FacesPanel::onTransparencyChanged ( )
protectedslot

Upates hidden faces to be hidden or transparent.

◆ onClosed

void XGUI_FacesPanel::onClosed ( )
protectedslot

Closes faces panel restore all hidden faces by calling reset()

◆ flushRedisplay

void XGUI_FacesPanel::flushRedisplay ( ) const
protectedslot

Flushes redisplay event and perform update of object browser icons (objects might be hidden/shown)