Frapper  1.0a
CurveEditorPanel.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 CURVEEDITORPANEL_H
35 #define CURVEEDITORPANEL_H
36 
37 #include "FrapperPrerequisites.h"
38 #include "ViewPanel.h"
39 #include "ui_CurveEditorPanel.h"
41 #include "Node.h"
42 #include <QtGui/QHBoxLayout>
43 #include <QtGui/QDoubleSpinBox>
44 #include <QtGui/QCheckBox>
45 
46 
47 namespace Frapper {
48 
53 class FRAPPER_GUI_EXPORT CurveEditorPanel : public ViewPanel, protected Ui::CurveEditorPanel
54 {
55 
56  Q_OBJECT
57 
58 public: // constructors and destructors
59 
66  CurveEditorPanel ( QWidget *parent = 0, Qt::WindowFlags flags = 0 );
67 
75  virtual ~CurveEditorPanel ();
76 
77 public: // functions
78 
85  virtual void fillToolBars ( QToolBar *mainToolBar, QToolBar *panelToolBar );
86 
87 public slots: //
88 
94  void updateTree ( bool objectsSelected );
95 
101  void buildTree ( Node *node );
102 
107  void showCurves ();
108 
114  void setCurrentFrame ( const int index ) const;
115 
119  void changeKeyValues ();
120 
124  void scaleKeyValues ();
125 
129  void normalizeKeyValues ();
130 
134  void muteSelectedParameterGroups ();
135 
139  void muteAllParameterGroups ();
140 
144  void unmuteAllParameterGroups ();
145 
149  void updateAllParameters ();
150 
151 signals:
155  void drag();
156 
157 
158 private: // functions
159 
163  void muteItems(QTreeWidgetItem *item);
164 
168  void unmuteItems(QTreeWidgetItem *item);
169 
173  void updateItems();
174 
180  void fillTree( ParameterGroup *rootData, QTreeWidgetItem *rootItem );
181 
182 
183 protected: // events
184 
190  void keyPressEvent ( QKeyEvent *event );
191 
192 private: // data
193 
197  QDoubleSpinBox *m_normalizeSpinBox;
198 
202  QDoubleSpinBox *m_valueSpinBox;
203 
207  QDoubleSpinBox *m_scaleSpinBox;
208 
212  QCheckBox *m_curveCheckBox;
213 
218 
222  QHBoxLayout *m_hboxLayout;
223 
227  QTreeWidget *m_dataTree;
228 
232  QIcon m_muteIcon;
233 };
234 
235 } // end namespace Frapper
236 
237 #endif