3 Copyright (C) 2010 Dzmitry Kamiahin <dnk-88@tut.by>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef ANIMATION_DIALOG_H
21 #define ANIMATION_DIALOG_H
23 #include <nel/misc/types_nl.h>
24 #include "ui_animation_form.h"
27 #include <QtCore/QTimeLine>
32 #include "nel/3d/animation_time.h"
40 @class CAnimationDialog
41 @brief Animation model control dialog.
42 @details The dialogue doesn't affect on the model itself, but only calculates the current time of animations
43 that can be obtained through a class method getTime().
44 The user can influence on the duration of the animation, but he doesn't know the total time for all the animations in the playlist.
45 Therefore, the class provides a slot that requires a total duration of the animated object animations and set it.
47 class CAnimationDialog
: public QDockWidget
52 /// Constructor, sets the default length of time from 0 to 99
53 CAnimationDialog(QWidget
*parent
= 0);
56 /// Get the current time animations
57 /// @return Returns the current time animations, which can then be use in class CObjectViewer
58 NL3D::TAnimationTime
getTime ();
61 /// Find the total time of the playlist and sets its
62 void changeAnimLength();
64 /// Updates animation status for the selected current object
65 /// @param name - the name of the selected object
66 void setCurrentShape(const QString
&name
);
73 void changeFrame(int frame
);
74 void changeStartAnim(int start
);
75 void changeEndAnim(int end
);
76 void updateAnim(int frame
);
77 void setInPlace(bool state
);
78 void setIncPos(bool state
);
80 void setModePlayList();
85 static const int _frameRate
= 50;
87 Ui::CAnimationDialog _ui
;
89 friend class CMainWindow
;
90 }; /* CAnimationDialog */
92 } /* namespace NLQT */
94 #endif // ANIMATION_DIALOG_H