1 /* ============================================================
3 * This file is a part of the rekonq project
5 * Copyright (C) 2008-2012 by Andrea Diamantini <adjam7 at gmail dot com>
6 * Copyright (C) 2009-2011 by Lionel Chauvin <megabigbug@yahoo.fr>
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License or (at your option) version 3 or any later version
13 * accepted by the membership of KDE e.V. (or its successor approved
14 * by the membership of KDE e.V.), which shall act as a proxy
15 * defined in Section 14 of version 3 of the license.
17 * This program 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
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25 * ============================================================ */
41 class FindBar
: public QWidget
46 explicit FindBar(QWidget
*parent
);
47 enum FindDirection
{ Forward
= 0, Backward
};
49 bool matchCase() const;
50 void notifyMatch(bool match
);
51 bool highlightAllState() const;
53 void setVisible(bool visible
);
54 void setAssociatedWebView(QWebView
*webView
);
57 void keyPressEvent(QKeyEvent
*event
);
60 void findText(const QString
&search
);
61 void matchCaseUpdate();
64 void updateHighlight();
65 void resetAssociatedWebView();
68 void searchString(const QString
&);
71 void find(FindDirection dir
);
74 QLineEdit
*m_lineEdit
;
75 QCheckBox
*m_matchCase
;
76 QCheckBox
*m_highlightAll
;
78 QString _lastStringSearched
;
79 QPointer
<QWebView
> m_associatedWebView
;