]> SALOME platform Git repositories - modules/visu.git/blob - src/VVTK/VVTK_PickingDlg.h
Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[modules/visu.git] / src / VVTK / VVTK_PickingDlg.h
1 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
3 // 
4 //  This library is free software; you can redistribute it and/or 
5 //  modify it under the terms of the GNU Lesser General Public 
6 //  License as published by the Free Software Foundation; either 
7 //  version 2.1 of the License. 
8 // 
9 //  This library is distributed in the hope that it will be useful, 
10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 //  Lesser General Public License for more details. 
13 // 
14 //  You should have received a copy of the GNU Lesser General Public 
15 //  License along with this library; if not, write to the Free Software 
16 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
17 // 
18 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 //  File   : VVTK_PickingDlg.h
21 //  Author : Oleg Uvarov
22 //  Module : VISU
23
24 #ifndef VVTK_PICKINGDLG_H
25 #define VVTK_PICKINGDLG_H
26
27 #include "SVTK_DialogBase.h"
28
29 #include <vtkObject.h>
30 #include <vtkSmartPointer.h>
31
32 class vtkActorCollection;
33 class vtkCallbackCommand;
34 class vtkImageData;
35
36 class QLabel;
37 class QComboBox;
38 class QCheckBox;
39 class QPushButton;
40
41 class QtxAction;
42 class QtxDblSpinBox;
43 class QtxIntSpinBox;
44
45 class VISU_GaussPtsAct;
46 class VISU_PickingSettings;
47
48 class SVTK_MainWindow;
49 class SVTK_RenderWindowInteractor;
50
51 //! Picking Dialog.
52 /*!
53  * Uses for set up picking preferenses and apply
54  * them to all actors in the current renderer.
55  */
56 class VVTK_PickingDlg : public SVTK_DialogBase
57 {
58   Q_OBJECT
59
60 public:
61   VVTK_PickingDlg(QtxAction* theAction,
62                   SVTK_MainWindow* theParent,
63                   const char* theName);
64
65   ~VVTK_PickingDlg();
66
67   //! Make an actor to listen the event of Update Picking Settings event.
68   void             AddActor( VISU_GaussPtsAct* );
69   void             RemoveActor( VISU_GaussPtsAct* );
70
71   //! Update dialog contents.
72   void             Update();
73
74   VISU_PickingSettings* GetPickingSettings();
75
76   void             SetInteractor( SVTK_RenderWindowInteractor* );
77
78 protected slots:
79   void             onClickApply();
80   void             onClickClose();
81   void             onClickHelp();
82
83   void             onColorButtonPressed();
84
85 private:
86   static void      ProcessEvents(vtkObject* theObject, 
87                                  unsigned long theEvent,
88                                  void* theClientData, 
89                                  void* theCallData);
90
91   void             KeyPressed();
92
93 private:
94   QtxDblSpinBox*   myCursorSizeSpinBox;
95   QtxDblSpinBox*   myPyramidHeightSpinBox;
96   QPushButton*     mySelectionColorButton;
97   QtxDblSpinBox*   myPointToleranceSpinBox;
98   QtxIntSpinBox*   myTransparencySpinBox;
99   QComboBox*       myPositionComboBox;
100   QtxDblSpinBox*   myZoomFactorSpinBox;
101   QtxIntSpinBox*   myStepNumberSpinBox;
102   QCheckBox*       myDisplayParentMeshCheckBox;
103
104   QtxAction*       myAction;
105   vtkSmartPointer<VISU_PickingSettings> myPickingSettings;
106
107   SVTK_RenderWindowInteractor* myInteractor;
108
109   float            myPriority;
110   vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
111 };
112
113 #endif