1 | /* |
2 | * |
3 | * kPPP: A front end for pppd for the KDE project |
4 | * |
5 | * Copyright (C) 1997 Bernd Johannes Wuebben |
6 | * wuebben@math.cornell.edu |
7 | * |
8 | * |
9 | * This library is free software; you can redistribute it and/or |
10 | * modify it under the terms of the GNU Library General Public |
11 | * License as published by the Free Software Foundation; either |
12 | * version 2 of the License, or (at your option) any later version. |
13 | * |
14 | * This library is distributed in the hope that it will be useful, |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17 | * Library General Public License for more details. |
18 | * |
19 | * You should have received a copy of the GNU Library General Public |
20 | * License along with this program; if not, write to the Free |
21 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
22 | * |
23 | */ |
24 | |
25 | |
26 | #ifndef MODEMINFO_H |
27 | #define MODEMINFO_H |
28 | |
29 | #include <qdialog.h> |
30 | #include <qlineedit.h> |
31 | #include <qpushbutton.h> |
32 | #include <qlabel.h> |
33 | #include <qevent.h> |
34 | #include <qtimer.h> |
35 | //Added by qt3to4: |
36 | #include <QCloseEvent> |
37 | #include <qprogressbar.h> |
38 | |
39 | const int NUM_OF_ATI = 8; |
40 | |
41 | |
42 | class ModemTransfer : public QDialog { |
43 | Q_OBJECT |
44 | public: |
45 | explicit ModemTransfer(QWidget *parent=0, const char *name=0); |
46 | |
47 | public slots: |
48 | void init(); |
49 | void readtty(); |
50 | void do_script(); |
51 | void time_out_slot(); |
52 | void cancelbutton(); |
53 | void readChar(unsigned char); |
54 | |
55 | private: |
56 | void ati_done(); |
57 | |
58 | protected: |
59 | void closeEvent(QCloseEvent *e); |
60 | |
61 | private: |
62 | int step; |
63 | QString readbuffer; |
64 | |
65 | QPushButton *cancel; |
66 | QProgressBar *progressBar; |
67 | QLabel *statusBar; |
68 | |
69 | QTimer *timeout_timer; |
70 | QTimer *scripttimer; |
71 | QString ati_query_strings[NUM_OF_ATI]; |
72 | }; |
73 | |
74 | |
75 | class ModemInfo : public QDialog { |
76 | Q_OBJECT |
77 | public: |
78 | explicit ModemInfo(QWidget *parent=0, const char *name=0); |
79 | |
80 | public: |
81 | void setAtiString(int num, const QString &s); |
82 | |
83 | private: |
84 | QLabel *ati_label[NUM_OF_ATI]; |
85 | QLineEdit *ati_label_result[NUM_OF_ATI]; |
86 | }; |
87 | |
88 | #endif |
89 | |