Salome HOME
Debug, reduce code, mesh selection, dump python.
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ReorientFacesDlg.h
index 6d03a5770374cc514888a00278936a74e347b50e..5b86db6ffbce2627ac482e4a3864c6fa7d3f1d38 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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
 #define SMESHGUI_ReorientFacesDlg_H
 
 // SMESH includes
+
 #include "SMESH_SMESHGUI.hxx"
 
 #include "SMESHGUI_Dialog.h"
 #include "SMESHGUI_SelectionOp.h"
 
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SMESH_Mesh)
+
 class QButtonGroup;
+class QCheckBox;
 class QLineEdit;
 class SMESHGUI_SpinBox;
 class SMESHGUI_ReorientFacesDlg;
+class SMESH_TypeFilter;
 
-/*!
- * \brief Operation to reorient faces acoording to vector
+/*! ================================================================================
+ * \brief Operation to reorient faces according to some criterion
  */
+
 class SMESHGUI_EXPORT SMESHGUI_ReorientFacesOp: public SMESHGUI_SelectionOp
 {
   Q_OBJECT
 
-public:
+ public:
   SMESHGUI_ReorientFacesOp();
   virtual ~SMESHGUI_ReorientFacesOp();
 
   virtual LightApp_Dialog*       dlg() const;
 
-protected:
+ protected:
 
   virtual void                   startOperation();
   virtual void                   stopOperation();
@@ -59,34 +66,43 @@ protected:
   virtual void                   selectionDone();
 
   bool                           isValid( QString& );
+  void                           setRefFiltersByConstructor();
+  int                            constructorID();
+
 
-protected slots:
+ protected slots:
   virtual bool                   onApply();
 
-private slots:
+ private slots:
   virtual void                   onActivateObject( int );
   void                           redisplayPreview();
   void                           onTextChange( const QString& );
+  bool                           onlyOneObjAllowed();
 
-private:
-  SMESHGUI_ReorientFacesDlg*    myDlg;
+ private:
+
+  SMESHGUI_ReorientFacesDlg* myDlg;
+
+  SMESH_Actor*               myObjectActor;
+  int                        mySelectionMode;
 
-  //SMESHGUI_MeshEditPreview*     myVectorPreview;
-  SMESH_Actor*                  myObjectActor;
-  int                           mySelectionMode;
+  SMESH_TypeFilter*          myRefGroupFilter;
+  SMESH_TypeFilter*          myRefSubMeshFilter;
+  SMESH_TypeFilter*          myRefMeshFilter;
 
-  SMESH::SMESH_IDSource_var     myObject;
+  SMESH::ListOfIDSources_var myObjects;
+  SMESH::ListOfIDSources_var myRefGroups;
 };
 
-/*!
- * \brief Dialog to reorient faces acoording to vector
+/*! ================================================================================
+ * \brief Dialog to reorient faces according to vector
  */
 
 class SMESHGUI_EXPORT SMESHGUI_ReorientFacesDlg : public SMESHGUI_Dialog
 {
   Q_OBJECT
 
-public:
+ public:
   SMESHGUI_ReorientFacesDlg();
 
 public slots:
@@ -94,10 +110,14 @@ public slots:
 
 private:
   QWidget*                      createMainFrame( QWidget* );
+  void                          setLabel( int object, const char* text );
   
   QButtonGroup*                 myConstructorGrp;
   QFrame*                       myFaceFrm;
   QFrame*                       myPointFrm;
+  QFrame*                       myDirFrm;
+  QFrame*                       myRefGroupFrm;
+  QCheckBox*                    myOutsideChk;
   SMESHGUI_SpinBox*             myX;
   SMESHGUI_SpinBox*             myY;
   SMESHGUI_SpinBox*             myZ;