Contact cannot be a null ptr, and it is accessed before anyway. Disscussed with kedge.
[kdenetwork.git] / kppp / modeminfo.h
blobc4ad74f2b48dd5b2787f420e0102d4ea1acb8d03
1 /*
3 * kPPP: A front end for pppd for the KDE project
5 * Copyright (C) 1997 Bernd Johannes Wuebben
6 * wuebben@math.cornell.edu
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.
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.
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.
26 #ifndef MODEMINFO_H
27 #define MODEMINFO_H
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>
39 const int NUM_OF_ATI = 8;
42 class ModemTransfer : public QDialog {
43 Q_OBJECT
44 public:
45 explicit ModemTransfer(QWidget *parent=0, const char *name=0);
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);
55 private:
56 void ati_done();
58 protected:
59 void closeEvent(QCloseEvent *e);
61 private:
62 int step;
63 QString readbuffer;
65 QPushButton *cancel;
66 QProgressBar *progressBar;
67 QLabel *statusBar;
69 QTimer *timeout_timer;
70 QTimer *scripttimer;
71 QString ati_query_strings[NUM_OF_ATI];
75 class ModemInfo : public QDialog {
76 Q_OBJECT
77 public:
78 explicit ModemInfo(QWidget *parent=0, const char *name=0);
80 public:
81 void setAtiString(int num, const QString &s);
83 private:
84 QLabel *ati_label[NUM_OF_ATI];
85 QLineEdit *ati_label_result[NUM_OF_ATI];
88 #endif