Salome HOME
NRI : First integration.
[modules/visu.git] / src / VISUGUI / VisuGUI_TimeAnimation.h
1 //  File      : VisuGUI_TimeAnimation.h
2 //  Created   : 28 / 03 / 2003
3 //  Author    : Vitaly SMETANNIKOV
4 //  Project   : SALOME 
5 //  Module    : VISUGUI
6 //  Copyright : Open CASCADE 
7
8 #ifndef VISUGUI_TIMEANIMATION_H
9 #define VISUGUI_TIMEANIMATION_H
10
11 #include <qdialog.h>
12 #include <qslider.h>
13 #include <qcombobox.h>
14 #include <qtoolbutton.h>
15 #include <qevent.h>
16
17 #include "VisuGUI_ScalarBarDlg.h"
18
19 class VISU_TimeAnimation;
20
21
22 /**
23  * Auxilliary class for presentations definition
24  */
25 class SetupDlg: public QDialog {
26   Q_OBJECT
27
28 public:
29   SetupDlg(QWidget* theParent, VISU_TimeAnimation* theAnimator);
30   ~SetupDlg() {};
31   
32 private slots:
33   void onFieldChange(int theIndex);
34   void onTypeChanged(int theIndex); 
35   void onScalarBarDlg();
36   void onPreferencesDlg();
37   void onRangeCheck(bool theCheck);
38   void onMinValue(double theVal);
39   void onMaxValue(double theVal);
40
41 private:
42   VISU_TimeAnimation* myAnimator;
43   QListBox* myFieldLst;
44   QComboBox* myTypeCombo;
45   QPushButton* myPropBtn;
46   QCheckBox* myUseRangeChk;
47   QAD_SpinBoxDbl* myMinVal;
48   QAD_SpinBoxDbl* myMaxVal;
49 };
50
51
52
53 class VisuGUI_TimeAnimationDlg: public QDialog
54
55     Q_OBJECT
56  public:
57     VisuGUI_TimeAnimationDlg(SALOMEDS::Study_var theStudy);
58     ~VisuGUI_TimeAnimationDlg();
59
60     void addField(SALOMEDS::SObject_var theField);
61     void clearView();
62
63  protected:
64     virtual void closeEvent(QCloseEvent* theEvent);
65     void stopAnimation();
66
67  private slots:
68    void onTypeChange(int index);
69    void onPlayPressed();
70    void onBackPressed();
71    void onForvardPressed();
72    void onLastPressed();
73    void onFirstPressed();
74    void onSetupDlg();
75    void onFrameChanged(int index);
76    void createFrames();
77    void onSpeedChange(double theSpeed);
78    void onExecution(long theNewFrame, double theTime);
79    void onBrowse();
80
81  private:
82     QSlider* mySlider;
83     QComboBox* myTypeCombo;
84     QPushButton* myPropBtn;
85     QToolButton* myPlayBtn;
86     QLabel* myTimeLbl;
87
88     QFrame* myPlayFrame;
89     SALOMEDS::Study_var myStudy;
90
91     VISU_TimeAnimation* myAnimator;
92     QCheckBox* mySaveCheck;
93     QLineEdit* myPathEdit;
94 };
95 #endif  //VISUGUI_TIMEANIMATION_H