X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FACISPluginGUI.cxx;fp=src%2FACISPluginGUI.cxx;h=0000000000000000000000000000000000000000;hb=1452be8c2842890c0309ed5bbfce86af6555d439;hp=08fb2b680362ea4536e9326eb6d51f4c59e25d26;hpb=c3960efabe4aa89aee833e297d09aa4698de248d;p=plugins%2Facisplugin.git diff --git a/src/ACISPluginGUI.cxx b/src/ACISPluginGUI.cxx deleted file mode 100644 index 08fb2b6..0000000 --- a/src/ACISPluginGUI.cxx +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (C) 2014 CEA/DEN, EDF R&D, 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, 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 -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// 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 -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// internal includes -#include "ACISPluginGUI.h" -#include "ACISPlugin_ExportDlg.h" -#include "ACISPlugin_ImportDlg.h" - -// GUI includes -#include -#include -#include -#include -#include - -// GEOM includes -#include - -//======================================================================= -// function : ACISPluginGUI() -// purpose : Constructor -//======================================================================= -ACISPluginGUI::ACISPluginGUI( GeometryGUI* parent ) : GEOMPluginGUI( parent ) -{ -} - -//======================================================================= -// function : ~ACISPluginGUI -// purpose : Destructor -//======================================================================= -ACISPluginGUI::~ACISPluginGUI() -{ -} - -//======================================================================= -// function : OnGUIEvent() -// purpose : -//======================================================================= -bool ACISPluginGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) -{ - switch ( theCommandID ) { - case 1: - return OnGUIEvent("Export_ACIS", parent); - case 2: - return OnGUIEvent("Import_ACIS", parent); - default: - return OnGUIEvent("", parent); - } - return false; -} - -//======================================================================= -// function : OnGUIEvent() -// purpose : -//======================================================================= -bool ACISPluginGUI::OnGUIEvent( const QString& theCommandID, SUIT_Desktop* parent ) -{ - SalomeApp_Application* app = getGeometryGUI()->getApp(); - if (!app) return false; - - getGeometryGUI()->EmitSignalDeactivateDialog(); - - SUIT_FileDlg* dialog = NULL; - if( theCommandID == "Export_ACIS" ) { - // Get selected objects - LightApp_SelectionMgr* sm = app->selectionMgr(); - if( !sm ) return false; - SALOME_ListIO selectedObjects; - sm->selectedObjects( selectedObjects ); - if( selectedObjects.Extent() == 0 ) { - SUIT_MessageBox::warning( app->desktop(), - QObject::tr("WRN_WARNING"), - QObject::tr("GEOM_WRN_NO_APPROPRIATE_SELECTION") ); - } - else { - SALOME_ListIteratorOfListIO It( selectedObjects ); - for( ; It.More(); It.Next() ) { - Handle(SALOME_InteractiveObject) IObject = It.Value(); - dialog = new ACISPlugin_ExportDlg( IObject, parent ); - if( dialog->exec() == QDialog::Accepted ) - delete dialog; - } - } - } - else if (theCommandID == "Import_ACIS") { - dialog = new ACISPlugin_ImportDlg( parent ); - if (dialog != NULL) - dialog->show(); - if( dialog->exec() == QDialog::Accepted ) - delete dialog; - } - else { - app->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) ); - } - - return true; -} - -//===================================================================================== -// EXPORTED METHODS -//===================================================================================== -extern "C" -{ -#ifdef WIN32 - __declspec( dllexport ) -#endif - GEOMGUI* GetLibGUI( GeometryGUI* parent ) - { - return new ACISPluginGUI( parent ); - } -}