Salome HOME
5b1c1539676b20b0262c5675f89578e0691ca7f5
[modules/visu.git] / src / VISUGUI / VisuGUI_Sweep.h
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  VISU VISUGUI : GUI of VISU component
23 //  File   : VisuGUI_Sweep.h
24 //  Author : Oleg UVAROV
25 //  Module : VISU
26 //
27 #ifndef VisuGUI_Sweep_HeaderFile
28 #define VisuGUI_Sweep_HeaderFile
29
30 #include "SALOME_GenericObjPointer.hh"
31
32 #include <vtkSmartPointer.h>
33
34 #include <QWidget>
35 #include <QPixmap>
36
37 class QComboBox;
38 class QToolButton;
39 class QSlider;
40 class QSpinBox;
41 class QCheckBox;
42 class QMainWindow;
43 class QTimer;
44 class QAction;
45
46 class QtxIntSpinBox;
47 class QtxDoubleSpinBox;
48
49 class LightApp_SelectionMgr;
50 class SVTK_ViewWindow;
51 class VISU_Actor;
52 class VisuGUI;
53
54
55 namespace VISU
56 {
57   class ColoredPrs3d_i;
58 }
59
60
61 //----------------------------------------------------------------------------
62 class VisuGUI_Sweep : public QWidget
63 {
64   Q_OBJECT;
65
66 public:
67   VisuGUI_Sweep( VisuGUI* theModule, 
68                  QMainWindow* theParent,
69                  LightApp_SelectionMgr* theSelectionMgr );
70
71   virtual ~VisuGUI_Sweep();
72
73   QAction* toggleViewAction();
74
75 public slots:
76   virtual void     onSelectionChanged();
77
78   virtual void     onFirst();
79
80   virtual void     onPrevious();
81
82   virtual void     onPlay( bool );
83
84   virtual void     onNext();
85
86   virtual void     onLast();
87
88   virtual void     onStop();
89
90   virtual void     onEnable( bool );
91
92   virtual void     onValueChanged( int );
93
94   virtual void     onDelayChanged( double );
95
96   virtual void     onNumberOfStepsChanged( int );
97
98   virtual void     onModeChanged( int );
99
100   virtual void     onTimeout();
101
102   virtual void     onToggleView( bool );
103
104   void             onModuleDeactivated();
105
106   void             onModuleActivated();
107
108 private:
109   QSlider*          mySweepSlider;
110
111   QToolButton*      myFirstButton;
112   QToolButton*      myPreviousButton;
113   QToolButton*      myPlayButton;
114   QToolButton*      myNextButton;
115   QToolButton*      myLastButton;
116
117   QCheckBox*        myIsCycled;
118
119   QComboBox*        mySweepMode;
120   QtxIntSpinBox*    myNumberOfSteps;
121
122   QComboBox*        myIntervals;
123   QtxDoubleSpinBox* myStepDelay;
124
125   QTimer*           myTimer;
126   QPixmap           myPlayPixmap;
127   QPixmap           myPausePixmap;
128   QAction*          myToggleViewAction;
129
130   VisuGUI*          myModule;
131   SVTK_ViewWindow*  myViewWindow;
132
133   VISU_Actor*       myActor;
134   SALOME::GenericObjPtr< VISU::ColoredPrs3d_i > myColoredPrs3d;
135 };
136
137
138 //----------------------------------------------------------------------------
139
140
141 #endif