summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/iplined.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/ppp/iplined.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/iplined.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/noncore/settings/networksettings/ppp/iplined.cpp b/noncore/settings/networksettings/ppp/iplined.cpp
new file mode 100644
index 0000000..f4fc370
--- a/dev/null
+++ b/noncore/settings/networksettings/ppp/iplined.cpp
@@ -0,0 +1,42 @@
1/*
2 * kPPP: A pppd front end for the KDE project
3 *
4 * $Id$
5 *
6 * Copyright (C) 1997 Bernd Johannes Wuebben
7 * wuebben@math.cornell.edu
8 *
9 * based on EzPPP:
10 * Copyright (C) 1997 Jay Painter
11 *
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.
16 *
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.
21 *
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., 675 Mass Ave, Cambridge, MA 02139, USA.
25 */
26
27#include "iplined.h"
28
29IPLineEdit::IPLineEdit( QWidget *parent, const char *name )
30 : QLineEdit(parent, name )//, "0123456789.")
31{
32 setMaxLength(3 * 4 + 1 * 3);
33}
34
35QSize IPLineEdit::sizeHint() const {
36 QFontMetrics fm = fontMetrics();
37
38 QSize s;
39 s.setHeight(QLineEdit::sizeHint().height());
40 s.setWidth(fm.boundingRect("888.888.888.888XX").width());
41 return s;
42}