C# 클래스 Kimono.KFind

상속: Qyoto.QObject, IDisposable
파일 보기 프로젝트 열기: 0xd34df00d/Qross

공개 메소드들

메소드 설명
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.

보호된 메소드들

메소드 설명
CreateProxy ( ) : void
DialogsParent ( ) : QWidget
KFind ( Type dummy ) : System
ParentWidget ( ) : QWidget

비공개 메소드들

메소드 설명
DisplayFinalDialog ( ) : void
KFind ( ) : System
ResetCounts ( ) : void
SetOptions ( long options ) : void
ShouldRestart ( ) : bool
ShouldRestart ( bool forceAsking ) : bool
ShouldRestart ( bool forceAsking, bool showNumMatches ) : bool
ValidateMatch ( string text, int index, int matchedlength ) : bool

메소드 상세

CloseFindNextDialog() 공개 메소드

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.
public CloseFindNextDialog ( ) : void
리턴 void

CreateProxy() 보호된 메소드

protected CreateProxy ( ) : void
리턴 void

DialogsParent() 보호된 메소드

protected DialogsParent ( ) : QWidget
리턴 Qyoto.QWidget

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Find() 공개 메소드

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.
public Find ( ) : KFind.Result
리턴 KFind.Result

Find() 공개 정적인 메소드

public static Find ( string text, Qyoto.QRegExp pattern, int index, long options, int &matchedlength ) : int
text string
pattern Qyoto.QRegExp
index int
options long
matchedlength int
리턴 int

Find() 공개 정적인 메소드

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
public static Find ( string text, string pattern, int index, long options, int &matchedlength ) : int
text string
pattern string
index int
options long
matchedlength int
리턴 int

FindNextDialog() 공개 메소드

public FindNextDialog ( ) : Kimono.KDialog
리턴 Kimono.KDialog

FindNextDialog() 공개 메소드

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.
public FindNextDialog ( bool create ) : Kimono.KDialog
create bool
리턴 Kimono.KDialog

Index() 공개 메소드

public Index ( ) : int
리턴 int

KFind() 보호된 메소드

protected KFind ( Type dummy ) : System
dummy System.Type
리턴 System

KFind() 공개 메소드

Only use this constructor if you don't use KFindDialog, or if you use it as a modal dialog.
public KFind ( string pattern, long options, QWidget parent ) : System
pattern string
options long
parent Qyoto.QWidget
리턴 System

KFind() 공개 메소드

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.
public KFind ( string pattern, long options, QWidget parent, QWidget findDialog ) : System
pattern string
options long
parent Qyoto.QWidget
findDialog Qyoto.QWidget
리턴 System

NeedData() 공개 메소드

public NeedData ( ) : bool
리턴 bool

NumMatches() 공개 메소드

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).
public NumMatches ( ) : int
리턴 int

ParentWidget() 보호된 메소드

protected ParentWidget ( ) : QWidget
리턴 Qyoto.QWidget

Pattern() 공개 메소드

public Pattern ( ) : string
리턴 string

SetData() 공개 메소드

public SetData ( int id, string data ) : void
id int
data string
리턴 void

SetData() 공개 메소드

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.
public SetData ( int id, string data, int startPos ) : void
id int
data string
startPos int
리턴 void

SetData() 공개 메소드

public SetData ( string data ) : void
data string
리턴 void

SetData() 공개 메소드

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.
public SetData ( string data, int startPos ) : void
data string
startPos int
리턴 void

SetPattern() 공개 메소드

Change the pattern we're looking for
public SetPattern ( string pattern ) : void
pattern string
리턴 void

options() 공개 메소드

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.
public options ( ) : long
리턴 long