lib Library API Documentation

KoFindReplace Class Reference

This class implements the 'find' functionality ( the "search next, prompt" loop ) and the 'replace' functionality. More...

#include <koSearchDia.h>

Inheritance diagram for KoFindReplace:

QObject List of all members.

Public Member Functions

 KoFindReplace (QWidget *parent, KoSearchDia *dialog, const QValueList< KoTextObject * > &lstObject, KoTextView *textView)
 KoFindReplace (QWidget *parent, KoReplaceDia *dialog, const QValueList< KoTextObject * > &lstObject, KoTextView *textView)
KoTextParag * currentParag ()
bool isReplace () const
bool shouldRestart ()
bool findNext ()
bool findPrevious ()
void setActiveWindow ()
void emitUndoRedo ()
virtual void emitNewCommand (KCommand *)=0
virtual void highlightPortion (KoTextParag *parag, int index, int length, KoTextDocument *textdoc, KDialogBase *dialog)=0
bool validateMatch (const QString &text, int index, int matchedlength)

Protected Slots

void slotFindNext ()
void optionsChanged ()
void dialogClosed ()
void highlight (const QString &text, int matchingIndex, int matchingLength)
void replace (const QString &text, int replacementIndex, int replacedLength, int searchLength)
void slotCurrentParagraphModified (int, int, int)

Protected Member Functions

void replaceWithAttribut (KoTextCursor *cursor, int index)
KMacroCommand * macroCommand ()
long options () const
void setOptions (long opt)
void removeHighlight ()
bool needData () const
void setData (const QString &data, int startPos=-1)

Detailed Description

This class implements the 'find' functionality ( the "search next, prompt" loop ) and the 'replace' functionality.

Same class, to allow centralizing the findNext() code.

Definition at line 201 of file koSearchDia.h.


Member Function Documentation

bool KoFindReplace::findNext  ) 
 

Look for the next match.

Returns false if we're finished.

Definition at line 242 of file koSearchDia.cc.

References KoTextIterator::atEnd(), KoTextIterator::currentTextAndIndex(), emitUndoRedo(), KoTextIterator::options(), KoTextIterator::restart(), and KoTextIterator::setOptions().

Referenced by findPrevious().

bool KoFindReplace::findPrevious  ) 
 

Look for the previous match.

Returns false if we're finished.

Definition at line 302 of file koSearchDia.cc.

References findNext().

void KoFindReplace::setActiveWindow  ) 
 

Bring to front (e.g.

when menuitem called twice)

Definition at line 481 of file koSearchDia.cc.

void KoFindReplace::emitUndoRedo  ) 
 

Emit undo/redo command for the last replacements made.

Definition at line 231 of file koSearchDia.cc.

Referenced by findNext().

virtual void KoFindReplace::highlightPortion KoTextParag *  parag,
int  index,
int  length,
KoTextDocument *  textdoc,
KDialogBase *  dialog
[pure virtual]
 

Highlight a match.

bool KoFindReplace::validateMatch const QString text,
int  index,
int  matchedlength
 

For KoTextFind and KoTextReplace.

Definition at line 821 of file koSearchDia.cc.

References KoTextFormat::attributeFont(), KoTextFormat::color(), KoTextFormat::font(), QFont::italic(), KoTextFormat::language(), QFont::pointSize(), KoTextFormat::shadowDistanceX(), KoTextFormat::shadowDistanceY(), KoTextFormat::strikeOutType(), KoTextFormat::textBackgroundColor(), KoTextFormat::underlineType(), validateMatch(), KoTextFormat::vAlign(), and KoTextFormat::wordByWord().

Referenced by validateMatch().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for lib Library Version 1.3.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Sep 24 18:22:31 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003