#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
+#include <SalomeApp_Notebook.h>
+
#include <SVTK_ViewWindow.h>
// OCCT includes
//=================================================================================
SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theModule )
: QDialog( SMESH::GetDesktop( theModule ) ),
+ SMESHGUI_Helper( theModule ),
mySMESHGUI( theModule ),
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
myFilterDlg( 0 )
if( retVal == SMESH::SMESH_MeshEditor::EXTR_OK )
- myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+ getNotebook()->setParameters( myMesh, aParameters );
//wc.stop();
wc.suspend();
//=======================================================================
void SMESHGUI_ExtrusionAlongPathDlg::OnAngleAdded()
{
- QString msg;
- if( !AngleSpin->isValid( msg, true ) ) {
- QString str( tr( "SMESH_INCORRECT_INPUT" ) );
- if ( !msg.isEmpty() )
- str += "\n" + msg;
- SUIT_MessageBox::critical( this, tr( "SMESH_ERROR" ), str );
+ if( !checkParameters( true, 1, AngleSpin ) )
return;
- }
+
AnglesList->addItem(AngleSpin->text());
myAnglesList.append(AngleSpin->GetValue());
//=================================================================================
bool SMESHGUI_ExtrusionAlongPathDlg::isValid()
{
- QString msg;
- bool ok = true;
- ok = XSpin->isValid( msg, true ) && ok;
- ok = YSpin->isValid( msg, true ) && ok;
- ok = ZSpin->isValid( msg, true ) && ok;
-
- if( !ok ) {
- QString str( tr( "SMESH_INCORRECT_INPUT" ) );
- if ( !msg.isEmpty() )
- str += "\n" + msg;
- SUIT_MessageBox::critical( this, tr( "SMESH_ERROR" ), str );
- return false;
- }
- return true;
+ return checkParameters( true, 3, XSpin, YSpin, ZSpin );
}
//=================================================================================