KFindDialog Class Reference
A generic "find" dialog. More...
#include <kfinddialog.h>
Inheritance diagram for KFindDialog:

Public Types | |
enum | Options { WholeWordsOnly = 1, FromCursor = 2, SelectedText = 4, CaseSensitive = 8, FindBackwards = 16, RegularExpression = 32, FindIncremental = 64, MinimumUserOption = 65536 } |
Public Member Functions | |
KFindDialog (QWidget *parent=0, const char *name=0, long options=0, const QStringList &findStrings=QStringList(), bool hasSelection=false) | |
KFindDialog (bool modal, QWidget *parent=0, const char *name=0, long options=0, const QStringList &findStrings=QStringList(), bool hasSelection=false) | |
virtual | ~KFindDialog () |
void | setFindHistory (const QStringList &history) |
QStringList | findHistory () const |
void | setHasSelection (bool hasSelection) |
void | setHasCursor (bool hasCursor) |
void | setSupportsBackwardsFind (bool supports) |
void | setSupportsCaseSensitiveFind (bool supports) |
void | setSupportsWholeWordsFind (bool supports) |
void | setSupportsRegularExpressionFind (bool supports) |
void | setOptions (long options) |
long | options () const |
QString | pattern () const |
void | setPattern (const QString &pattern) |
QWidget * | findExtension () |
Protected Slots | |
void | slotOk () |
void | slotSelectedTextToggled (bool) |
void | showPatterns () |
void | showPlaceholders () |
void | textSearchChanged (const QString &) |
Protected Member Functions | |
virtual void | showEvent (QShowEvent *) |
Friends | |
class | KReplaceDialog |
Detailed Description
A generic "find" dialog.
- Author:
- S.R.Haque <srhaque@iee.org>
This widget inherits from KDialogBase and implements the following additional functionalities: a find string object and an area for a user-defined widget to extend the dialog.
Example:
To use the basic modal find dialog, and then run the search:
KFindDialog dlg(....) if ( dlg.exec() != QDialog::Accepted ) return; // proceed with KFind from here
To create a non-modal find dialog:
if ( m_findDia ) KWin::setActiveWindow( m_findDia->winId() ); else { m_findDia = new KFindDialog(false,...); connect( m_findDia, SIGNAL(okClicked()), this, SLOT(findTextNext()) ); }
To use your own extensions: see findExtension().
Definition at line 72 of file kfinddialog.h.
Constructor & Destructor Documentation
|
Construct a modal find dialog.
Definition at line 54 of file kfinddialog.cpp. References KStdGuiItem::close(), KDialogBase::setButtonCancel(), and setOptions(). |
|
Construct a non-modal find dialog.
Definition at line 65 of file kfinddialog.cpp. References KStdGuiItem::close(), KDialogBase::setButtonCancel(), and setOptions(). |
|
Destructor.
Definition at line 85 of file kfinddialog.cpp. |
Member Function Documentation
|
Provide the list of
Definition at line 334 of file kfinddialog.cpp. References KHistoryCombo::clearHistory(), and KHistoryCombo::setHistoryItems(). |
|
Returns the list of history items.
Definition at line 101 of file kfinddialog.cpp. References KHistoryCombo::historyItems. |
|
Enable/disable the 'search in selection' option, depending on whether there actually is a selection.
Definition at line 346 of file kfinddialog.cpp. |
|
Hide/show the 'from cursor' option, depending on whether the application implements a cursor.
Definition at line 366 of file kfinddialog.cpp. References options(). |
|
Enable/disable the 'Find backwards' option, depending on whether the application supports it.
Definition at line 374 of file kfinddialog.cpp. References options(). |
|
Enable/disable the 'Case sensitive' option, depending on whether the application supports it.
Definition at line 383 of file kfinddialog.cpp. References options(). |
|
Enable/disable the 'Whole words only' option, depending on whether the application supports it.
Definition at line 392 of file kfinddialog.cpp. References options(). |
|
Enable/disable the 'Regular expression' option, depending on whether the application supports it.
Definition at line 401 of file kfinddialog.cpp. References options(). |
|
Set the options which are checked.
Reimplemented in KReplaceDialog. Definition at line 410 of file kfinddialog.cpp. Referenced by KFindDialog(), and KReplaceDialog::setOptions(). |
|
Returns the state of the options. Disabled options may be returned in an indeterminate state.
Reimplemented in KReplaceDialog. Definition at line 302 of file kfinddialog.cpp. Referenced by KReplaceDialog::options(), setHasCursor(), setSupportsBackwardsFind(), setSupportsCaseSensitiveFind(), setSupportsRegularExpressionFind(), and setSupportsWholeWordsFind(). |
|
Returns the pattern to find.
Definition at line 321 of file kfinddialog.cpp. |
|
Sets the pattern to find.
Definition at line 326 of file kfinddialog.cpp. |
|
Returns an empty widget which the user may fill with additional UI elements as required. The widget occupies the width of the dialog, and is positioned immediately below the regular expression support widgets for the pattern string. Definition at line 90 of file kfinddialog.cpp. |
The documentation for this class was generated from the following files: