Frapper  1.0a
TimelinePanel.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of FRAPPER
4 research.animationsinstitut.de
5 sourceforge.net/projects/frapper
6 
7 Copyright (c) 2008-2009 Filmakademie Baden-Wuerttemberg, Institute of Animation
8 
9 This program is free software; you can redistribute it and/or modify it under
10 the terms of the GNU Lesser General Public License as published by the Free Software
11 Foundation; version 2.1 of the License.
12 
13 This program is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16 
17 You should have received a copy of the GNU Lesser General Public License along with
18 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20 http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
21 -----------------------------------------------------------------------------
22 */
23 
33 
34 #ifndef TIMELINEPANEL_H
35 #define TIMELINEPANEL_H
36 
37 #include "FrapperPrerequisites.h"
38 #include "ViewPanel.h"
39 #include "ui_TimelinePanel.h"
40 #include "TimelineWidget.h"
41 
42 
43 namespace Frapper {
44 
49 class FRAPPER_GUI_EXPORT TimelinePanel : public ViewPanel, protected Ui::TimelinePanel
50 {
51 
52  Q_OBJECT
53 
54 public: // constructors and destructors
55 
62  TimelinePanel ( QWidget *parent = 0, Qt::WindowFlags flags = 0 );
63 
71  virtual ~TimelinePanel ();
72 
73 public: // functions
74 
81  void fillToolBars ( QToolBar *mainToolBar, QToolBar *panelToolBar );
82 
88  void fillControlToolBar ( QList<QAction *> controlActions );
89 
97  void setFrameRange ( int firstFrame, int lastFrame );
98 
99 public slots: //
100 
106  void toggleRealtimeMode ( bool realtime );
107 
114  void setFrameStep ( int frameStep );
115 
121  void setFrameRate ( int frameRate );
122 
128  void setCurrentFrame ( int index );
129 
135  void setStartFrame ( int index );
136 
142  void setEndFrame ( int index );
143 
149  void setInFrame ( int index );
150 
156  void setOutFrame ( int index );
157 
158 signals: //
159 
166  void currentFrameSet ( int index );
167 
174  void startFrameSet ( int index );
175 
182  void endFrameSet ( int index );
183 
190  void inFrameSet ( int index );
191 
198  void outFrameSet ( int index );
199 
206  void frameStepSet ( int frameStep );
207 
214  void frameRateSet ( int frameRate );
215 
216 protected: // events
217 
223  virtual void keyPressEvent ( QKeyEvent *event );
224 
225 private slots: //
226 
232  void on_ui_realtimeAction_triggered ( bool realtime );
233 
240  void on_ui_scaleToFitAction_triggered ( bool checked = false );
241 
248  void on_ui_startFrameSpinBox_valueChanged ( int value );
249 
256  void on_ui_endFrameSpinBox_valueChanged ( int value );
257 
264  void on_ui_inFrameSpinBox_valueChanged ( int value );
265 
272  void on_ui_frameStepSpinBox_valueChanged ( int value );
273 
280  void on_ui_outFrameSpinBox_valueChanged ( int value );
281 
288  void on_ui_fpsSpinBox_valueChanged ( int value );
289 
290 private: // data
291 
296  QScrollBar *m_scaleScrollBar;
297 
302 
309  QToolBar *m_controlToolBar;
310 
311 };
312 
313 } // end namespace Frapper
314 
315 #endif