1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : VVTK_PickingDlg.h
23 // Author : Oleg Uvarov
26 #ifndef VVTK_PICKINGDLG_H
27 #define VVTK_PICKINGDLG_H
29 #include "SVTK_DialogBase.h"
31 #include <vtkObject.h>
32 #include <vtkSmartPointer.h>
36 class vtkActorCollection;
37 class vtkCallbackCommand;
46 class QtxDoubleSpinBox;
50 class VISU_GaussPtsAct;
51 class VISU_PickingSettings;
53 class SVTK_MainWindow;
54 class SVTK_RenderWindowInteractor;
55 class VVTK_ValidatedLineEdit;
59 * Uses for set up picking preferenses and apply
60 * them to all actors in the current renderer.
62 class VVTK_PickingDlg : public SVTK_DialogBase
67 VVTK_PickingDlg(QtxAction* theAction,
68 SVTK_MainWindow* theParent,
73 //! Make an actor to listen the event of Update Picking Settings event.
74 void AddActor( VISU_GaussPtsAct* );
75 void RemoveActor( VISU_GaussPtsAct* );
77 //! Update dialog contents.
80 VISU_PickingSettings* GetPickingSettings();
82 void SetInteractor( SVTK_RenderWindowInteractor* );
85 void onSelectionEvent();
90 //void onColorButtonPressed();
91 void onSelectionValidate();
94 static void ProcessEvents(vtkObject* theObject,
95 unsigned long theEvent,
100 void keyPressEvent( QKeyEvent* e );
103 QtxDoubleSpinBox* myCursorSizeSpinBox;
104 QtxDoubleSpinBox* myPyramidHeightSpinBox;
105 QtxColorButton* mySelectionColorButton;
106 QtxDoubleSpinBox* myPointToleranceSpinBox;
107 QtxIntSpinBox* myTransparencySpinBox;
108 QComboBox* myPositionComboBox;
109 QtxDoubleSpinBox* myZoomFactorSpinBox;
110 QtxIntSpinBox* myStepNumberSpinBox;
111 QCheckBox* myDisplayParentMeshCheckBox;
114 vtkSmartPointer<VISU_PickingSettings>
117 VVTK_ValidatedLineEdit*
118 myParentElementLineEdit;
119 VVTK_ValidatedLineEdit*
120 myLocalPointLineEdit;
122 SVTK_RenderWindowInteractor*
126 vtkSmartPointer<vtkCallbackCommand>
127 myEventCallbackCommand;
130 class VVTK_ValidatedLineEdit : public QLineEdit
134 VVTK_ValidatedLineEdit( QWidget* parent );
137 void MarkValidated( const QString& theText );