3 This file is part of Minitube.
4 Copyright 2009, Flavio Tordini <flavio.tordini@gmail.com>
6 Minitube is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 Minitube is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with Minitube. If not, see <http://www.gnu.org/licenses/>.
21 /****************************************************************************
23 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
24 ** Contact: Nokia Corporation (qt-info@nokia.com)
26 ** This file is part of the demonstration applications of the Qt Toolkit.
28 ** $QT_BEGIN_LICENSE:LGPL$
30 ** Licensees holding valid Qt Commercial licenses may use this file in
31 ** accordance with the Qt Commercial License Agreement provided with the
32 ** Software or, alternatively, in accordance with the terms contained in
33 ** a written agreement between you and Nokia.
35 ** GNU Lesser General Public License Usage
36 ** Alternatively, this file may be used under the terms of the GNU Lesser
37 ** General Public License version 2.1 as published by the Free Software
38 ** Foundation and appearing in the file LICENSE.LGPL included in the
39 ** packaging of this file. Please review the following information to
40 ** ensure the GNU Lesser General Public License version 2.1 requirements
41 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
43 ** In addition, as a special exception, Nokia gives you certain
44 ** additional rights. These rights are described in the Nokia Qt LGPL
45 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
48 ** GNU General Public License Usage
49 ** Alternatively, this file may be used under the terms of the GNU
50 ** General Public License version 3.0 as published by the Free Software
51 ** Foundation and appearing in the file LICENSE.GPL included in the
52 ** packaging of this file. Please review the following information to
53 ** ensure the GNU General Public License version 3.0 requirements will be
54 ** met: http://www.gnu.org/copyleft/gpl.html.
56 ** If you are unsure which license is appropriate for your use, please
57 ** contact the sales department at http://www.qtsoftware.com/contact.
60 ****************************************************************************/
65 #include <QtCore/QUrl>
66 #include <QtGui/QWidget>
67 #include <QtGui/QLineEdit>
68 #include <QtGui/QStyleOptionFrame>
75 class ExLineEdit : public QWidget
80 ExLineEdit(QWidget *parent = 0);
82 inline QLineEdit *lineEdit() const { return m_lineEdit; }
84 void setLeftWidget(QWidget *widget);
85 QWidget *leftWidget() const;
90 return m_lineEdit->text();
92 QSize sizeHint() const;
93 void updateGeometries();
94 void setFont(const QFont &);
97 void focusInEvent(QFocusEvent *event);
98 void focusOutEvent(QFocusEvent *event);
99 void keyPressEvent(QKeyEvent *event);
100 void paintEvent(QPaintEvent *event);
101 void resizeEvent(QResizeEvent *event);
102 bool event(QEvent *event);
103 void initStyleOption(QStyleOptionFrameV2 *option) const;
105 QWidget *m_leftWidget;
106 QLineEdit *m_lineEdit;
107 ClearButton *m_clearButton;
110 #endif // URLLINEEDIT_H