C# 클래스 Kimono.KReplace

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

공개 메소드들

메소드 설명
CloseReplaceNextDialog ( ) : void Close the "replace next?" dialog. The application should do this when the last match was hit. If the application deletes the KReplace, then "find previous" won't be possible anymore.
Dispose ( ) : void
KReplace ( string pattern, string replacement, long options ) : System
KReplace ( string pattern, string replacement, long options, QWidget parent ) : System Only use this constructor if you don't use KFindDialog, or if you use it as a modal dialog.
KReplace ( string pattern, string replacement, long options, QWidget parent, QWidget replaceDialog ) : System This is the recommended constructor if you also use KReplaceDialog (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, KReplace will notice if the find dialog is closed.
NumReplacements ( ) : int Return the number of replacements made (i.e. the number of times the replace signal was emitted). Can be used in a dialog box to tell the user how many replacements were made. The final dialog does so already, unless you used setDisplayFinalDialog(false).
Replace ( ) : KFind.Result Walk the text fragment (e.g. kwrite line, kspread cell) looking for matches. For each match, if prompt-on-replace is specified, emits the highlight() signal and displays the prompt-for-replace dialog before doing the replace.
Replace ( StringBuilder text, Qyoto.QRegExp pattern, string replacement, int index, long options, int &replacedLength ) : int
Replace ( StringBuilder text, string pattern, string replacement, int index, long options, int &replacedLength ) : int Search the given string, replaces with the given replacement string, and returns whether a match was found. If one is, the replacement string length 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="replacement" The replacement string to insert into the text. name="index" The starting index into the string. name="options" The options to use. name="replacedLength" Output parameter, contains the length of the replaced string. Not always the same as replacement.length(), when backreferences are used.
ReplaceNextDialog ( ) : Kimono.KDialog
ReplaceNextDialog ( 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.

보호된 메소드들

메소드 설명
CreateProxy ( ) : void
KReplace ( Type dummy ) : System

비공개 메소드들

메소드 설명
DisplayFinalDialog ( ) : void
KReplace ( ) : System
ResetCounts ( ) : void
ShouldRestart ( ) : bool
ShouldRestart ( bool forceAsking ) : bool
ShouldRestart ( bool forceAsking, bool showNumMatches ) : bool

메소드 상세

CloseReplaceNextDialog() 공개 메소드

Close the "replace next?" dialog. The application should do this when the last match was hit. If the application deletes the KReplace, then "find previous" won't be possible anymore.
public CloseReplaceNextDialog ( ) : void
리턴 void

CreateProxy() 보호된 메소드

protected CreateProxy ( ) : void
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

KReplace() 보호된 메소드

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

KReplace() 공개 메소드

public KReplace ( string pattern, string replacement, long options ) : System
pattern string
replacement string
options long
리턴 System

KReplace() 공개 메소드

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

KReplace() 공개 메소드

This is the recommended constructor if you also use KReplaceDialog (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, KReplace will notice if the find dialog is closed.
public KReplace ( string pattern, string replacement, long options, QWidget parent, QWidget replaceDialog ) : System
pattern string
replacement string
options long
parent Qyoto.QWidget
replaceDialog Qyoto.QWidget
리턴 System

NumReplacements() 공개 메소드

Return the number of replacements made (i.e. the number of times the replace signal was emitted). Can be used in a dialog box to tell the user how many replacements were made. The final dialog does so already, unless you used setDisplayFinalDialog(false).
public NumReplacements ( ) : int
리턴 int

Replace() 공개 메소드

Walk the text fragment (e.g. kwrite line, kspread cell) looking for matches. For each match, if prompt-on-replace is specified, emits the highlight() signal and displays the prompt-for-replace dialog before doing the replace.
public Replace ( ) : KFind.Result
리턴 KFind.Result

Replace() 공개 정적인 메소드

public static Replace ( StringBuilder text, Qyoto.QRegExp pattern, string replacement, int index, long options, int &replacedLength ) : int
text StringBuilder
pattern Qyoto.QRegExp
replacement string
index int
options long
replacedLength int
리턴 int

Replace() 공개 정적인 메소드

Search the given string, replaces with the given replacement string, and returns whether a match was found. If one is, the replacement string length 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="replacement" The replacement string to insert into the text. name="index" The starting index into the string. name="options" The options to use. name="replacedLength" Output parameter, contains the length of the replaced string. Not always the same as replacement.length(), when backreferences are used.
public static Replace ( StringBuilder text, string pattern, string replacement, int index, long options, int &replacedLength ) : int
text StringBuilder
pattern string
replacement string
index int
options long
replacedLength int
리턴 int

ReplaceNextDialog() 공개 메소드

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

ReplaceNextDialog() 공개 메소드

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