1/*
2 *
3 * kPPP: A pppd front end for the KDE project
4 *
5 * $Id$
6 *
7 * Copyright (C) 1997 Bernd Johannes Wuebben
8 * wuebben@math.cornell.edu
9 *
10 *
11 * This program 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 program 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#ifndef PWENTRY_H
28#define PWENTRY_H
29
30#include <qwidget.h>
31#include <qlineedit.h>
32#include <qlabel.h>
33#include <q3groupbox.h>
34//Added by qt3to4:
35#include <QFocusEvent>
36#include <QResizeEvent>
37
38class PWEntry : public QWidget
39{
40 Q_OBJECT
41
42public:
43
44 explicit PWEntry( QWidget *parent=0, const char *name=0 );
45 bool Consumed();
46 void setConsumed();
47 QString text();
48 void setPrompt(const QString &);
49
50public slots:
51
52 void setEchoModeNormal();
53 void setEchoModePassword();
54 void hide();
55 void show();
56
57signals:
58
59 void returnPressed();
60
61protected:
62
63 void resizeEvent(QResizeEvent* qre);
64 void focusInEvent( QFocusEvent *);
65
66private:
67
68 Q3GroupBox *frame;
69 QLineEdit *pw;
70 QLabel *pl;
71 bool isconsumed;
72
73};
74
75#endif
76