Salome HOME
Merge from V5_1_main 14/05/2010
[modules/visu.git] / src / VISUGUI / VisuGUI_Sweep.h
1 //  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  This library is free software; you can redistribute it and/or
4 //  modify it under the terms of the GNU Lesser General Public
5 //  License as published by the Free Software Foundation; either
6 //  version 2.1 of the License.
7 //
8 //  This library is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 //  Lesser General Public License for more details.
12 //
13 //  You should have received a copy of the GNU Lesser General Public
14 //  License along with this library; if not, write to the Free Software
15 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 //  VISU VISUGUI : GUI of VISU component
21 //  File   : VisuGUI_Sweep.h
22 //  Author : Oleg UVAROV
23 //  Module : VISU
24 //
25 #ifndef VisuGUI_Sweep_HeaderFile
26 #define VisuGUI_Sweep_HeaderFile
27
28 #include "SALOME_GenericObjPointer.hh"
29
30 #include <vtkSmartPointer.h>
31
32 #include <QWidget>
33 #include <QPixmap>
34
35 class QComboBox;
36 class QToolButton;
37 class QSlider;
38 class QCheckBox;
39 class QMainWindow;
40 class QTimer;
41 class QAction;
42
43 class SalomeApp_IntSpinBox;
44 class SalomeApp_DoubleSpinBox;
45
46 class LightApp_SelectionMgr;
47 class SVTK_ViewWindow;
48 class VISU_Actor;
49 class VisuGUI;
50
51
52 namespace VISU
53 {
54   class ColoredPrs3d_i;
55 }
56
57
58 //----------------------------------------------------------------------------
59 class VisuGUI_Sweep : public QWidget
60 {
61   Q_OBJECT;
62
63 public:
64   VisuGUI_Sweep( VisuGUI* theModule, 
65                  QMainWindow* theParent,
66                  LightApp_SelectionMgr* theSelectionMgr );
67
68   virtual ~VisuGUI_Sweep();
69
70   QAction* toggleViewAction();
71
72 public slots:
73   virtual void     onSelectionChanged();
74
75   virtual void     onFirst();
76
77   virtual void     onPrevious();
78
79   virtual void     onPlay( bool );
80
81   virtual void     onNext();
82
83   virtual void     onLast();
84
85   virtual void     onStop();
86
87   virtual void     onEnable( bool );
88
89   virtual void     onValueChanged( int );
90
91   virtual void     onDelayChanged( double );
92
93   virtual void     onNumberOfStepsChanged( int );
94
95   virtual void     onModeChanged( int );
96
97   virtual void     onTimeout();
98
99   virtual void     onToggleView( bool );
100
101   void             onModuleDeactivated();
102
103   void             onModuleActivated();
104
105 private:
106   QSlider*          mySweepSlider;
107
108   QToolButton*      myFirstButton;
109   QToolButton*      myPreviousButton;
110   QToolButton*      myPlayButton;
111   QToolButton*      myNextButton;
112   QToolButton*      myLastButton;
113
114   QCheckBox*        myIsCycled;
115
116   QComboBox*        mySweepMode;
117   SalomeApp_IntSpinBox* myNumberOfSteps;
118
119   QComboBox*        myIntervals;
120   SalomeApp_DoubleSpinBox*  myStepDelay;
121
122   QTimer*           myTimer;
123   QPixmap           myPlayPixmap;
124   QPixmap           myPausePixmap;
125   QAction*          myToggleViewAction;
126
127   VisuGUI*          myModule;
128   SVTK_ViewWindow*  myViewWindow;
129
130   VISU_Actor*       myActor;
131   SALOME::GenericObjPtr< VISU::ColoredPrs3d_i > myColoredPrs3d;
132 };
133
134
135 //----------------------------------------------------------------------------
136
137
138 #endif