kreplace.cpp
63 KReplace::KReplace(const TQString &pattern, const TQString &replacement, long options, TQWidget *parent) :
70 KReplace::KReplace(const TQString &pattern, const TQString &replacement, long options, TQWidget *parent, TQWidget *dlg) :
107 KMessageBox::information(parentWidget(), i18n("1 replacement done.", "%n replacements done.", m_replacements ) );
180 int KReplace::replace(TQString &text, const TQString &pattern, const TQString &replacement, int index, long options, int *replacedLength)
196 int KReplace::replace(TQString &text, const TQRegExp &pattern, const TQString &replacement, int index, long options, int *replacedLength)
212 int KReplace::replace(TQString &text, const TQString &replacement, int index, long options, int length)
256 int replacedLength = KReplace::replace(m_text, m_replacement, m_index, m_options, m_matchedLength);
262 kdDebug() << k_funcinfo << "after replace() signal: m_index=" << m_index << " replacedLength=" << replacedLength << endl;
269 // when replacing the empty pattern, move on. See also kjs/regexp.cpp for how this should be done for regexps.
319 int ret = KMessageBox::questionYesNo( parentWidget(), message, TQString::null, i18n("Restart"), i18n("Stop") );
KDialogBase * replaceNextDialog(bool create=false)
Return (or create) the dialog that shows the "find next?" prompt.
Definition: kreplace.cpp:82
static int questionYesNo(TQWidget *parent, const TQString &text, const TQString &caption=TQString::null, const KGuiItem &buttonYes=KStdGuiItem::yes(), const KGuiItem &buttonNo=KStdGuiItem::no(), const TQString &dontAskAgainName=TQString::null, int options=Notify)
kdbgstream kdDebug(int area=0)
virtual void resetCounts()
Call this to reset the numMatches count (and the numReplacements count for a KReplace).
Definition: kfind.h:232
virtual bool validateMatch(const TQString &text, int index, int matchedlength)
Virtual method, which allows applications to add extra checks for validating a candidate match...
Definition: kfind.h:244
Interpret the pattern as a regular expression.
Definition: kfinddialog.h:94
void highlight(const TQString &text, int matchingIndex, int matchedLength)
Connect to this signal to implement highlighting of found text during the find operation.
virtual bool shouldRestart(bool forceAsking=false, bool showNumMatches=true) const
Returns true if we should restart the search from scratch.
Definition: kreplace.cpp:284
static void information(TQWidget *parent, const TQString &text, const TQString &caption=TQString::null, const TQString &dontShowAgainName=TQString::null, int options=Notify)
virtual void displayFinalDialog() const
Displays the final dialog telling the user how many replacements were made.
Definition: kreplace.cpp:102
Should the user be prompted before the replace operation?
Definition: kreplacedialog.h:71
KReplace(const TQString &pattern, const TQString &replacement, long options, TQWidget *parent=0)
Only use this constructor if you don't use KFindDialog, or if you use it as a modal dialog...
Definition: kreplace.cpp:63
kndbgstream & endl(kndbgstream &s)
virtual void resetCounts()
Call this to reset the numMatches & numReplacements counts.
Definition: kreplace.cpp:278