1 // VISU VISUGUI : GUI of VISU component
3 // Copyright (C) 2003 CEA/DEN, EDF R&D
7 // File : VisuGUI_TimeAnimation.h
8 // Author : Vitaly SMETANNIKOV
11 #ifndef VISUGUI_TIMEANIMATION_H
12 #define VISUGUI_TIMEANIMATION_H
14 #include "QtxDblSpinBox.h"
16 #include "SALOMEDSClient_Study.hxx"
19 #include <qbuttongroup.h>
20 #include <qwidgetstack.h>
23 class VISU_TimeAnimation;
29 class SVTK_ViewWindow;
41 * Auxilliary class for presentations definition
43 class ArrangeDlg: public QDialog
47 enum { AutoMode, ManualMode };
48 enum { XAxis, YAxis, ZAxis };
50 ArrangeDlg(QWidget* theParent, VISU_TimeAnimation* theAnimator);
51 ArrangeDlg(QWidget* theParent, SVTK_ViewWindow* theViewWindow);
54 int getMode() const { return myStackWgt->id(myStackWgt->visibleWidget()); }
55 double getDistance() const { return myDistVal->value(); }
56 int getAxis() const { return myAxisGrp->id(myAxisGrp->selected()); }
59 virtual void accept();
60 void onFieldChange(int);
69 void acceptAnimation();
70 void acceptViewWindow();
72 VISU_TimeAnimation* myAnimator;
73 SVTK_ViewWindow * myViewWindow;
75 QWidgetStack* myStackWgt;
76 QButtonGroup* myAxisGrp;
77 QtxDblSpinBox* myDistVal;
79 QtxDblSpinBox* myCoord[3];
80 QValueList<Offset> myOffsets;
85 QMap<VISU::Prs3d_i*, int> myPrsMap;
89 class SetupDlg: public QDialog {
93 SetupDlg(QWidget* theParent,
95 VISU_TimeAnimation* theAnimator);
99 void onFieldChange(int theIndex);
100 void onTypeChanged(int theIndex);
101 // void onScalarBarDlg();
102 void onPreferencesDlg();
103 void onRangeCheck(bool theCheck);
104 void onMinValue(double theVal);
105 void onMaxValue(double theVal);
110 VISU_TimeAnimation* myAnimator;
112 QListBox* myFieldLst;
113 QComboBox* myTypeCombo;
114 std::vector<int> myComboId2TypeId;
115 std::map<int,int> myTypeId2ComboId;
117 QPushButton* myPropBtn;
118 QPushButton* myArrangeBtn;
119 QCheckBox* myUseRangeChk;
120 QtxDblSpinBox* myMinVal;
121 QtxDblSpinBox* myMaxVal;
125 class VisuGUI_TimeAnimationDlg: public QDialog
129 VisuGUI_TimeAnimationDlg(VisuGUI* theModule, _PTR(Study) theStudy);
130 ~VisuGUI_TimeAnimationDlg();
132 void addField(_PTR(SObject) theField);
135 void restoreFromStudy(_PTR(SObject) theAnimation);
138 virtual void closeEvent(QCloseEvent* theEvent);
139 virtual void showEvent(QShowEvent* theEvent);
140 void stopAnimation();
143 void onTypeChange(int index);
144 void onPlayPressed();
145 void onBackPressed();
146 void onForvardPressed();
147 void onLastPressed();
148 void onFirstPressed();
150 void onWindowChanged(int index);
152 void onSpeedChange(double theSpeed);
153 void onExecution(long theNewFrame, double theTime);
157 void publishToStudy();
161 QComboBox* myTypeCombo;
162 QPushButton* myPropBtn;
163 QToolButton* myPlayBtn;
165 QPushButton* mySetupBtn;
166 QPushButton* myGenBtn;
169 SetupDlg* mySetupDlg;
173 VISU_TimeAnimation* myAnimator;
174 QCheckBox* mySaveCheck;
175 QComboBox* myPicsFormat;
176 QLineEdit* myPathEdit;
178 QCloseEvent* myEvent;
180 QPushButton* myPublishBtn;
181 QPushButton* mySaveBtn;
184 #endif //VISUGUI_TIMEANIMATION_H