1/*
2 *
3 * kPPP: A front end for pppd for the KDE project
4 *
5 * $Id$
6 *
7 * Copyright (C) 1997 Bernd Johannes Wuebben
8 * wuebben@math.cornell.edu
9 *
10 *
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.
15 *
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.
20 *
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.
24 *
25 */
26
27
28#ifndef _MINITERM_H_
29#define _MINITERM_H_
30
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>
41
42class KHelpMenu;
43
44class QTimer;
45class QMenuBar;
46class KToolBar;
47class KHelpMenu;
48class QPushButton;
49class QLabel;
50
51class MyTerm : public Q3MultiLineEdit {
52 Q_OBJECT
53public:
54 explicit MyTerm(QWidget *parent=0, const char *name=0);
55
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();
63};
64
65
66class MiniTerm : public QDialog {
67 Q_OBJECT
68public:
69
70 explicit MiniTerm(QWidget *parent=0, const char *name=0);
71 ~MiniTerm();
72
73 void closeEvent( QCloseEvent *e );
74
75public slots:
76 void cancelbutton();
77 void init();
78 void readChar(unsigned char);
79 void help();
80 void resetModem();
81
82protected:
83 void setupToolbar();
84
85 QPushButton *cancel;
86 MyTerm *terminal;
87 QTimer *inittimer;
88
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;
100
101 QPixmap pb1_pixmap;
102 QPixmap pb2_pixmap;
103 QPixmap pb3_pixmap;
104 QPixmap pb4_pixmap;
105};
106
107
108#endif
109