-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathkey.cpp
More file actions
66 lines (57 loc) · 887 Bytes
/
Copy pathkey.cpp
File metadata and controls
66 lines (57 loc) · 887 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#include "key.h"
#include "ui_key.h"
#include <QDebug>
Key *key;
static u8 KeyTemp;
void KeyInit(void)
{
key=new Key;
key->show();
}
u8 GetKey(void)
{
u8 temp;
temp=KeyTemp;
KeyTemp=KEY_NONE;
return temp;
}
Key::Key(QWidget *parent) :
QWidget(parent),
ui(new Ui::Key)
{
ui->setupUi(this);
}
Key::~Key()
{
delete ui;
}
void Key::on_button_Up_clicked()
{
qDebug()<<"key up";
KeyTemp=KEY_UP;
}
void Key::on_button_Down_clicked()
{
qDebug()<<"key down";
KeyTemp=KEY_Down;
}
void Key::on_button_Left_clicked()
{
qDebug()<<"key left";
KeyTemp=KEY_Left;
}
void Key::on_button_Right_clicked()
{
qDebug()<<"key right";
KeyTemp=KEY_Right;
}
void Key::on_button_Return_clicked()
{
qDebug()<<"key return";
KeyTemp=KEY_Return;
}
void Key::on_button_Ok_clicked()
{
qDebug()<<"key ok";
KeyTemp=KEY_Ok;
}