-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanim01.h
More file actions
44 lines (33 loc) · 971 Bytes
/
anim01.h
File metadata and controls
44 lines (33 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* File: anim01.h
* Author: Emmanuel Chidinma
* emmanuel.c.chidinma@gmail.com
* Created on June 07, 2015, 7:42 PM
*/
#ifndef ANIM01_H
#define ANIM01_H
#include <QWidget>
#include <QTimer>
class Anim01 : public QWidget
{
Q_OBJECT
signals:
void timeout(); // not used in this program
public slots:
void animate();
public:
Anim01(QWidget *parent = 0);
void draw(QPainter *painter);
~Anim01();
protected:
void paintEvent(QPaintEvent *event);
private:
bool isPM; // is the time PM?
unsigned int secondCount; // ranges from 0 to 59
unsigned int minuteCount; // ranges from 0 to 59
unsigned int hourCount; // ranges from 0 to 11
unsigned int numberOf6minutes; // ranges from 0 to 9 and represents the number of 6 minutes within an hour
QTimer* updateTimer;
float numToAngle(unsigned int number, bool bInDegrees);
}; // end class Anim01
#endif // ANIM01_H