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, 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);
107 VISU_TimeAnimation* myAnimator;
108 QListBox* myFieldLst;
109 QComboBox* myTypeCombo;
110 QPushButton* myPropBtn;
111 QPushButton* myArrangeBtn;
112 QCheckBox* myUseRangeChk;
113 QtxDblSpinBox* myMinVal;
114 QtxDblSpinBox* myMaxVal;
118 class VisuGUI_TimeAnimationDlg: public QDialog
122 VisuGUI_TimeAnimationDlg(VisuGUI* theModule, _PTR(Study) theStudy);
123 ~VisuGUI_TimeAnimationDlg();
125 void addField(_PTR(SObject) theField);
128 void restoreFromStudy(_PTR(SObject) theAnimation);
131 virtual void closeEvent(QCloseEvent* theEvent);
132 void stopAnimation();
135 void onTypeChange(int index);
136 void onPlayPressed();
137 void onBackPressed();
138 void onForvardPressed();
139 void onLastPressed();
140 void onFirstPressed();
142 void onWindowChanged(int index);
144 void onSpeedChange(double theSpeed);
145 void onExecution(long theNewFrame, double theTime);
149 void publishToStudy();
153 QComboBox* myTypeCombo;
154 QPushButton* myPropBtn;
155 QToolButton* myPlayBtn;
157 QPushButton* mySetupBtn;
158 QPushButton* myGenBtn;
164 VISU_TimeAnimation* myAnimator;
165 QCheckBox* mySaveCheck;
166 QLineEdit* myPathEdit;
168 QCloseEvent* myEvent;
170 QPushButton* myPublishBtn;
171 QPushButton* mySaveBtn;
174 #endif //VISUGUI_TIMEANIMATION_H