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

KHTML

  • sources
  • kde-4.12
  • kdelibs
  • 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 
26 class QMenu;
27 class QAction;
28 
29 class KHTMLFindBar : public KHTMLViewBarWidget, private Ui::KHTMLFindBarBase
30 {
31  Q_OBJECT
32 public:
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 
104 protected:
105  virtual bool event(QEvent* e);
106 
107 private slots:
108  void slotSelectedTextToggled(bool selec);
109  void slotSearchChanged();
110  void slotAddPatternToHistory();
111 
112 signals:
113  void searchChanged();
114  void findNextClicked();
115  void findPreviousClicked();
116 
117 private:
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::setFoundMatch
void setFoundMatch(bool match)
Definition: khtmlfindbar.cpp:200
KHTMLFindBar::restoreLastPatternFromHistory
bool restoreLastPatternFromHistory()
Definition: khtmlfindbar.cpp:126
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::setHasCursor
void setHasCursor(bool hasCursor)
Hide/show the 'from cursor' option, depending on whether the application implements a cursor...
Definition: khtmlfindbar.cpp:182
KHTMLViewBarWidget
Definition: khtmlviewbarwidget.h:25
QWidget
KHTMLFindBar::KHTMLFindBar
KHTMLFindBar(QWidget *parent=0)
Definition: khtmlfindbar.cpp:34
QString
KHTMLFindBar::findHistory
QStringList findHistory() const
Returns the list of history items.
Definition: khtmlfindbar.cpp:82
khtmlviewbarwidget.h
KHTMLFindBar::setOptions
void setOptions(long options)
Set the options which are checked.
Definition: khtmlfindbar.cpp:190
KHTMLFindBar::setAtEnd
void setAtEnd(bool atEnd)
Definition: khtmlfindbar.cpp:220
KHTMLFindBar::setVisible
virtual void setVisible(bool visible)
Definition: khtmlfindbar.cpp:232
KHTMLFindBar::options
long options() const
Returns the state of the options.
Definition: khtmlfindbar.cpp:87
QStringList
KHTMLFindBar::searchChanged
void searchChanged()
KHTMLFindBar
Definition: khtmlfindbar.h:29
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::findNextClicked
void findNextClicked()
QMenu
KHTMLFindBar::findPreviousClicked
void findPreviousClicked()
KHTMLFindBar::event
virtual bool event(QEvent *e)
Definition: khtmlfindbar.cpp:242
QEvent
KHTMLFindBar::pattern
QString pattern() const
Returns the pattern to find.
Definition: khtmlfindbar.cpp:106
QAction
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:21 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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