-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathsendmsgthread.h
More file actions
37 lines (27 loc) · 972 Bytes
/
sendmsgthread.h
File metadata and controls
37 lines (27 loc) · 972 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
#ifndef SENDMSGTHREAD_H
#define SENDMSGTHREAD_H
#include <QThread>
#include "gsmapi.h"
class SendMsgThread : public QThread
{
Q_OBJECT
public:
explicit SendMsgThread(QObject *parent = 0);
void SetPar(GSMAPI *gsm, QString tel, QString msg);
protected:
void run();
private:
GSMAPI *gsm;
QString tel;
QString msg;
QString headMsg; //打印消息头部内容
QString getTel(QString tel); //获取手机号码(内存编码)
int getMsgLen(QString msg); //获取短信内容长度
QString getMsgHex(QString msg); //获取汉字16进制格式表示
QString unicodeToTel(QString unicode); //unicode编码转为号码字符串
QString unicodeToTime(QString unicode); //unicode编码转为时间字符串
QString unicodeToMsg(QString unicode); //unicode编码转为中文字符串
signals:
public slots:
};
#endif // SENDMSGTHREAD_H