Salome HOME
SMH: 3.0.0 preparation - merged and adopted version (POLYWORK+HEAD)
[modules/visu.git] / src / VISUGUI / VisuGUI_Selection.h
index c4aeed1b9deba97a69c5d6ad8ff99eb365cdeee2..86c8ddb518456fe1da95e43d325c505774cfa78a 100644 (file)
@@ -1,73 +1,98 @@
-//  File      : VisuGUI_Selection.h
-//  Created   : Wed Apr 03 10:23:06 2002
-//  Author    : Laurent CORNABE & Hubert ROLLAND 
-//  Project   : SALOME
-//  Module    : VISUGUI
-//  Copyright : PRINCIPIA
+//  VISU VISUGUI : GUI of VISU component
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  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. 
+// 
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : VisuGUI_Selection.h
+//  Author : Laurent CORNABE & Hubert ROLLAND 
+//  Module : VISU
 //  $Header$
 
 #ifndef VisuGUI_Selection_HeaderFile
 #define VisuGUI_Selection_HeaderFile
 
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#include "QAD_Desktop.h"
-#include <vtkRenderer.h>
-#include <vtkRenderWindowInteractor.h>
-#include <SALOMEconfig.h>
+#include "SALOMEconfig.h"
 #include "VISU_Actor.h"
-       
-#define SelectionPoint 1
-#define SelectionEdge  2
-#define SelectionCell  3
-#define SelectionActor 4
+#include "SVTK_Selection.h"
 
-class VisuGUI_Selection
-{
+#include <vtkDataSet.h>
 
-public :
+#include <qdialog.h>
 
-// Methods PUBLIC
-// 
-//
+class QLabel;
+class QWidgetStack;
+class QVBox;
+class QLineEdit;
+class QTable;
+class SalomeApp_SelectionMgr;
+class SalomeApp_Application;
 
-int PickViewer(QAD_Study *ActiveStudy, int mode);        
-void PickingResults(QAD_Study *ActiveStudy, int mode, VISU_Actor *Actor);
+class VisuGUI_SelectionDlg: public QDialog {
+  Q_OBJECT
 
-void PickingCell(QAD_Study *ActiveStudy, VISU_Actor *Actor);
-void PickingPoint(QAD_Study *ActiveStudy, VISU_Actor *Actor);
-void HighlightCell(int idCell, VISU_Actor *Actor, vtkRenderer *ren);
-void HighlightPoint(int idPoint, int nbPoints, VISU_Actor *Actor, vtkRenderer *ren);
-
-int getId();
-char *getMsg(int nb);
-float *getCoord();
-float getScalar();
-float *getVector();
-int getMode();
+public:
+  VisuGUI_SelectionDlg (QWidget*);
+  virtual ~VisuGUI_SelectionDlg ();
 
 protected:
-
- // Methods PROTECTED
- // 
-
-
- // Fields PROTECTED
- //
-
-
-private: 
-
- // Methods PRIVATE
- // 
-
-
- // Fields PRIVATE
- //
-
+  void closeEvent (QCloseEvent* theEvent);
+
+private slots:
+  void onSelectionChange (int theId);
+  void onSelectionEvent ();
+  void onPointIdEdit (const QString& theText);
+  void onCellIdEdit (const QString& theText);
+
+ private:
+  void clearFields ();
+
+  QLabel* myMeshName;
+  QLabel* myFieldName;
+
+  QWidgetStack* myWidgetStack;
+  QVBox* myPointsPane;
+  QWidget* myCellsPane;
+  QLabel* myXValLbl;
+  QLabel* myYValLbl;
+  QLabel* myZValLbl;
+
+  QLineEdit* myIDValLbl;
+  QLabel* myScalarValLbl;
+  QLabel* myVectorValLbl;
+
+  QTable* myListPoints;
+  QLineEdit* myCellIDValLbl;
+  QLabel* myCellScalarValLbl;
+  QLabel* myCellVectorValLbl;
+
+  QVBox* myActorsPane;
+  QLabel* myXPosLbl;
+  QLabel* myYPosLbl;
+  QLabel* myZPosLbl;
+  QLabel* myDXLbl;
+  QLabel* myDYLbl;
+  QLabel* myDZLbl;
+
+  SalomeApp_SelectionMgr* mySelectionMgr;
+  bool myFl;
 };
 
 #endif