Salome HOME
Fix for Bug IPAL8945
[modules/visu.git] / src / VVTK / VVTK_PickingDlg.h
1 //  VISU VISUGUI : GUI of VISU component
2 //
3 //  Copyright (C) 2003  CEA/DEN, EDF R&D
4 //
5 //
6 //
7 //  File   : VVTK_PickingDlg.h
8 //  Author : Oleg Uvarov
9 //  Module : VISU
10
11 #ifndef VVTK_PICKINGDLG_H
12 #define VVTK_PICKINGDLG_H
13
14 #include <qdialog.h>
15
16 #include <vtkObject.h>
17 #include <vtkSmartPointer.h>
18
19 class vtkActorCollection;
20 class vtkCallbackCommand;
21 class vtkImageData;
22
23 class QLabel;
24 class QComboBox;
25 class QCheckBox;
26 class QPushButton;
27
28 class QtxAction;
29 class QtxDblSpinBox;
30 class QtxIntSpinBox;
31
32 class VISU_GaussPtsAct;
33 class VISU_PickingSettings;
34
35 class SVTK_RenderWindowInteractor;
36
37 //! Picking Dialog.
38 /*!
39  * Uses for set up picking preferenses and apply
40  * them to all actors in the current renderer.
41  */
42 class VVTK_PickingDlg : public QDialog
43 {
44   Q_OBJECT
45
46 public:
47   VVTK_PickingDlg( QWidget* parent = 0, const char* name = 0 );
48   ~VVTK_PickingDlg();
49
50   //! Used to switch toggle state of the Picking action.
51   void             SetAction( QtxAction* theAction ) { myAction = theAction; }
52
53   //! Make an actor to listen the event of Update Picking Settings event.
54   void             AddActor( VISU_GaussPtsAct* );
55   void             RemoveActor( VISU_GaussPtsAct* );
56
57   //! Update dialog contents.
58   void             Update();
59
60   VISU_PickingSettings* GetPickingSettings();
61
62   void             SetInteractor( SVTK_RenderWindowInteractor* );
63
64 protected slots:
65   virtual void     done( int );
66
67   void             onClickApply();
68   void             onClickClose();
69
70   void             onColorButtonPressed();
71
72 private:
73   static void      ProcessEvents(vtkObject* theObject, 
74                                  unsigned long theEvent,
75                                  void* theClientData, 
76                                  void* theCallData);
77
78   void             KeyPressed();
79
80 private:
81   QtxDblSpinBox*   myCursorSizeSpinBox;
82   QtxDblSpinBox*   myPyramidHeightSpinBox;
83   QPushButton*     mySelectionColorButton;
84   QtxDblSpinBox*   myPointToleranceSpinBox;
85   QtxIntSpinBox*   myTransparencySpinBox;
86   QComboBox*       myPositionComboBox;
87   QtxDblSpinBox*   myZoomFactorSpinBox;
88   QtxIntSpinBox*   myStepNumberSpinBox;
89   QCheckBox*       myDisplayParentMeshCheckBox;
90
91   QtxAction*       myAction;
92   vtkSmartPointer<VISU_PickingSettings> myPickingSettings;
93
94   SVTK_RenderWindowInteractor* myInteractor;
95
96   float            myPriority;
97   vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
98 };
99
100 #endif