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

KDEUI

  • kdeui
  • findreplace
kfinddialog.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2001, S.R.Haque <srhaque@iee.org>.
3 Copyright (C) 2002, David Faure <david@mandrakesoft.com>
4 This file is part of the KDE project
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License version 2, as published by the Free Software Foundation.
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
21#ifndef KFINDDIALOG_H
22#define KFINDDIALOG_H
23
24#include <kdialog.h>
25
78class KDEUI_EXPORT KFindDialog:
79 public KDialog
80{
81 Q_OBJECT
82
83public:
84
85
94 explicit KFindDialog( QWidget *parent = 0, long options = 0,
95 const QStringList &findStrings = QStringList(), bool hasSelection = false, bool replaceDialog = false );
96
100 virtual ~KFindDialog();
101
110 void setFindHistory( const QStringList &history );
111
117 QStringList findHistory() const;
118
125 void setHasSelection( bool hasSelection );
126
134 void setHasCursor( bool hasCursor );
135
143 void setSupportsBackwardsFind( bool supports );
144
152 void setSupportsCaseSensitiveFind( bool supports );
153
161 void setSupportsWholeWordsFind( bool supports );
162
170 void setSupportsRegularExpressionFind( bool supports );
171
180 void setOptions( long options );
181
189 long options() const;
190
194 QString pattern() const;
195
199 void setPattern ( const QString &pattern );
200
207 QWidget *findExtension() const;
208
209Q_SIGNALS:
214 void optionsChanged();
215
216protected:
217 virtual void showEvent ( QShowEvent * );
218
219private:
220 friend class KReplaceDialog;
221 friend class KReplaceDialogPrivate;
222 class KFindDialogPrivate;
223 KFindDialogPrivate* const d;
224
225 Q_PRIVATE_SLOT( d, void _k_slotPlaceholdersAboutToShow() )
226 Q_PRIVATE_SLOT( d, void _k_slotOk() )
227 Q_PRIVATE_SLOT( d, void _k_slotSelectedTextToggled(bool) )
228 Q_PRIVATE_SLOT( d, void _k_showPatterns() )
229 Q_PRIVATE_SLOT( d, void _k_showPlaceholders() )
230 Q_PRIVATE_SLOT( d, void _k_textSearchChanged(const QString&) )
231};
232
233#endif // KFINDDIALOG_H
KDialog::KDialog
KDialog(QWidget *parent=0, Qt::WindowFlags flags=0)
Creates a dialog.
Definition kdialog.cpp:189
KFindDialog::showEvent
virtual void showEvent(QShowEvent *)
Definition kfinddialog.cpp:254
KFindDialog::optionsChanged
void optionsChanged()
This signal is sent whenever one of the option checkboxes is toggled.
KFindDialog::setSupportsBackwardsFind
void setSupportsBackwardsFind(bool supports)
Enable/disable the 'Find backwards' option, depending on whether the application supports it.
Definition kfinddialog.cpp:353
KFindDialog::setHasCursor
void setHasCursor(bool hasCursor)
Hide/show the 'from cursor' option, depending on whether the application implements a cursor.
Definition kfinddialog.cpp:345
KFindDialog::KReplaceDialog
friend class KReplaceDialog
Definition kfinddialog.h:220
KFindDialog::setSupportsWholeWordsFind
void setSupportsWholeWordsFind(bool supports)
Enable/disable the 'Whole words only' option, depending on whether the application supports it.
Definition kfinddialog.cpp:371
KFindDialog::KReplaceDialogPrivate
friend class KReplaceDialogPrivate
Definition kfinddialog.h:221
KFindDialog::KFindDialog
KFindDialog(QWidget *parent=0, long options=0, const QStringList &findStrings=QStringList(), bool hasSelection=false, bool replaceDialog=false)
Construct a modal find dialog.
Definition kfinddialog.cpp:43
KFindDialog::setSupportsCaseSensitiveFind
void setSupportsCaseSensitiveFind(bool supports)
Enable/disable the 'Case sensitive' option, depending on whether the application supports it.
Definition kfinddialog.cpp:362
KFindDialog::setFindHistory
void setFindHistory(const QStringList &history)
Provide the list of strings to be displayed as the history of find strings.
Definition kfinddialog.cpp:313
KFindDialog::findHistory
QStringList findHistory() const
Returns the list of history items.
Definition kfinddialog.cpp:72
KFindDialog::pattern
QString pattern() const
Returns the pattern to find.
Definition kfinddialog.cpp:300
KFindDialog::setSupportsRegularExpressionFind
void setSupportsRegularExpressionFind(bool supports)
Enable/disable the 'Regular expression' option, depending on whether the application supports it.
Definition kfinddialog.cpp:380
KFindDialog::options
long options() const
Returns the state of the options.
Definition kfinddialog.cpp:281
KFindDialog::setHasSelection
void setHasSelection(bool hasSelection)
Enable/disable the 'search in selection' option, depending on whether there actually is a selection.
Definition kfinddialog.cpp:325
KFindDialog::setOptions
void setOptions(long options)
Set the options which are checked.
Definition kfinddialog.cpp:398
KFindDialog::setPattern
void setPattern(const QString &pattern)
Sets the pattern to find.
Definition kfinddialog.cpp:305
KFindDialog::findExtension
QWidget * findExtension() const
Returns an empty widget which the user may fill with additional UI elements as required.
Definition kfinddialog.cpp:61
QWidget
kdialog.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • 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