1 // Copyright (C) 2014-2015 EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License, or (at your option) any later version.
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 // Lesser General Public License for more details.
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef HYDROGUI_IMPORTGEOMOBJECTOP_H
20 #define HYDROGUI_IMPORTGEOMOBJECTOP_H
22 #include "HYDROGUI_Operation.h"
24 #include <QStringList>
27 #include <SALOMEconfig.h>
28 #include CORBA_SERVER_HEADER(GEOM_Gen)
30 class HYDROGUI_InputPanel;
32 class HYDROGUI_ImportGeomObjectOp : public HYDROGUI_Operation
37 enum OperationType { ImportCreatedAsObstacle,
38 ImportSelectedAsObstacle,
39 ImportSelectedAsPolyline };
42 HYDROGUI_ImportGeomObjectOp( HYDROGUI_Module* theModule,
44 const int theGEOMOp = -1 );
45 virtual ~HYDROGUI_ImportGeomObjectOp();
47 static QList<GEOM::shape_type> getObstacleTypes();
48 static QList<GEOM::shape_type> getPolylineTypes();
51 virtual void startOperation();
52 virtual void abortOperation();
53 virtual void commitOperation();
55 virtual HYDROGUI_InputPanel* createInputPanel() const;
57 virtual bool processApply( int& theUpdateFlags, QString& theErrorMsg,
58 QStringList& theBrowseObjectsEntries );
61 void onExternalOperationFinished( const QString&, const QString&,
65 void updateDefaultName();
66 void closeExternalOperationDlg();
69 QStringList myGeomObjects; ///< the list of GEOM object entries
70 bool myIsToShowPanel; ///< indicates if obstacle panel to be shown
71 int myOpType; ///< operation type (to import selected GEOM objects or the objects just created by GEOM )
72 int myGEOMOp; ///< GEOM module operation to be called to create GEOM object for import
73 QString myGEOMOpName; ///< the name of the called GEOM module operation