A widget showing a list of propagation chains of EDGEs. More...
#include <StdMeshersGUI_PropagationHelperWdg.h>
Public Member Functions | |
StdMeshersGUI_PropagationHelperWdg (StdMeshersGUI_SubShapeSelectorWdg *subSelectWdg, QWidget *parent=0, bool show=true) | |
Constructor. More... | |
~StdMeshersGUI_PropagationHelperWdg () | |
Destructor. More... | |
void | Clear () |
Switch off all buttons and previews. More... | |
Private Slots | |
void | onShowGeometry (bool toShow) |
SLOT called when 'Show Geometry' is checked. More... | |
void | onListSelectionChanged () |
SLOT called when a selected chain changes. More... | |
void | onAdd () |
SLOT called when 'Add' button is clicked. More... | |
void | onReverse () |
SLOT called when 'Reverse' button is clicked. More... | |
void | updateList (bool enable) |
Fills myListWidget. More... | |
Private Member Functions | |
bool | buildChains () |
Build propagation chains. More... | |
std::vector< int > * | getSelectedChain () |
Returns ids of a selected chain. More... | |
Private Attributes | |
StdMeshersGUI_SubShapeSelectorWdg * | mySubSelectWdg |
vtkRenderer * | myRenderer |
GEOM_Actor * | myActor |
GEOM_Actor * | myModelActor |
QListWidget * | myListWidget |
QPushButton * | myAddButton |
QPushButton * | myReverseButton |
QCheckBox * | myShowGeomChkBox |
QGroupBox * | myChainBox |
std::vector< std::vector< int > > | myChains |
A widget showing a list of propagation chains of EDGEs.
Selecting a chain shows its EDGEs in a viewer with all EDGEs equally oriented, 'Reverse' button reverses the EDGEs of a selected chain. 'Add' button adds EDGEs to a list of reversed EDGEs of StdMeshersGUI_SubShapeSelectorWdg
StdMeshersGUI_PropagationHelperWdg::StdMeshersGUI_PropagationHelperWdg | ( | StdMeshersGUI_SubShapeSelectorWdg * | subSelectWdg, |
QWidget * | parent = 0 , |
||
bool | show = true |
||
) |
Constructor.
References MARGIN, myAddButton, myChainBox, myListWidget, myReverseButton, myShowGeomChkBox, onAdd(), onListSelectionChanged(), onReverse(), onShowGeometry(), SPACING, and updateList().
StdMeshersGUI_PropagationHelperWdg::~StdMeshersGUI_PropagationHelperWdg | ( | ) |
Destructor.
References myActor, myModelActor, and myRenderer.
|
private |
Build propagation chains.
Return false if no chains found
References Abs(), StdMeshersGUI_SubShapeSelectorWdg::GetActorCollection(), StdMeshersGUI_SubShapeSelectorWdg::GetGeomShape(), SMESH_PreviewActorsCollection::GetIndexByShape(), SMESH_PreviewActorsCollection::GetIndices(), StdMeshersGUI_SubShapeSelectorWdg::GetMainShape(), myChains, mySubSelectWdg, and SMESH_PreviewActorsCollection::NbShapesOfType().
Referenced by updateList().
void StdMeshersGUI_PropagationHelperWdg::Clear | ( | ) |
Switch off all buttons and previews.
References myActor, myChainBox, myListWidget, myModelActor, and myShowGeomChkBox.
Referenced by StdMeshersGUI_NbSegmentsCreator::onValueChanged().
|
private |
Returns ids of a selected chain.
References myChains, and myListWidget.
Referenced by onAdd(), onListSelectionChanged(), and onReverse().
|
privateslot |
SLOT called when 'Add' button is clicked.
References StdMeshersGUI_SubShapeSelectorWdg::ClearSelected(), StdMeshersGUI_SubShapeSelectorWdg::GetListOfIDs(), getSelectedChain(), myAddButton, myListWidget, myReverseButton, mySubSelectWdg, and StdMeshersGUI_SubShapeSelectorWdg::SetListOfIDs().
Referenced by StdMeshersGUI_PropagationHelperWdg().
|
privateslot |
SLOT called when a selected chain changes.
References Abs(), StdMeshersGUI_SubShapeSelectorWdg::ClearSelected(), StdMeshersGUI_SubShapeSelectorWdg::GetActorCollection(), StdMeshersGUI_SubShapeSelectorWdg::GetRenderer(), getSelectedChain(), SMESH_PreviewActorsCollection::GetShapeByIndex(), SMESH::GetViewWindow(), myActor, myAddButton, myListWidget, myRenderer, myReverseButton, mySubSelectWdg, SMESHGUI::selectionMgr(), and SMESH_PreviewActorsCollection::SetShown().
Referenced by onReverse(), StdMeshersGUI_PropagationHelperWdg(), and updateList().
|
privateslot |
SLOT called when 'Reverse' button is clicked.
References getSelectedChain(), and onListSelectionChanged().
Referenced by StdMeshersGUI_PropagationHelperWdg().
|
privateslot |
SLOT called when 'Show Geometry' is checked.
References StdMeshersGUI_SubShapeSelectorWdg::GetGeomShape(), StdMeshersGUI_SubShapeSelectorWdg::GetMainShape(), StdMeshersGUI_SubShapeSelectorWdg::GetRenderer(), myModelActor, myRenderer, mySubSelectWdg, and SMESH::RepaintCurrentView().
Referenced by StdMeshersGUI_PropagationHelperWdg().
|
privateslot |
Fills myListWidget.
References buildChains(), myChains, myListWidget, and onListSelectionChanged().
Referenced by StdMeshersGUI_PropagationHelperWdg().
|
private |
Referenced by Clear(), onListSelectionChanged(), and ~StdMeshersGUI_PropagationHelperWdg().
|
private |
Referenced by onAdd(), onListSelectionChanged(), and StdMeshersGUI_PropagationHelperWdg().
|
private |
Referenced by Clear(), and StdMeshersGUI_PropagationHelperWdg().
|
private |
Referenced by buildChains(), getSelectedChain(), and updateList().
|
private |
Referenced by Clear(), getSelectedChain(), onAdd(), onListSelectionChanged(), StdMeshersGUI_PropagationHelperWdg(), and updateList().
|
private |
Referenced by Clear(), onShowGeometry(), and ~StdMeshersGUI_PropagationHelperWdg().
|
private |
Referenced by onListSelectionChanged(), onShowGeometry(), and ~StdMeshersGUI_PropagationHelperWdg().
|
private |
Referenced by onAdd(), onListSelectionChanged(), and StdMeshersGUI_PropagationHelperWdg().
|
private |
Referenced by Clear(), and StdMeshersGUI_PropagationHelperWdg().
|
private |
Referenced by buildChains(), onAdd(), onListSelectionChanged(), and onShowGeometry().