]> SALOME platform Git repositories - modules/visu.git/blob - src/VISUGUI/VisuGUI_Slider.h
Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/visu.git] / src / VISUGUI / VisuGUI_Slider.h
1 //  VISU VISUGUI : GUI of VISU component
2 //
3 //  Copyright (C) 2003  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 //
23 //
24 //  File   : VisuGUI_Slider.h
25 //  Author : Oleg UVAROV
26 //  Module : VISU
27
28 #ifndef VisuGUI_Slider_HeaderFile
29 #define VisuGUI_Slider_HeaderFile
30
31 #include "QtxToolBar.h"
32 #include <vector>
33
34 #include "SALOMEconfig.h"
35 #include CORBA_SERVER_HEADER(VISU_Gen)
36
37 namespace VISU
38 {
39   class ColoredPrs3dHolder_i;
40 }
41
42 class QComboBox;
43 class QLabel;
44 class QLineEdit;
45 class QToolButton;
46 class QSlider;
47 class QSpinBox;
48 class QTimer;
49
50 class VVTK_ViewWindow;
51 class VVTK_MainWindow;
52 class LightApp_SelectionMgr;
53
54 class VisuGUI_Module;
55
56 class VisuGUI_Slider : public QtxToolBar
57 {
58   Q_OBJECT
59
60 public:
61   VisuGUI_Slider( VisuGUI_Module* theModule, 
62                   VVTK_ViewWindow* theViewWindow,
63                   LightApp_SelectionMgr* theSelectionMgr );
64   virtual ~VisuGUI_Slider();
65
66 public slots:
67   virtual void     onSelectionChanged();
68
69   virtual void     onTimeStampActivated( int );
70
71   virtual void     onFirst();
72   virtual void     onPrevious();
73   virtual void     onPlay( bool );
74   virtual void     onNext();
75   virtual void     onLast();
76
77   virtual void     onValueChanged( int );
78
79   virtual void     onSpeedChanged( int );
80
81   virtual void     onTimeout();
82
83 protected:
84   virtual void     enableControls( bool );
85   virtual void     updateMemoryState();
86   virtual bool     checkHolderList();
87
88 private:
89   VisuGUI_Module*  myModule;
90   VVTK_MainWindow* myMainWindow;
91   LightApp_SelectionMgr* mySelectionMgr;
92   VISU::View3D_var myView3D;
93
94   QSlider*         mySlider;
95   QLabel*          myFirstTimeStamp;
96   QLabel*          myLastTimeStamp;
97   QLabel*          myTimeStampsNumber;
98
99   QLabel*          myCacheMemory;
100
101 #ifdef ENABLE_AVI_AND_MORE_BUTTONS
102   QToolButton*     myMoreButton;
103   QToolButton*     myAVIButton;
104 #endif
105
106   QToolButton*     myFirstButton;
107   QToolButton*     myPreviousButton;
108   QToolButton*     myPlayButton;
109   QToolButton*     myNextButton;
110   QToolButton*     myLastButton;
111
112   QComboBox*       myTimeStampStrings;
113   QComboBox*       myTimeStampIndices;
114
115   QSpinBox*        mySpeedBox;
116
117   QTimer*          myTimer;
118
119   typedef std::vector<VISU::ColoredPrs3dHolder_var> THolderList;
120   THolderList      myHolderList;
121 };
122
123 #endif