2 * kPPP: A pppd front end for the KDE project
6 * Copyright (C) 1997 Bernd Johannes Wuebben
7 * wuebben@math.cornell.edu
10 * Copyright (C) 1997 Jay Painter
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Library General Public
14 * License as published by the Free Software Foundation; either
15 * version 2 of the License, or (at your option) any later version.
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Library General Public License for more details.
22 * You should have received a copy of the GNU Library General Public
23 * License along with this program; if not, write to the Free
24 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29 IPLineEdit::IPLineEdit( QWidget
*parent
, const char *name
)
30 : KRestrictedLine(parent
)
32 setValidChars(QString("0123456789."));
34 setMaxLength(3 * 4 + 1 * 3);
37 QSize
IPLineEdit::sizeHint() const {
38 QFontMetrics fm
= fontMetrics();
41 s
.setHeight(QLineEdit::sizeHint().height());
42 s
.setWidth(fm
.boundingRect("888.888.888.888XX").width());