Salome HOME
[bos #40653][CEA] New mesh import export formats with meshio.
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MG_ADAPTDRIVER.h
index 7f2e3ee6f3d3be8a8dc1ec82e6d881bd3c5031fb..58388dae7fc1c7dbdf2aa19ecc8b5a1bbf098ec6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2011-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2020-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-// SMESH SMESHGUI : GUI for the adaptation in the SMESH component
-// File : SMESHGUI_MG_ADAPTDRIVER.h
-//
 #ifndef SMESHGUI_MG_ADAPTDRIVER_H
 #define SMESHGUI_MG_ADAPTDRIVER_H
 
-#include <set>
-// SMESH includes
 #include "SMESH_SMESHGUI.hxx"
 
-// Qt includes
-#include <QDialog>
-#include <QTreeWidget>
-#include<QItemDelegate>
-
-#include <QThread>
-
-#include "LightApp_DataOwner.h"
-#include "SalomeApp_Application.h"
-#include <SALOMEconfig.h>
-#include <SALOME_ListIO.hxx>
-#include "SalomeApp_Module.h"
-#include "SalomeApp_Study.h"
-#include <med.h>
-#include <QObject>
 // model
-//~#include "MG_ADAPT.h"
-#include "MG_ADAPTGUI.hxx"
-#include "MG_ADAPT.hxx"
-
-
-class SUIT_ViewWindow;
-class SUIT_Desktop;
-class SUIT_Study;
-class SUIT_ResourceMgr;
-
-class CAM_Module;
-
-class SALOMEDSClient_Study;
-class SALOMEDSClient_SObject;
-
-class SalomeApp_Study;
-class SalomeApp_Module;
-class LightApp_SelectionMgr;
-class SUIT_SelectionFilter;
-
-
-class QButtonGroup;
-class QLineEdit;
-class QGroupBox;
-class QRadioButton;
-class QLabel;
-class QCheckBox;
-class QGridLayout;
-class QTabWidget;
-class QDoubleSpinBox;
-class QSpinBox;
-class QTreeWidget;
-class QTreeWidgetItem;
-class QSpacerItem;
-class QHBoxLayout;
-class QItemDelegate;
-class QComboBox;
-class QObject;
-
+#include "SMESHGUI_MgAdaptDlg.h"
 
 // IDL includes
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SMESH_Mesh)
-#include CORBA_SERVER_HEADER(SMESH_Gen)
-class SMESHGUI;
-class SMESHGUI_MgAdaptDlg;
-class SMESHGUI_IdValidator;
-class SMESHGUI_FilterDlg;
-class MgAdapt;
-class QHeaderView;
-class QFileDialog;
-
-
-int IObjectCount();
-const SALOME_ListIO& selectedIO();
-_PTR(Study) getStudy();
-Handle(SALOME_InteractiveObject) firstIObject();
-bool createAndPublishMed(QString fileName);
-bool createMgAdaptObject(MgAdapt* myMgAdapt = 0);
-
-class SMESHGUI_EXPORT SMESHGUI_MG_AdaptComputeDlg_QThread : public QThread
-{
-    Q_OBJECT
+#include CORBA_SERVER_HEADER(MG_ADAPT)
 
-public:
-    SMESHGUI_MG_AdaptComputeDlg_QThread(MgAdapt* model);
-    int                   result();
-    void                   cancel();
-protected:
-    void run();
+class SMESHGUI;
+class LightApp_SelectionMgr;
+//class MgAdapt;
 
-private:
+// int IObjectCount();
+// const SALOME_ListIO& selectedIO();
+// _PTR(Study) getStudy();
+// Handle(SALOME_InteractiveObject) firstIObject();
+// bool createAndPublishMed(QString fileName);
+// bool createMgAdaptObject(MgAdapt* myMgAdapt = 0);
 
-    MgAdapt* model;
-    int                  myResult;
-};
 
 class  SMESHGUI_MG_ADAPTDRIVER : public SMESHGUI_MgAdaptDlg
 {
-    Q_OBJECT;
+    Q_OBJECT
 
 public :
-    SMESHGUI_MG_ADAPTDRIVER( SMESHGUI*, MgAdapt*, bool isCreation = true );
+    SMESHGUI_MG_ADAPTDRIVER( SMESHGUI*, SMESH::MG_ADAPT_ptr, bool isCreation = true );
     void setMyMesh(SMESH::SMESH_Mesh_var);
     SMESH::SMESH_Mesh_var getMyMesh() ;
 
 private :
 
-    SMESHGUI*                     mySMESHGUI;              /* Current SMESHGUI object */
+    SMESHGUI*              mySMESHGUI;              /* Current SMESHGUI object */
     LightApp_SelectionMgr* selMgr ;
-    SUIT_ResourceMgr* resMgr;
-    SUIT_ResourceMgr* resourceMgr();
     LightApp_SelectionMgr* selectionMgr();
-    SMESH::SMESH_Mesh_var myMesh ;
-
-
+    SMESH::SMESH_Mesh_var  myMesh ;
+    bool                   myIsApplyAndClose;
 
-    void                   Init( bool = true );
     void                   enterEvent( QEvent* );           /* mouse enter the QWidget */
     void                   keyPressEvent( QKeyEvent* );
-    QString                getErrorMsg( SMESH::string_array_var invalidEntries,
-                                        QStringList &           entriesToBrowse );
 
     bool                   isValid();
     bool                   createMeshInObjectBrowser();
     void                   setIsApplyAndClose( const bool theFlag );
     bool                   isApplyAndClose() const;
     bool                   execute();
-    SMESHGUI_IdValidator*  myIdValidator;
-    int                    myNbOkElements;          /* to check when elements are defined */
-
-    SVTK_Selector*         mySelector;
-
-    bool                   myBusy;
-    GEOM::GEOM_Object_var  myNewGeometry;
-    //~SMESH_Actor*           myActor;  //
-    SUIT_SelectionFilter*  myIdSourceFilter;
-
-    SMESH::SMESH_IDSource_var mySelectedObject;
-
-    QTabWidget*           myTabWidget;
-    QButtonGroup*          GroupConstructors;
-
-    QGroupBox*             ConstructorsBox;
-    QGroupBox*             GroupArguments;
-    QGroupBox*             GroupButtons;
-
-    QPushButton*           buttonOk;
-    QPushButton*           buttonCancel;
-    QPushButton*           buttonApply;
-    QPushButton*           buttonHelp;
 
-    QLabel*                myTextLabelElements;
-    QLabel*                myGeomLabel;
-    QLineEdit*             myLineEditElements;
-    QLineEdit*             myMeshNameEdit;
-    QLineEdit*             myGeomNameEdit;
-    QCheckBox*             myIdSourceCheck;
-    QCheckBox*             myCopyGroupsCheck;
-    QCheckBox*             myReuseHypCheck;
-    QCheckBox*             myCopyElementsCheck;
-    QCheckBox*             myKeepIdsCheck;
 
-    QPushButton*           myFilterBtn;
-    SMESHGUI_FilterDlg*    myFilterDlg;
-
-    QString                myHelpFileName;
-
-    bool                   myIsApplyAndClose;
-
-    QString             inputMeshName;
-    QString           outputMeshName;
 private slots:
     void selectionChanged();
     void updateSelection();
@@ -205,23 +79,12 @@ private slots:
 
     void exportMED(const char* );
 
-    virtual bool clickOnApply();
-    virtual void                   clickOnOk();
-    virtual void           clickOnHelp();
-    //~void                   SelectionIntoArgument();
-    void                   deactivateActiveDialog();
-    void                   activateThisDialog();
-    void                   onConstructor( int );
-    //~void                   onTextChange( const QString& );
-    //~void                   onSelectIdSource( bool );
-    void                   setFilters();
-    void                   onOpenView();
-    void                   onCloseView();
-
+    virtual bool PushOnApply();
+    virtual void PushOnOK();
+    virtual void PushOnHelp();
 
+    void         deactivateActiveDialog();
+    void         activateThisDialog();
 };
 
-
-
-
 #endif // SMESHGUI_MG_ADAPTDRIVER_H