1 // Copyright (C) 2020-2022 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef SMESHGUI_MG_ADAPTDRIVER_H
21 #define SMESHGUI_MG_ADAPTDRIVER_H
23 #include "SMESH_SMESHGUI.hxx"
26 #include "SMESHGUI_MgAdaptDlg.h"
29 #include <SALOMEconfig.h>
30 #include CORBA_SERVER_HEADER(SMESH_Mesh)
31 #include CORBA_SERVER_HEADER(MG_ADAPT)
34 class LightApp_SelectionMgr;
37 // int IObjectCount();
38 // const SALOME_ListIO& selectedIO();
39 // _PTR(Study) getStudy();
40 // Handle(SALOME_InteractiveObject) firstIObject();
41 // bool createAndPublishMed(QString fileName);
42 // bool createMgAdaptObject(MgAdapt* myMgAdapt = 0);
45 class SMESHGUI_MG_ADAPTDRIVER : public SMESHGUI_MgAdaptDlg
50 SMESHGUI_MG_ADAPTDRIVER( SMESHGUI*, SMESH::MG_ADAPT_ptr, bool isCreation = true );
51 void setMyMesh(SMESH::SMESH_Mesh_var);
52 SMESH::SMESH_Mesh_var getMyMesh() ;
56 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
57 LightApp_SelectionMgr* selMgr ;
58 LightApp_SelectionMgr* selectionMgr();
59 SMESH::SMESH_Mesh_var myMesh ;
60 bool myIsApplyAndClose;
62 void enterEvent( QEvent* ); /* mouse enter the QWidget */
63 void keyPressEvent( QKeyEvent* );
66 bool createMeshInObjectBrowser();
67 void setIsApplyAndClose( const bool theFlag );
68 bool isApplyAndClose() const;
73 void selectionChanged();
74 void updateSelection();
80 void exportMED(const char* );
82 virtual bool PushOnApply();
83 virtual void PushOnOK();
84 virtual void PushOnHelp();
86 void deactivateActiveDialog();
87 void activateThisDialog();
90 #endif // SMESHGUI_MG_ADAPTDRIVER_H