KoFindDialog Class Reference
A generic "find" widget. More...
#include <koFind.h>
Inheritance diagram for KoFindDialog:

Public Types | |
enum | Options { WholeWordsOnly = 1, FromCursor = 2, SelectedText = 4, CaseSensitive = 8, FindBackwards = 16, RegularExpression = 32, MinimumUserOption = 65536 } |
Signals | |
void | okClicked () |
The OK button was pressed, the pattern was not empty, and if it is supposed to be a regular expression, it is known to be valid. | |
Public Member Functions | |
KoFindDialog (QWidget *parent=0, const char *name=0, long options=0, const QStringList &findStrings=QStringList(), bool hasSelection=true) | |
Construct a find dialog with a parent object and a name. | |
virtual | ~KoFindDialog () |
Destructor. | |
void | setFindHistory (const QStringList &strings) |
Provide the list of strings to be displayed as the history of find strings. | |
QStringList | findHistory () const |
Returns the list of history items. | |
void | setHasSelection (bool hasSelection) |
Enable/disable the 'search in selection' option, depending on whether there actually is a selection. | |
void | setOptions (long options) |
Set the options which are enabled. | |
long | options () const |
Returns the state of the options. | |
QString | pattern () const |
Returns the pattern to find. | |
QWidget * | findExtension () |
Returns an empty widget which the user may fill with additional UI elements as required. | |
Public Attributes | |
KHistoryCombo * | m_find |
KHistoryCombo * | m_replace |
Protected Slots | |
void | slotOk () |
void | slotSelectedTextToggled (bool) |
void | showPatterns () |
void | showPlaceholders () |
void | textSearchChanged (const QString &) |
Private Member Functions | |
KoFindDialog (QWidget *parent, const char *name, bool forReplace) | |
Construct a find dialog with a parent object and a name. | |
void | init (bool forReplace, const QStringList &findStrings, bool hasSelection) |
Private Attributes | |
QGroupBox * | m_findGrp |
QLabel * | m_findLabel |
QCheckBox * | m_regExp |
QPushButton * | m_regExpItem |
QGridLayout * | m_findLayout |
QWidget * | m_findExtension |
QGroupBox * | m_optionGrp |
QCheckBox * | m_wholeWordsOnly |
QCheckBox * | m_fromCursor |
QCheckBox * | m_selectedText |
QCheckBox * | m_caseSensitive |
QCheckBox * | m_findBackwards |
QPopupMenu * | m_patterns |
QGroupBox * | m_replaceGrp |
QLabel * | m_replaceLabel |
QCheckBox * | m_backRef |
QPushButton * | m_backRefItem |
QGridLayout * | m_replaceLayout |
QWidget * | m_replaceExtension |
QCheckBox * | m_promptOnReplace |
QPopupMenu * | m_placeholders |
KoFindDialogPrivate * | d |
Detailed Description
A generic "find" widget.
- Author:
- S.R.Haque <srhaque@iee.org>
Example
To use the basic find dialog:
KoFindDialog dlg(....) if ( dlg.exec() != QDialog::Accepted ) return;
// proceed with KoFind from here
To use your own extensions:
Definition at line 63 of file koFind.h.
Member Enumeration Documentation
|
Reimplemented in KoReplaceDialog. |
Constructor & Destructor Documentation
|
Construct a find dialog with a parent object and a name.
Definition at line 36 of file koFind.cpp. References init(), KoFindDialog(), and setOptions(). Referenced by KoFindDialog(). |
|
Destructor.
Definition at line 48 of file koFind.cpp. |
|
Construct a find dialog with a parent object and a name. This version of the constructor is for use by friends only!
Definition at line 43 of file koFind.cpp. References KoFindDialog(). |
Member Function Documentation
|
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 52 of file koFind.cpp. References m_findExtension. |
|
Returns the list of history items.
Definition at line 57 of file koFind.cpp. References KHistoryCombo::historyItems, and m_find. |
|
Definition at line 62 of file koFind.cpp. References init(), m_backRef, m_backRefItem, m_caseSensitive, m_find, m_findBackwards, m_findExtension, m_findGrp, m_findLabel, m_findLayout, m_fromCursor, m_optionGrp, m_patterns, m_placeholders, m_promptOnReplace, m_regExp, m_regExpItem, m_replace, m_replaceExtension, m_replaceGrp, m_replaceLabel, m_replaceLayout, m_selectedText, m_wholeWordsOnly, pattern(), setFindHistory(), setHasSelection(), showPatterns(), showPlaceholders(), slotSelectedTextToggled(), and textSearchChanged(). Referenced by init(), and KoFindDialog(). |
|
The OK button was pressed, the pattern was not empty, and if it is supposed to be a regular expression, it is known to be valid.
Reimplemented from KDialogBase. Referenced by slotOk(). |
|
Returns the state of the options. Disabled options may be returned in an indeterminate state.
Reimplemented in KoReplaceDialog. Definition at line 191 of file koFind.cpp. References CaseSensitive, FindBackwards, FromCursor, m_caseSensitive, m_findBackwards, m_fromCursor, m_regExp, m_selectedText, m_wholeWordsOnly, options(), RegularExpression, SelectedText, and WholeWordsOnly. Referenced by QEditorView::doFind(), KoReplaceDialog::options(), and options(). |
|
Returns the pattern to find.
Definition at line 210 of file koFind.cpp. References m_find. Referenced by QEditorView::doFind(), QEditorView::doReplace(), init(), and slotOk(). |
|
Provide the list of
Definition at line 215 of file koFind.cpp. References KHistoryCombo::clearHistory(), m_find, setFindHistory(), and KHistoryCombo::setHistoryItems(). Referenced by init(), and setFindHistory(). |
|
Enable/disable the 'search in selection' option, depending on whether there actually is a selection.
Definition at line 227 of file koFind.cpp. References m_selectedText, setHasSelection(), and slotSelectedTextToggled(). Referenced by init(), and setHasSelection(). |
|
Set the options which are enabled.
Reimplemented in KoReplaceDialog. Definition at line 244 of file koFind.cpp. References CaseSensitive, FindBackwards, FromCursor, m_caseSensitive, m_findBackwards, m_fromCursor, m_regExp, m_selectedText, m_wholeWordsOnly, RegularExpression, SelectedText, setOptions(), and WholeWordsOnly. Referenced by KoFindDialog(), and setOptions(). |
|
Definition at line 256 of file koFind.cpp. References I18N_NOOP, m_find, and m_patterns. Referenced by init(). |
|
Definition at line 308 of file koFind.cpp. References I18N_NOOP, m_placeholders, and m_replace. Referenced by init(). |
|
Reimplemented from KDialogBase. Reimplemented in KoReplaceDialog. Definition at line 341 of file koFind.cpp. References KHistoryCombo::addToHistory(), m_find, m_regExp, okClicked(), and pattern(). Referenced by KoReplaceDialog::slotOk(). |
|
Definition at line 236 of file koFind.cpp. References m_fromCursor, and slotSelectedTextToggled(). Referenced by init(), setHasSelection(), and slotSelectedTextToggled(). |
|
Definition at line 186 of file koFind.cpp. References text(), and textSearchChanged(). Referenced by init(), and textSearchChanged(). |
Member Data Documentation
|
Reimplemented in KoReplaceDialog. |
|
Definition at line 209 of file koFind.h. Referenced by init(). |
|
Definition at line 210 of file koFind.h. Referenced by init(). |
|
Definition at line 186 of file koFind.h. Referenced by init(), options(), and setOptions(). |
|
Definition at line 171 of file koFind.h. Referenced by QEditorView::doFind(), QEditorView::doReplace(), findHistory(), init(), pattern(), setFindHistory(), showPatterns(), and slotOk(). |
|
Definition at line 187 of file koFind.h. Referenced by init(), options(), and setOptions(). |
|
Definition at line 180 of file koFind.h. Referenced by findExtension(), and init(). |
|
Definition at line 175 of file koFind.h. Referenced by init(). |
|
Definition at line 176 of file koFind.h. Referenced by init(). |
|
Definition at line 179 of file koFind.h. Referenced by init(). |
|
Definition at line 184 of file koFind.h. Referenced by init(), options(), setOptions(), and slotSelectedTextToggled(). |
|
Definition at line 182 of file koFind.h. Referenced by init(). |
|
Definition at line 189 of file koFind.h. Referenced by init(), and showPatterns(). |
|
Definition at line 216 of file koFind.h. Referenced by init(), and showPlaceholders(). |
|
Definition at line 214 of file koFind.h. Referenced by init(). |
|
Definition at line 177 of file koFind.h. Referenced by init(), options(), setOptions(), and slotOk(). |
|
Definition at line 178 of file koFind.h. Referenced by init(). |
|
Definition at line 172 of file koFind.h. Referenced by init(), and showPlaceholders(). |
|
Definition at line 212 of file koFind.h. Referenced by init(). |
|
Definition at line 207 of file koFind.h. Referenced by init(). |
|
Definition at line 208 of file koFind.h. Referenced by init(). |
|
Definition at line 211 of file koFind.h. Referenced by init(). |
|
Definition at line 185 of file koFind.h. Referenced by init(), options(), setHasSelection(), and setOptions(). |
|
Definition at line 183 of file koFind.h. Referenced by init(), options(), and setOptions(). |
The documentation for this class was generated from the following files:
- editors/qeditor/koFind.h
- editors/qeditor/koFind.cpp