// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
/**
* SMESH SMESHGUI
// Create tab widget
myTabWg = new QTabWidget( mainFrame() );
+ myTabs[ Dim0D ] = new SMESHGUI_MeshTab( myTabWg );
myTabs[ Dim1D ] = new SMESHGUI_MeshTab( myTabWg );
myTabs[ Dim2D ] = new SMESHGUI_MeshTab( myTabWg );
myTabs[ Dim3D ] = new SMESHGUI_MeshTab( myTabWg );
myTabWg->addTab( myTabs[ Dim3D ], tr( "DIM_3D" ) );
myTabWg->addTab( myTabs[ Dim2D ], tr( "DIM_2D" ) );
myTabWg->addTab( myTabs[ Dim1D ], tr( "DIM_1D" ) );
+ myTabWg->addTab( myTabs[ Dim0D ], tr( "DIM_0D" ) );
// Hypotheses Sets
myHypoSetPopup = new QPopupMenu();
//================================================================================
SMESHGUI_MeshTab* SMESHGUI_MeshDlg::tab( const int theId ) const
{
- return ( theId >= Dim1D && theId <= Dim3D ? myTabs[ theId ] : 0 );
+ return ( theId >= Dim0D && theId <= Dim3D ? myTabs[ theId ] : 0 );
}
//================================================================================
void SMESHGUI_MeshDlg::reset()
{
clearSelection();
+ myTabs[ Dim0D ]->reset();
myTabs[ Dim1D ]->reset();
myTabs[ Dim2D ]->reset();
myTabs[ Dim3D ]->reset();
void SMESHGUI_MeshDlg::setMaxHypoDim( const int maxDim )
{
- const int DIM = maxDim - 1;
- for ( int dim = Dim1D; dim <= Dim3D; ++dim ) {
+ const int DIM = maxDim;
+ for ( int dim = Dim0D; dim <= Dim3D; ++dim ) {
bool enable = ( dim <= DIM );
if ( !enable )
myTabs[ dim ]->reset();
}
}
+
+//================================================================================
+/*!
+ * \brief Disable tab
+ * \param int - tab ID
+ */
+//================================================================================
+void SMESHGUI_MeshDlg::disableTab(const int theTabId) {
+ myTabWg->setTabEnabled( myTabs[ theTabId ], false );
+}
+
+//================================================================================
+/*!
+ * \brief Enable tabs
+ * \param int - tab ID
+ */
+//================================================================================
+void SMESHGUI_MeshDlg::enableTab(const int theTabId) {
+ myTabWg->setTabEnabled( myTabs[ theTabId ], true );
+}
+
void SMESHGUI_MeshDlg::onGeomSelectionButton(bool isBtnOn)
{
if ( myGeomPopup && isBtnOn )