Version: 9.12.0
SMESHGUI_MeshOrderBox Class Reference

Reusable widget that shows and allows modify meshing order. More...

#include <SMESHGUI_MeshOrderDlg.h>

Inheritance diagram for SMESHGUI_MeshOrderBox:

Public Member Functions

 SMESHGUI_MeshOrderBox (QWidget *)
 Public methods. More...
 
 ~SMESHGUI_MeshOrderBox ()
 Destructor. More...
 
void Clear ()
 Clear mesh box. More...
 
void SetMeshes (const ListListName &theMeshNames, const ListListId &theMeshIds)
 Set mesh (submesh) names and indices. More...
 
bool IsOrderChanged () const
 returns status is order changed by user More...
 
ListListId GetMeshIds () const
 Returns result (ordered by user) mesh names. More...
 
ListListName GetMeshNames () const
 Returns result (ordered by user) mesh indices. More...
 

Private Slots

void onSelectionChanged ()
 Private slots. More...
 
void onMoveItem ()
 move item according to clicked arrow button More...
 

Private Member Functions

void moveItem (const bool theIsUp)
 Privatemethods. More...
 

Private Attributes

bool myIsChanged
 Private fields. More...
 
QToolButton * myUpBtn
 
QToolButton * myDownBtn
 
QListWidget * myMeshNames
 

Detailed Description

Reusable widget that shows and allows modify meshing order.

Constructor & Destructor Documentation

◆ SMESHGUI_MeshOrderBox()

SMESHGUI_MeshOrderBox::SMESHGUI_MeshOrderBox ( QWidget theParent)

Public methods.

Constructor.

References MARGIN, myDownBtn, myMeshNames, myUpBtn, onMoveItem(), onSelectionChanged(), and SPACING.

◆ ~SMESHGUI_MeshOrderBox()

SMESHGUI_MeshOrderBox::~SMESHGUI_MeshOrderBox ( )

Destructor.

Member Function Documentation

◆ Clear()

void SMESHGUI_MeshOrderBox::Clear ( )

Clear mesh box.

Clear submesh names and indices.

References myIsChanged, and myMeshNames.

Referenced by SMESHGUI_MeshOrderMgr::GetMeshOrder(), and SetMeshes().

◆ GetMeshIds()

ListListId SMESHGUI_MeshOrderBox::GetMeshIds ( ) const

Returns result (ordered by user) mesh names.

References checkItem(), and myMeshNames.

Referenced by SMESHGUI_MeshOrderMgr::SetMeshOrder().

◆ GetMeshNames()

ListListName SMESHGUI_MeshOrderBox::GetMeshNames ( ) const

Returns result (ordered by user) mesh indices.

References checkItem(), and myMeshNames.

◆ IsOrderChanged()

bool SMESHGUI_MeshOrderBox::IsOrderChanged ( ) const

returns status is order changed by user

References myIsChanged.

Referenced by SMESHGUI_MeshOrderMgr::IsOrderChanged().

◆ moveItem()

void SMESHGUI_MeshOrderBox::moveItem ( const bool  theIsUp)
private

Privatemethods.

move mesh in order up or down

References checkItem(), myIsChanged, and myMeshNames.

Referenced by onMoveItem().

◆ onMoveItem

void SMESHGUI_MeshOrderBox::onMoveItem ( )
privateslot

move item according to clicked arrow button

References moveItem(), and myUpBtn.

Referenced by SMESHGUI_MeshOrderBox().

◆ onSelectionChanged

void SMESHGUI_MeshOrderBox::onSelectionChanged ( )
privateslot

Private slots.

update state of arrow buttons according to selection

References checkItem(), myDownBtn, myMeshNames, and myUpBtn.

Referenced by SMESHGUI_MeshOrderBox().

◆ SetMeshes()

void SMESHGUI_MeshOrderBox::SetMeshes ( const ListListName theMeshNames,
const ListListId theMeshIds 
)

Set mesh (submesh) names and indices.

Set submesh names and indices.

References addMeshItem(), addSeparator(), Clear(), and myMeshNames.

Referenced by SMESHGUI_MeshOrderMgr::GetMeshOrder().

Field Documentation

◆ myDownBtn

QToolButton* SMESHGUI_MeshOrderBox::myDownBtn
private

◆ myIsChanged

bool SMESHGUI_MeshOrderBox::myIsChanged
private

Private fields.

Referenced by Clear(), IsOrderChanged(), and moveItem().

◆ myMeshNames

QListWidget* SMESHGUI_MeshOrderBox::myMeshNames
private

◆ myUpBtn

QToolButton* SMESHGUI_MeshOrderBox::myUpBtn
private