servicepassinputdlg.h
1.02 KB
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
#ifndef SERVICEPASSINPUTDLG_H
#define SERVICEPASSINPUTDLG_H
#include <QDialog>
#include <QKeyEvent>
#define NORMAL_PASS_WORD "00000000"
#define DEMO_PASS_WORD "11111111"
#define MAX_PASSWORD 8
namespace Ui {
class ServicePassInputDlg;
}
enum service_pass_type{
NORMAL_SERVICE_PASS_MODE = 0,
DEMO_SERVICE_PASS_MODE=1
};
class ServicePassInputDlg : public QDialog
{
Q_OBJECT
QChar m_strInputPass[MAX_PASSWORD+1];
public:
explicit ServicePassInputDlg(QWidget *parent = 0, service_pass_type mode = NORMAL_SERVICE_PASS_MODE );
~ServicePassInputDlg();
private slots:
void on_ctrBtnOk_clicked();
void on_ctrBtnCancel_clicked();
void keyCancel_clicked();
void keyEnter_clicked();
void backspaceKeyPressEvent();
void keyboardInputEvent(QString strIn);
protected:
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
private:
Ui::ServicePassInputDlg *ui;
int m_nCurInputCount;
service_pass_type m_nMode;
};
#endif // SERVICEPASSINPUTDLG_H