-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
//
// 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
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include "AdvancedGUI.h"
#include "GeometryGUI.h"
-#include "GeometryGUI_Operations.h"
+//#include "GeometryGUI_Operations.h"
#include <SUIT_Desktop.h>
#include <SalomeApp_Application.h>
#include "AdvancedGUI_PipeTShapeDlg.h"
#include "AdvancedGUI_DividedDiskDlg.h"
#include "AdvancedGUI_DividedCylinderDlg.h"
+#include "AdvancedGUI_SmoothingSurfaceDlg.h"
//@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@//
#include <QDialog>
+#include <iostream>
+
//=======================================================================
// function : AdvancedGUI()
// purpose : Constructor
//=======================================================================
-AdvancedGUI::AdvancedGUI( GeometryGUI* parent ) : GEOMGUI( parent )
+AdvancedGUI::AdvancedGUI( GeometryGUI* parent ) : GEOMPluginGUI( parent )
{
}
// purpose :
//=======================================================================
bool AdvancedGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
+{
+ switch ( theCommandID ) {
+ case 1:
+ return OnGUIEvent("TShape_Basic", parent);
+ case 2:
+ return OnGUIEvent("DividedDisk", parent);
+ case 3:
+ return OnGUIEvent("DividedCylinder", parent);
+ case 4:
+ return OnGUIEvent("SmoothingSurface", parent);
+ //@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@//
+ default:
+ return OnGUIEvent("", parent);
+ }
+ return false;
+}
+
+//=======================================================================
+// function : OnGUIEvent()
+// purpose :
+//=======================================================================
+bool AdvancedGUI::OnGUIEvent( const QString& theCommandID, SUIT_Desktop* parent )
{
SalomeApp_Application* app = getGeometryGUI()->getApp();
if ( !app ) return false;
QDialog* aDlg = NULL;
- switch ( theCommandID ) {
- case GEOMOp::OpPipeTShape:
+ if (theCommandID == "TShape_Basic") {
aDlg = new AdvancedGUI_PipeTShapeDlg( getGeometryGUI(), parent );
- break;
-// case GEOMOp::OpPipeTShapeGroups:
-// aDlg = new AdvancedGUI_PipeTShapeGroupsDlg( getGeometryGUI(), parent );
-// break;
- case GEOMOp::OpDividedDisk:
+ }
+ //else if (theCommandID == "TShape_Groups") {
+ // aDlg = new AdvancedGUI_PipeTShapeGroupsDlg( getGeometryGUI(), parent );
+ //}
+ else if (theCommandID == "DividedDisk") {
aDlg = new AdvancedGUI_DividedDiskDlg( getGeometryGUI(), parent );
- break;
- case GEOMOp::OpDividedCylinder:
+ }
+ else if (theCommandID == "DividedCylinder") {
aDlg = new AdvancedGUI_DividedCylinderDlg( getGeometryGUI(), parent );
- break;
+ }
+ else if (theCommandID == "SmoothingSurface") {
+ aDlg = new AdvancedGUI_SmoothingSurfaceDlg( getGeometryGUI(), parent );
+ }
//@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@//
- default:
+ else {
app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) );
- break;
}
if ( aDlg != NULL )
#ifdef WIN32
__declspec( dllexport )
#endif
- GEOMGUI* GetLibGUI( GeometryGUI* parent )
+ GEOMPluginGUI* GetLibGUI( GeometryGUI* parent )
{
return new AdvancedGUI( parent );
}