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