2015-02-10 14:25:19 +05:00
|
|
|
// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
|
2004-01-07 20:46:21 +05:00
|
|
|
//
|
2012-08-09 13:58:02 +06:00
|
|
|
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
|
|
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
2004-01-07 20:46:21 +05:00
|
|
|
//
|
2012-08-09 13:58:02 +06:00
|
|
|
// This library is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation; either
|
2014-02-18 12:44:41 +06:00
|
|
|
// version 2.1 of the License, or (at your option) any later version.
|
2004-01-07 20:46:21 +05:00
|
|
|
//
|
2012-08-09 13:58:02 +06:00
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Lesser General Public License for more details.
|
2009-02-13 17:16:39 +05:00
|
|
|
//
|
2012-08-09 13:58:02 +06:00
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this library; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2009-02-13 17:16:39 +05:00
|
|
|
//
|
2012-08-09 13:58:02 +06:00
|
|
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
2013-04-01 18:25:01 +06:00
|
|
|
//
|
2012-08-09 13:58:02 +06:00
|
|
|
|
2009-02-13 17:16:39 +05:00
|
|
|
// GEOM GEOMGUI : GUI for Geometry component
|
|
|
|
// File : GenerationGUI.cxx
|
|
|
|
// Author : Damien COQUERET, Open CASCADE S.A.S.
|
2012-12-13 14:40:36 +06:00
|
|
|
|
2004-01-07 20:46:21 +05:00
|
|
|
#include "GenerationGUI.h"
|
|
|
|
|
2009-02-13 17:16:39 +05:00
|
|
|
#include <GeometryGUI.h>
|
2012-08-09 13:58:02 +06:00
|
|
|
#include "GeometryGUI_Operations.h"
|
2004-01-07 20:46:21 +05:00
|
|
|
|
2009-02-13 17:16:39 +05:00
|
|
|
#include <SUIT_Desktop.h>
|
|
|
|
#include <SalomeApp_Application.h>
|
2008-03-07 12:45:34 +05:00
|
|
|
|
2004-01-07 20:46:21 +05:00
|
|
|
#include "GenerationGUI_PrismDlg.h" // Method PRISM
|
|
|
|
#include "GenerationGUI_RevolDlg.h" // Method REVOL
|
|
|
|
#include "GenerationGUI_FillingDlg.h" // Method FILLING
|
|
|
|
#include "GenerationGUI_PipeDlg.h" // Method PIPE
|
2012-12-13 14:40:36 +06:00
|
|
|
#include "GenerationGUI_PipePathDlg.h" // Method RESTORE PATH
|
2015-03-16 19:23:18 +05:00
|
|
|
#include "GenerationGUI_ThicknessDlg.h" // Method THICKNESS
|
2004-01-07 20:46:21 +05:00
|
|
|
|
|
|
|
//=======================================================================
|
|
|
|
// function : GenerationGUI()
|
|
|
|
// purpose : Constructor
|
|
|
|
//=======================================================================
|
2009-02-13 17:16:39 +05:00
|
|
|
GenerationGUI::GenerationGUI( GeometryGUI* parent )
|
|
|
|
: GEOMGUI( parent )
|
2004-01-07 20:46:21 +05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//=======================================================================
|
|
|
|
// function : ~GenerationGUI()
|
|
|
|
// purpose : Destructor
|
|
|
|
//=======================================================================
|
|
|
|
GenerationGUI::~GenerationGUI()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//=======================================================================
|
|
|
|
// function : OnGUIEvent()
|
|
|
|
// purpose :
|
|
|
|
//=======================================================================
|
2005-06-02 13:17:09 +06:00
|
|
|
bool GenerationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
|
2004-01-07 20:46:21 +05:00
|
|
|
{
|
2008-03-07 12:45:34 +05:00
|
|
|
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
|
|
|
if ( !app ) return false;
|
|
|
|
|
2005-06-02 13:17:09 +06:00
|
|
|
getGeometryGUI()->EmitSignalDeactivateDialog();
|
2008-03-07 12:45:34 +05:00
|
|
|
|
2004-12-01 15:39:14 +05:00
|
|
|
QDialog* aDlg = NULL;
|
|
|
|
|
2009-02-13 17:16:39 +05:00
|
|
|
switch ( theCommandID ) {
|
2015-03-16 19:23:18 +05:00
|
|
|
case GEOMOp::OpPrism: aDlg = new GenerationGUI_PrismDlg ( getGeometryGUI(), parent ); break;
|
|
|
|
case GEOMOp::OpRevolution: aDlg = new GenerationGUI_RevolDlg ( getGeometryGUI(), parent ); break;
|
|
|
|
case GEOMOp::OpFilling: aDlg = new GenerationGUI_FillingDlg ( getGeometryGUI(), parent ); break;
|
|
|
|
case GEOMOp::OpPipe: aDlg = new GenerationGUI_PipeDlg ( getGeometryGUI(), parent ); break;
|
|
|
|
case GEOMOp::OpPipePath: aDlg = new GenerationGUI_PipePathDlg ( getGeometryGUI(), parent ); break;
|
|
|
|
case GEOMOp::OpThickness: aDlg = new GenerationGUI_ThicknessDlg( getGeometryGUI(), parent ); break;
|
2004-12-01 15:39:14 +05:00
|
|
|
|
2009-02-13 17:16:39 +05:00
|
|
|
default: app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) ); break;
|
2004-01-07 20:46:21 +05:00
|
|
|
}
|
|
|
|
|
2009-02-13 17:16:39 +05:00
|
|
|
if (aDlg != NULL )
|
2004-12-01 15:39:14 +05:00
|
|
|
aDlg->show();
|
2008-03-07 12:45:34 +05:00
|
|
|
|
2004-12-01 15:39:14 +05:00
|
|
|
return true;
|
2004-01-07 20:46:21 +05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//=====================================================================================
|
|
|
|
// EXPORTED METHODS
|
|
|
|
//=====================================================================================
|
|
|
|
extern "C"
|
|
|
|
{
|
2009-02-13 17:16:39 +05:00
|
|
|
#ifdef WIN32
|
|
|
|
__declspec( dllexport )
|
|
|
|
#endif
|
|
|
|
GEOMGUI* GetLibGUI( GeometryGUI* parent )
|
2004-12-01 15:39:14 +05:00
|
|
|
{
|
2009-02-13 17:16:39 +05:00
|
|
|
return new GenerationGUI( parent );
|
2004-12-01 15:39:14 +05:00
|
|
|
}
|
2004-01-07 20:46:21 +05:00
|
|
|
}
|