Salome HOME
DCQ: prepare V2.0.0
[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 #include "SALOMEconfig.h"
23 #include CORBA_SERVER_HEADER(SALOMEDS)
24 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
25 #include CORBA_CLIENT_HEADER(VISU_Gen)
26
27 class VISU_TimeAnimation;
28
29 /**
30  * Auxilliary class for presentations definition
31  */
32 class SetupDlg: public QDialog {
33   Q_OBJECT
34
35 public:
36   SetupDlg(QWidget* theParent, VISU_TimeAnimation* theAnimator);
37   ~SetupDlg() {};
38   
39 private slots:
40   void onFieldChange(int theIndex);
41   void onTypeChanged(int theIndex); 
42   //  void onScalarBarDlg();
43   void onPreferencesDlg();
44   void onRangeCheck(bool theCheck);
45   void onMinValue(double theVal);
46   void onMaxValue(double theVal);
47
48 private:
49   VISU_TimeAnimation* myAnimator;
50   QListBox* myFieldLst;
51   QComboBox* myTypeCombo;
52   QPushButton* myPropBtn;
53   QCheckBox* myUseRangeChk;
54   QAD_SpinBoxDbl* myMinVal;
55   QAD_SpinBoxDbl* myMaxVal;
56 };
57
58
59
60 class VisuGUI_TimeAnimationDlg: public QDialog
61
62     Q_OBJECT
63  public:
64     VisuGUI_TimeAnimationDlg(SALOMEDS::Study_var theStudy);
65     ~VisuGUI_TimeAnimationDlg();
66
67     void addField(SALOMEDS::SObject_var theField);
68     void clearView();
69
70  protected:
71     virtual void closeEvent(QCloseEvent* theEvent);
72     void stopAnimation();
73
74  private slots:
75    void onTypeChange(int index);
76    void onPlayPressed();
77    void onBackPressed();
78    void onForvardPressed();
79    void onLastPressed();
80    void onFirstPressed();
81    void onSetupDlg();
82    void onFrameChanged(int index);
83    void createFrames();
84    void onSpeedChange(double theSpeed);
85    void onExecution(long theNewFrame, double theTime);
86    void onBrowse();
87    void onStop();
88
89  private:
90     QSlider* mySlider;
91     QComboBox* myTypeCombo;
92     QPushButton* myPropBtn;
93     QToolButton* myPlayBtn;
94     QLabel* myTimeLbl;
95     QPushButton* mySetupBtn;
96     QPushButton* myGenBtn;
97
98     QFrame* myPlayFrame;
99     SALOMEDS::Study_var myStudy;
100
101     VISU_TimeAnimation* myAnimator;
102     QCheckBox* mySaveCheck;
103     QLineEdit* myPathEdit;
104     bool isClosing;
105     QCloseEvent* myEvent;
106 };
107 #endif  //VISUGUI_TIMEANIMATION_H