• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • khtml
  • ui
  • findbar
khtmlfindbar.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 *
3 * Copyright (C) 2008 Bernhard Beschow <bbeschow AT cs DOT tu-berlin DOT de>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 */
20#ifndef __khtml_findbar_h__
21#define __khtml_findbar_h__
22
23#include "khtmlviewbarwidget.h"
24#include "ui_khtmlfindbar_base.h"
25
26class QMenu;
27class QAction;
28
29class KHTMLFindBar : public KHTMLViewBarWidget, private Ui::KHTMLFindBarBase
30{
31 Q_OBJECT
32public:
33 KHTMLFindBar( QWidget *parent = 0 );
34
43 void setFindHistory( const QStringList &history );
44
50 QStringList findHistory() const;
51
52 /*
53 * makes the current pattern be the first entry of the find history.
54 * Return false if the history was empty.
55 *
56 */
57 bool restoreLastPatternFromHistory();
58
65 void setHasSelection( bool hasSelection );
66
74 void setHasCursor( bool hasCursor );
75
84 void setOptions( long options );
85
93 long options() const;
94
98 QString pattern() const;
99
100 void setFoundMatch( bool match );
101 void setAtEnd( bool atEnd );
102 virtual void setVisible( bool visible );
103
104protected:
105 virtual bool event(QEvent* e);
106
107private slots:
108 void slotSelectedTextToggled(bool selec);
109 void slotSearchChanged();
110 void slotAddPatternToHistory();
111
112signals:
113 void searchChanged();
114 void findNextClicked();
115 void findPreviousClicked();
116
117private:
118 long m_enabled;
119 QMenu *m_incMenu;
120 QAction *m_caseSensitive;
121 QAction *m_wholeWordsOnly;
122 QAction *m_fromCursor;
123 QAction *m_selectedText;
124 QAction *m_regExp;
125 QAction *m_findLinksOnly;
126 QString m_prevPattern;
127 bool m_atEnd;
128};
129
130#endif
KHTMLFindBar
Definition: khtmlfindbar.h:30
KHTMLFindBar::restoreLastPatternFromHistory
bool restoreLastPatternFromHistory()
Definition: khtmlfindbar.cpp:126
KHTMLFindBar::findHistory
QStringList findHistory() const
Returns the list of history items.
Definition: khtmlfindbar.cpp:82
KHTMLFindBar::setAtEnd
void setAtEnd(bool atEnd)
Definition: khtmlfindbar.cpp:220
KHTMLFindBar::event
virtual bool event(QEvent *e)
Definition: khtmlfindbar.cpp:242
KHTMLFindBar::setHasCursor
void setHasCursor(bool hasCursor)
Hide/show the 'from cursor' option, depending on whether the application implements a cursor.
Definition: khtmlfindbar.cpp:182
KHTMLFindBar::setFindHistory
void setFindHistory(const QStringList &history)
Provide the list of strings to be displayed as the history of find strings.
Definition: khtmlfindbar.cpp:134
KHTMLFindBar::setFoundMatch
void setFoundMatch(bool match)
Definition: khtmlfindbar.cpp:200
KHTMLFindBar::findNextClicked
void findNextClicked()
KHTMLFindBar::options
long options() const
Returns the state of the options.
Definition: khtmlfindbar.cpp:87
KHTMLFindBar::setVisible
virtual void setVisible(bool visible)
Definition: khtmlfindbar.cpp:232
KHTMLFindBar::setHasSelection
void setHasSelection(bool hasSelection)
Enable/disable the 'search in selection' option, depending on whether there actually is a selection.
Definition: khtmlfindbar.cpp:146
KHTMLFindBar::setOptions
void setOptions(long options)
Set the options which are checked.
Definition: khtmlfindbar.cpp:190
KHTMLFindBar::searchChanged
void searchChanged()
KHTMLFindBar::pattern
QString pattern() const
Returns the pattern to find.
Definition: khtmlfindbar.cpp:106
KHTMLFindBar::findPreviousClicked
void findPreviousClicked()
KHTMLViewBarWidget
Definition: khtmlviewbarwidget.h:26
QAction
QEvent
QMenu
QWidget
khtmlviewbarwidget.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal