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 | * based on EzPPP: |
11 | * Copyright (C) 1997 Jay Painter |
12 | * |
13 | * This library is free software; you can redistribute it and/or |
14 | * modify it under the terms of the GNU Library General Public |
15 | * License as published by the Free Software Foundation; either |
16 | * version 2 of the License, or (at your option) any later version. |
17 | * |
18 | * This library is distributed in the hope that it will be useful, |
19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
21 | * Library General Public License for more details. |
22 | * |
23 | * You should have received a copy of the GNU Library General Public |
24 | * License along with this program; if not, write to the Free |
25 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
26 | */ |
27 | |
28 | #ifndef _SCRIPTEDIT_H_ |
29 | #define _SCRIPTEDIT_H_ |
30 | |
31 | #include <qwidget.h> |
32 | |
33 | class QComboBox; |
34 | class QLineEdit; |
35 | |
36 | class ScriptEdit : public QWidget { |
37 | Q_OBJECT |
38 | public: |
39 | ScriptEdit( QWidget *parent=0 ); |
40 | ~ScriptEdit() {} |
41 | |
42 | QString text()const; |
43 | void setText(const QString &); |
44 | int type()const; |
45 | |
46 | virtual void setEnabled(bool); |
47 | |
48 | signals: |
49 | void returnPressed(); |
50 | |
51 | private slots: |
52 | void setType(int); |
53 | void seReturnPressed(); |
54 | |
55 | private: |
56 | QComboBox *st; |
57 | QLineEdit *se; |
58 | |
59 | public: |
60 | enum setypes { Expect = 0, |
61 | Send = 1, |
62 | Pause = 2, |
63 | Hangup = 3, |
64 | Answer = 4, |
65 | Timeout = 5, |
66 | Password = 6, |
67 | ID = 7, |
68 | Prompt = 8, |
69 | PWPrompt = 9, |
70 | LoopStart = 10, |
71 | LoopEnd = 11, |
72 | Scan = 12, |
73 | Save = 13, |
74 | SendNoEcho = 14 |
75 | }; |
76 | }; |
77 | |
78 | #endif |
79 | |
80 | |