Frapper  1.0a
TimerNode.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 
32 
33 #ifndef TIMERNODE_H
34 #define TIMERNODE_H
35 
36 #include "Node.h"
37 
38 // OGRE
39 #include <Ogre.h>
40 #if (OGRE_PLATFORM == OGRE_PLATFORM_WIN32)
41 #include <windows.h>
42 #endif
43 
44 // forward declaration
45 class QTimer;
46 
47 namespace TimerNode {
48 using namespace Frapper;
49 
53 class TimerNode : public Node
54 {
55 
56  Q_OBJECT
58 
59 public: // constructors and destructors
60 
67  TimerNode ( const QString &name, ParameterGroup *parameterRoot );
68 
76  virtual ~TimerNode ();
77 
78 protected: // events
79 
80 private slots:
81 
87  void timerEvent ();
88 
92  void activateTimer();
93 
97  void changeInterval();
98 
99 
100 private: //funtions
101 
102 private: // data
103 
104  // timer functionality is implemented using a QTimer
105  QTimer *m_pTimer;
106 
107  // References to parameters for direct read and write access
111 
113 
116 };
117 
118 } // namespace TimerNode
119 
120 #endif