Method |
Description |
|
CloseFindNextDialog ( ) : void |
Close the "find next?" dialog. The application should do this when the last match was hit. If the application deletes the KFind, then "find previous" won't be possible anymore. IMPORTANT: you should also call this if you are using a non-modal find dialog, to tell KFind not to pop up its own dialog. |
|
Dispose ( ) : void |
|
|
Find ( ) : KFind.Result |
Walk the text fragment (e.g. text-processor line, kspread cell) looking for matches. For each match, emits the highlight() signal and displays the find-again dialog proceeding. |
|
Find ( string text, Qyoto.QRegExp pattern, int index, long options, int &matchedlength ) : int |
|
|
Find ( string text, string pattern, int index, long options, int &matchedlength ) : int |
Search the given string, and returns whether a match was found. If one is, the length of the string matched is also returned. A performance optimised version of the function is provided for use with regular expressions. name="text" The string to search. name="pattern" The pattern to look for. name="index" The starting index into the string. name="options" The options to use. name="matchedlength" The length of the string that was matched |
|
FindNextDialog ( ) : Kimono.KDialog |
|
|
FindNextDialog ( bool create ) : Kimono.KDialog |
Return (or create) the dialog that shows the "find next?" prompt. Usually you don't need to call this. One case where it can be useful, is when the user selects the "Find" menu item while a find operation is under way. In that case, the program may want to call setActiveWindow() on that dialog. |
|
Index ( ) : int |
|
|
KFind ( string pattern, long options, QWidget parent ) : System |
Only use this constructor if you don't use KFindDialog, or if you use it as a modal dialog. |
|
KFind ( string pattern, long options, QWidget parent, QWidget findDialog ) : System |
This is the recommended constructor if you also use KFindDialog (non-modal). You should pass the pointer to it here, so that when a message box appears it has the right parent. Don't worry about deletion, KFind will notice if the find dialog is closed. |
|
NeedData ( ) : bool |
|
|
NumMatches ( ) : int |
Return the number of matches found (i.e. the number of times the highlight signal was emitted). If 0, can be used in a dialog box to tell the user "no match was found". The final dialog does so already, unless you used setDisplayFinalDialog(false). |
|
Pattern ( ) : string |
|
|
SetData ( int id, string data ) : void |
|
|
SetData ( int id, string data, int startPos ) : void |
Call this when needData returns true, before calling find(). The use of ID's is especially useful if you're using the FindIncremental option. name="id" the id of the text fragment name="data" the text fragment (line) name="startPos" if set, the index at which the search should start. This is only necessary for the very first call to setData usually, for the 'find in selection' feature. A value of -1 (the default value) means "process all the data", i.e. either 0 or data.length()-1 depending on FindBackwards. |
|
SetData ( string data ) : void |
|
|
SetData ( string data, int startPos ) : void |
Call this when needData returns true, before calling find(). name="data" the text fragment (line) name="startPos" if set, the index at which the search should start. This is only necessary for the very first call to setData usually, for the 'find in selection' feature. A value of -1 (the default value) means "process all the data", i.e. either 0 or data.length()-1 depending on FindBackwards. |
|
SetPattern ( string pattern ) : void |
Change the pattern we're looking for |
|
options ( ) : long |
Return the current options. Warning: this is usually the same value as the one passed to the constructor, but options might change _during_ the replace operation: e.g. the "All" button resets the PromptOnReplace flag. |
|