xref: /OK3568_Linux_fs/app/forlinx/flapp/src/plugins/imxx11/gprs/gprs.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 #ifndef GPRS_H
2 #define GPRS_H
3 
4 #include <QWidget>
5 #include <qsocketnotifier.h>
6 #include<QProcess>
7 #include "iwidget.h"
8 
9 #define PPPPATH           "/"
10 namespace Ui {
11 class Gprs;
12 }
13 
14 class Gprs : public QWidget
15 {
16     Q_OBJECT
17 
18 public:
19     explicit Gprs(QWidget *parent = 0);
20     ~Gprs();
21 
22 private:
23     int openSerialPort();
24 
25 
26 private slots:
27     void on_pbt_set_clicked();
28 
29     void on_pbt_call_clicked();
30 
31     void on_pbt_send_clicked();
32 
33     void on_pbt_gprs_clicked();
34 
35     void remoteDataIncoming();
36 
37     void readOutput();
38 
39     void on_ping_clicked();
40 
41     void result();
42 
43 protected:
44     void closeEvent(QCloseEvent *);
45     void moveEvent(QMoveEvent *);
46     void resizeEvent(QResizeEvent *);
47 
48 private:
49     Ui::Gprs *ui;
50     int fd;
51     QString telnum;
52     QSocketNotifier *m_notifier;
53     QString portName;
54     QProcess* m_startgprs;
55     QProcess* myprocess;
56     QTimer *m_timer;
57 
58 };
59 
60 CreateSimplePlugin(GprsWidget, "gprs", "gprs.json", new Gprs)
61 #endif // GPRS_H
62