Salome HOME
Add Python Console to a list of VISU windows
[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   QtxDblSpinBox* myMinVal;
55   QtxDblSpinBox* myMaxVal;
56 };
57
58
59 //class SALOMEDSClient_Study;
60 //class SALOMEDSClient_SObject;
61
62
63 class VisuGUI_TimeAnimationDlg: public QDialog
64
65     Q_OBJECT
66  public:
67     VisuGUI_TimeAnimationDlg(QWidget* parent, _PTR(Study) theStudy);
68     ~VisuGUI_TimeAnimationDlg();
69
70     void addField(_PTR(SObject) theField);
71     void clearView();
72
73  protected:
74     virtual void closeEvent(QCloseEvent* theEvent);
75     void stopAnimation();
76
77  private slots:
78    void onTypeChange(int index);
79    void onPlayPressed();
80    void onBackPressed();
81    void onForvardPressed();
82    void onLastPressed();
83    void onFirstPressed();
84    void onSetupDlg();
85    void onWindowChanged(int index);
86    void createFrames();
87    void onSpeedChange(double theSpeed);
88    void onExecution(long theNewFrame, double theTime);
89    void onBrowse();
90    void onStop();
91
92  private:
93     QSlider* mySlider;
94     QComboBox* myTypeCombo;
95     QPushButton* myPropBtn;
96     QToolButton* myPlayBtn;
97     QLabel* myTimeLbl;
98     QPushButton* mySetupBtn;
99     QPushButton* myGenBtn;
100
101     QFrame* myPlayFrame;
102     _PTR(Study) myStudy;
103
104     VISU_TimeAnimation* myAnimator;
105     QCheckBox* mySaveCheck;
106     QLineEdit* myPathEdit;
107     bool isClosing;
108     QCloseEvent* myEvent;
109 };
110 #endif  //VISUGUI_TIMEANIMATION_H