]> git.saurik.com Git - wxWidgets.git/blob - src/qt/timer.cpp
VTK wrapper of vtkRenderWindow for wxPython. Tested on MSW so far.
[wxWidgets.git] / src / qt / timer.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: timer.cpp
3 // Purpose: wxTimer implementation
4 // Author: AUTHOR
5 // Modified by:
6 // Created: ??/??/98
7 // RCS-ID: $Id$
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifdef __GNUG__
13 #pragma implementation "timer.h"
14 #endif
15
16 #include "wx/timer.h"
17
18 #if !USE_SHARED_LIBRARY
19 IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject)
20 #endif
21
22 wxTimer::wxTimer()
23 {
24 m_milli = 0 ;
25 m_lastMilli = -1 ;
26 m_id = 0;
27 m_oneShot = FALSE;
28 }
29
30 wxTimer::~wxTimer()
31 {
32 Stop();
33 }
34
35 bool wxTimer::Start(int milliseconds,bool mode)
36 {
37 m_oneShot = mode ;
38 if (m_milliseconds < 0)
39 m_milliseconds = lastMilli;
40
41 if (m_milliseconds <= 0)
42 return FALSE;
43
44 m_lastMilli = m_milli = m_milliseconds;
45
46 // TODO: set the timer going.
47 return FALSE;
48 }
49
50 void wxTimer::Stop()
51 {
52 m_id = 0 ;
53 m_milli = 0 ;
54 }
55
56