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(VisuGUI* theModule, VISU_TimeAnimation* theAnimator);
97 void onFieldChange(int theIndex);
98 void onTypeChanged(int theIndex);
99 // void onScalarBarDlg();
100 void onPreferencesDlg();
101 void onRangeCheck(bool theCheck);
102 void onMinValue(double theVal);
103 void onMaxValue(double theVal);
108 VISU_TimeAnimation* myAnimator;
109 QListBox* myFieldLst;
110 QComboBox* myTypeCombo;
111 QPushButton* myPropBtn;
112 QPushButton* myArrangeBtn;
113 QCheckBox* myUseRangeChk;
114 QtxDblSpinBox* myMinVal;
115 QtxDblSpinBox* myMaxVal;
119 class VisuGUI_TimeAnimationDlg: public QDialog
123 VisuGUI_TimeAnimationDlg(VisuGUI* theModule, _PTR(Study) theStudy);
124 ~VisuGUI_TimeAnimationDlg();
126 void addField(_PTR(SObject) theField);
129 void restoreFromStudy(_PTR(SObject) theAnimation);
132 virtual void closeEvent(QCloseEvent* theEvent);
133 void stopAnimation();
136 void onTypeChange(int index);
137 void onPlayPressed();
138 void onBackPressed();
139 void onForvardPressed();
140 void onLastPressed();
141 void onFirstPressed();
143 void onWindowChanged(int index);
145 void onSpeedChange(double theSpeed);
146 void onExecution(long theNewFrame, double theTime);
150 void publishToStudy();
154 QComboBox* myTypeCombo;
155 QPushButton* myPropBtn;
156 QToolButton* myPlayBtn;
158 QPushButton* mySetupBtn;
159 QPushButton* myGenBtn;
165 VISU_TimeAnimation* myAnimator;
166 QCheckBox* mySaveCheck;
167 QLineEdit* myPathEdit;
169 QCloseEvent* myEvent;
171 QPushButton* myPublishBtn;
172 QPushButton* mySaveBtn;
175 #endif //VISUGUI_TIMEANIMATION_H