Version: 8.3.0
SMESHGUI_MeshDlg Class Reference

Dialog for mech creation or editing. More...

#include <SMESHGUI_MeshDlg.h>

Inheritance diagram for SMESHGUI_MeshDlg:

Public Types

enum  Controls { Obj, Mesh, Geom }
 
enum  Dimensions { Dim0D = 0, Dim1D, Dim2D, Dim3D }
 Describes dimensions. More...
 

Signals

void hypoSet (const QString &)
 
void geomSelectionByMesh (bool)
 
void selectMeshType (const int, const int)
 

Public Member Functions

 SMESHGUI_MeshDlg (const bool, const bool)
 Dialog for mech creation or editing. More...
 
virtual ~SMESHGUI_MeshDlg ()
 
SMESHGUI_MeshTabtab (const int) const
 Gets tab with given id. More...
 
void reset ()
 Resets all dialog fields. More...
 
void setCurrentTab (const int)
 Sets curent tab. More...
 
void setMaxHypoDim (const int)
 Enable/disable tabs. More...
 
void setHypoSets (const QStringList &)
 Sets list of available Sets of Hypotheses. More...
 
void setGeomPopupEnabled (const bool)
 
void disableTab (const int)
 Disable tab. More...
 
void enableTab (const int)
 Enable tabs. More...
 
bool isTabEnabled (const int) const
 Check if tab enabled. More...
 
int getActiveObject ()
 Return ID of an active selection button. More...
 
void setAvailableMeshType (const QStringList &)
 Sets available types of mesh. More...
 
int currentMeshType ()
 Get current index types of mesh. More...
 
void setCurrentMeshType (const int)
 Set current index types of mesh. More...
 
void setTitile (const bool, const bool)
 Set dialog title. More...
 
virtual void show ()
 
virtual void setContentActive (const bool)
 set all content to enable (parameter is true) or disable state More...
 

Static Public Member Functions

static int prefix (const QString &)
 Return hard-coded prefix using to differ overlapping types. More...
 

Protected Member Functions

SUIT_Desktop * desktop () const
 find desktop of active application More...
 
SUIT_ResourceMgr * resourceMgr () const
 gets resource manager More...
 

Private Slots

void onHypoSetPopup (QAction *)
 Emits hypoSet signal. More...
 
void onGeomPopup (QAction *)
 SLOT called when a item of Geom selection popup is chosen. More...
 
void onGeomSelectionButton (bool)
 SLOT called when a Geom selection button is clicked. More...
 
void onChangedMeshType (const int)
 Emits selectMeshType( const int, const int ) signal. More...
 

Private Attributes

QMap< int, SMESHGUI_MeshTab * > myTabs
 
QTabWidget * myTabWg
 
QToolButton * myHypoSetButton
 
QMenu * myGeomPopup
 
QComboBox * myMeshType
 

Detailed Description

Dialog for mech creation or editing.

This dialog is used for mech creation or editing.

Member Enumeration Documentation

Enumerator
Obj 
Mesh 
Geom 

Describes dimensions.

Enumerator
Dim0D 
Dim1D 
Dim2D 
Dim3D 

Constructor & Destructor Documentation

SMESHGUI_MeshDlg::SMESHGUI_MeshDlg ( const bool  theToCreate,
const bool  theIsMesh 
)

Dialog for mech creation or editing.

This dialog is used for mech creation or editing.

Constructor

Parameters
theToCreate- if this parameter is true then dialog is used for creation, for editing otherwise
theIsMesh- if this parameter is true then dialog is used for mesh, for sub-mesh otherwise

Makes dialog's look and feel

References Dim0D, Dim1D, Dim2D, Dim3D, Geom, Mesh, myGeomPopup, myHypoSetButton, myMeshType, myTabs, myTabWg, Obj, onChangedMeshType(), setTitile(), and SPACING.

SMESHGUI_MeshDlg::~SMESHGUI_MeshDlg ( )
virtual

Member Function Documentation

int SMESHGUI_MeshDlg::currentMeshType ( )

Get current index types of mesh.

References myMeshType.

Referenced by SMESHGUI_MeshOp::onAlgoSelected(), and SMESHGUI_MeshOp::selectionDone().

SUIT_Desktop * SMESHGUI_Dialog::desktop ( ) const
protectedinherited

find desktop of active application

References MESHCUT::d.

void SMESHGUI_MeshDlg::disableTab ( const int  theTabId)
void SMESHGUI_MeshDlg::enableTab ( const int  theTabId)
void SMESHGUI_MeshDlg::geomSelectionByMesh ( bool  )
signal

Referenced by onGeomPopup().

int SMESHGUI_MeshDlg::getActiveObject ( )
void SMESHGUI_MeshDlg::hypoSet ( const QString &  )
signal

Referenced by onHypoSetPopup().

bool SMESHGUI_MeshDlg::isTabEnabled ( const int  theTabId) const

Check if tab enabled.

Parameters
int- tab ID

References myTabs, and myTabWg.

Referenced by SMESHGUI_MeshOp::isAccessibleDim().

void SMESHGUI_MeshDlg::onChangedMeshType ( const int  isIndex)
privateslot

Emits selectMeshType( const int, const int ) signal.

SLOT is called when a combo box "mesh type" is selected.

References Dim3D, myTabWg, and selectMeshType().

Referenced by SMESHGUI_MeshDlg().

void SMESHGUI_MeshDlg::onGeomPopup ( QAction *  a)
privateslot

SLOT called when a item of Geom selection popup is chosen.

References GEOM_BY_MESH_INDEX, and geomSelectionByMesh().

Referenced by setGeomPopupEnabled().

void SMESHGUI_MeshDlg::onGeomSelectionButton ( bool  isBtnOn)
privateslot

SLOT called when a Geom selection button is clicked.

References myGeomPopup.

Referenced by setGeomPopupEnabled().

void SMESHGUI_MeshDlg::onHypoSetPopup ( QAction *  a)
privateslot

Emits hypoSet signal.

SLOT is called when a hypotheses set is selected. Emits hypoSet signal to notify operation about this event

References hypoSet().

Referenced by setHypoSets().

int SMESHGUI_Dialog::prefix ( const QString &  name)
staticinherited

Return hard-coded prefix using to differ overlapping types.

Referenced by SMESHGUI_Dialog::SMESHGUI_Dialog(), and SMESHGUI_SelectionOp::typeById().

void SMESHGUI_MeshDlg::reset ( )

Resets all dialog fields.

References Dim0D, Dim1D, Dim2D, Dim3D, and myTabs.

Referenced by SMESHGUI_MeshOp::selectionDone().

SUIT_ResourceMgr * SMESHGUI_Dialog::resourceMgr ( ) const
protectedinherited
void SMESHGUI_MeshDlg::selectMeshType ( const int  ,
const int   
)
signal

Referenced by onChangedMeshType().

void SMESHGUI_MeshDlg::setAvailableMeshType ( const QStringList &  theTypeMesh)

Sets available types of mesh.

Parameters
theTypeMesh- list of available types of mesh

References myMeshType.

Referenced by SMESHGUI_MeshOp::setAvailableMeshType().

void SMESHGUI_Dialog::setContentActive ( const bool  active)
virtualinherited

set all content to enable (parameter is true) or disable state

Referenced by SMESHGUI_Operation::setDialogActive().

void SMESHGUI_MeshDlg::setCurrentMeshType ( const int  theIndex)

Set current index types of mesh.

References myMeshType.

Referenced by SMESHGUI_MeshOp::selectionDone().

void SMESHGUI_MeshDlg::setCurrentTab ( const int  theId)
void SMESHGUI_MeshDlg::setGeomPopupEnabled ( const bool  enable)
void SMESHGUI_MeshDlg::setHypoSets ( const QStringList &  theSets)

Sets list of available Sets of Hypotheses.

References myHypoSetButton, and onHypoSetPopup().

Referenced by SMESHGUI_MeshOp::selectionDone(), and SMESHGUI_MeshOp::setFilteredAlgoData().

void SMESHGUI_MeshDlg::setMaxHypoDim ( const int  maxDim)

Enable/disable tabs.

Parameters
int- maximum possible dimension

References Dim0D, Dim3D, disableTab(), enableTab(), myTabs, myTabWg, and setCurrentTab().

Referenced by SMESHGUI_MeshOp::selectionDone().

void SMESHGUI_MeshDlg::setTitile ( const bool  theToCreate,
const bool  theIsMesh 
)

Set dialog title.

Referenced by SMESHGUI_MeshOp::selectionDone(), and SMESHGUI_MeshDlg().

SMESHGUI_MeshTab * SMESHGUI_MeshDlg::tab ( const int  theId) const

Gets tab with given id.

Parameters
theId- Tab identifier. Possible values are in "Dimensions" enumeration
Return values
SMESHGUI_MeshTab*- pointer to the tab or null if given parameter is invalid

Gets tab containing controls for definition of algorithms and AddHypotheses

References Dim0D, Dim3D, and myTabs.

Referenced by SMESHGUI_MeshOp::currentHyp(), getTabDim(), SMESHGUI_MeshOp::nbDlgHypTypes(), SMESHGUI_MeshOp::onAlgoSelected(), SMESHGUI_MeshOp::onHypoCreated(), SMESHGUI_MeshOp::processSet(), SMESHGUI_MeshOp::readMesh(), SMESHGUI_MeshOp::selectionDone(), SMESHGUI_MeshOp::setCurrentHyp(), SMESHGUI_MeshOp::setFilteredAlgoData(), and SMESHGUI_MeshOp::startOperation().

Field Documentation

QMenu* SMESHGUI_MeshDlg::myGeomPopup
private
QToolButton* SMESHGUI_MeshDlg::myHypoSetButton
private
QComboBox* SMESHGUI_MeshDlg::myMeshType
private
QMap<int, SMESHGUI_MeshTab*> SMESHGUI_MeshDlg::myTabs
private
QTabWidget* SMESHGUI_MeshDlg::myTabWg
private