-
Notifications
You must be signed in to change notification settings - Fork 0
/
dancewindow.h
53 lines (41 loc) · 855 Bytes
/
dancewindow.h
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
45
46
47
48
49
50
51
52
53
#ifndef DANCEWINDOW_H
#define DANCEWINDOW_H
#include <QMainWindow>
#include <QTimer>
#include "wiiyourself/wiimote.h"
namespace Ui {
class DanceWindow;
}
class DanceWindow : public QMainWindow {
Q_OBJECT
enum boardStateType {
LEFT,
RIGHT,
BOTH,
NONE,
ERR
};
enum ledColor {
OFF = 0x00,
ON = 0x0f
};
public:
DanceWindow(QWidget *parent = 0);
~DanceWindow();
protected:
void changeEvent(QEvent *e);
private:
Ui::DanceWindow *ui;
boardStateType m_state;
wiimote m_board;
QTimer m_updateTimer;
bool m_ledOn;
private slots:
void toggleLED();
void calcState();
void updateState(boardStateType state);
signals:
void stateChanged(boardStateType state);
void totalChanged(double totalWeight);
};
#endif // DANCEWINDOW_H