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"
18 #include "SALOMEconfig.h"
19 #include CORBA_SERVER_HEADER(SALOMEDS)
22 #include <qbuttongroup.h>
23 #include <qwidgetstack.h>
26 class VISU_TimeAnimation;
32 class SVTK_ViewWindow;
44 * Auxilliary class for presentations definition
46 class ArrangeDlg: public QDialog
50 enum { AutoMode, ManualMode };
51 enum { XAxis, YAxis, ZAxis };
53 ArrangeDlg(QWidget* theParent, VISU_TimeAnimation* theAnimator);
54 ArrangeDlg(QWidget* theParent, SVTK_ViewWindow* theViewWindow);
57 int getMode() const { return myStackWgt->id(myStackWgt->visibleWidget()); }
58 double getDistance() const { return myDistVal->value(); }
59 int getAxis() const { return myAxisGrp->id(myAxisGrp->selected()); }
62 virtual void accept();
63 void onFieldChange(int);
72 void acceptAnimation();
73 void acceptViewWindow();
75 VISU_TimeAnimation* myAnimator;
76 SVTK_ViewWindow * myViewWindow;
78 QWidgetStack* myStackWgt;
79 QButtonGroup* myAxisGrp;
80 QtxDblSpinBox* myDistVal;
82 QtxDblSpinBox* myCoord[3];
83 QValueList<Offset> myOffsets;
88 QMap<VISU::Prs3d_i*, int> myPrsMap;
92 class SetupDlg: public QDialog {
96 SetupDlg(QWidget* theParent, VISU_TimeAnimation* theAnimator);
100 void onFieldChange(int theIndex);
101 void onTypeChanged(int theIndex);
102 // void onScalarBarDlg();
103 void onPreferencesDlg();
104 void onRangeCheck(bool theCheck);
105 void onMinValue(double theVal);
106 void onMaxValue(double theVal);
110 VISU_TimeAnimation* myAnimator;
111 QListBox* myFieldLst;
112 QComboBox* myTypeCombo;
113 QPushButton* myPropBtn;
114 QPushButton* myArrangeBtn;
115 QCheckBox* myUseRangeChk;
116 QtxDblSpinBox* myMinVal;
117 QtxDblSpinBox* myMaxVal;
121 class VisuGUI_TimeAnimationDlg: public QDialog
125 //VisuGUI_TimeAnimationDlg(QWidget* parent, _PTR(Study) theStudy);
126 VisuGUI_TimeAnimationDlg(VisuGUI* theModule, _PTR(Study) theStudy);
127 ~VisuGUI_TimeAnimationDlg();
129 void addField(_PTR(SObject) theField);
132 void restoreFromStudy(SALOMEDS::SObject_var theAnimation);
135 virtual void closeEvent(QCloseEvent* theEvent);
136 void stopAnimation();
139 void onTypeChange(int index);
140 void onPlayPressed();
141 void onBackPressed();
142 void onForvardPressed();
143 void onLastPressed();
144 void onFirstPressed();
146 void onWindowChanged(int index);
148 void onSpeedChange(double theSpeed);
149 void onExecution(long theNewFrame, double theTime);
153 void publishToStudy();
157 QComboBox* myTypeCombo;
158 QPushButton* myPropBtn;
159 QToolButton* myPlayBtn;
161 QPushButton* mySetupBtn;
162 QPushButton* myGenBtn;
168 VISU_TimeAnimation* myAnimator;
169 QCheckBox* mySaveCheck;
170 QLineEdit* myPathEdit;
172 QCloseEvent* myEvent;
174 QPushButton* myPublishBtn;
175 QPushButton* mySaveBtn;
178 #endif //VISUGUI_TIMEANIMATION_H