Contact cannot be a null ptr, and it is accessed before anyway. Disscussed with kedge.
[kdenetwork.git] / kppp / miniterm.h
blob3a20a3a4f1edbac8780502a2737fb9f9c6740508
1 /*
3 * kPPP: A front end for pppd for the KDE project
5 * $Id$
7 * Copyright (C) 1997 Bernd Johannes Wuebben
8 * wuebben@math.cornell.edu
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Library General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Library General Public License for more details.
21 * You should have received a copy of the GNU Library General Public
22 * License along with this program; if not, write to the Free
23 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 #ifndef _MINITERM_H_
29 #define _MINITERM_H_
31 #include <qdialog.h>
32 #include <qpixmap.h>
33 #include <qevent.h>
34 #include <q3multilineedit.h>
35 //Added by qt3to4:
36 #include <QLabel>
37 #include <QKeyEvent>
38 #include <QMenu>
39 #include <QCloseEvent>
40 #include <ktoolbar.h>
42 class KHelpMenu;
44 class QTimer;
45 class QMenuBar;
46 class KToolBar;
47 class KHelpMenu;
48 class QPushButton;
49 class QLabel;
51 class MyTerm : public Q3MultiLineEdit {
52 Q_OBJECT
53 public:
54 explicit MyTerm(QWidget *parent=0, const char *name=0);
56 void keyPressEvent (QKeyEvent*);
57 void insertChar(unsigned char c);
58 void newLine();
59 void backspace();
60 void del();
61 void myreturn();
62 void mynewline();
66 class MiniTerm : public QDialog {
67 Q_OBJECT
68 public:
70 explicit MiniTerm(QWidget *parent=0, const char *name=0);
71 ~MiniTerm();
73 void closeEvent( QCloseEvent *e );
75 public slots:
76 void cancelbutton();
77 void init();
78 void readChar(unsigned char);
79 void help();
80 void resetModem();
82 protected:
83 void setupToolbar();
85 QPushButton *cancel;
86 MyTerm *terminal;
87 QTimer *inittimer;
89 QMenuBar * menubar;
90 KToolBar * toolbar;
91 QMenu * m_file;
92 QMenu * m_edit;
93 QMenu * m_options;
94 KHelpMenu * m_help;
95 QLabel * statusbar;
96 QPushButton *pb1;
97 QPushButton *pb2;
98 QPushButton *pb3;
99 QPushButton *pb4;
101 QPixmap pb1_pixmap;
102 QPixmap pb2_pixmap;
103 QPixmap pb3_pixmap;
104 QPixmap pb4_pixmap;
108 #endif