KDevelop API Documentation

KoReplaceDialog Class Reference

A generic "replace" widget. More...

#include <koReplace.h>

Inheritance diagram for KoReplaceDialog:

Inheritance graph
[legend]
Collaboration diagram for KoReplaceDialog:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Options { PromptOnReplace = 256, BackReference = 512 }

Public Member Functions

 KoReplaceDialog (QWidget *parent=0, const char *name=0, long options=0, const QStringList &findStrings=QStringList(), const QStringList &replaceStrings=QStringList(), bool hasSelection=true)
 Construct a replace dialog.read-only or rather select-only combo box with a parent object and a name.
virtual ~KoReplaceDialog ()
 Destructor.
void setReplacementHistory (const QStringList &strings)
 Provide the list of strings to be displayed as the history of replacement strings.
QStringList replacementHistory () const
 Returns the list of history items.
void setOptions (long options)
 Set the options which are enabled.
long options () const
 Returns the state of the options.
QString replacement () const
 Returns the replacement string.
QWidgetreplaceExtension ()
 Returns an empty widget which the user may fill with additional UI elements as required.

Protected Slots

void slotOk ()

Private Attributes

KoReplaceDialogPrivate * d

Detailed Description

A generic "replace" widget.

Author:
S.R.Haque <srhaque@iee.org>
This widget inherits from KoFindDialog and implements the following additional functionalities: a replacement string object and an area for a user-defined widget to extend the dialog.

Example

To use the basic replace dialog:

 

To use your own extensions:

 

Definition at line 57 of file koReplace.h.


Member Enumeration Documentation

enum KoReplaceDialog::Options
 

Enumeration values:
PromptOnReplace 
BackReference 

Reimplemented from KoFindDialog.

Definition at line 66 of file koReplace.h.


Constructor & Destructor Documentation

KoReplaceDialog::KoReplaceDialog QWidget parent = 0,
const char *  name = 0,
long  options = 0,
const QStringList findStrings = QStringList(),
const QStringList replaceStrings = QStringList(),
bool  hasSelection = true
 

Construct a replace dialog.read-only or rather select-only combo box with a parent object and a name.

Parameters:
parent The parent object of this widget
name The name of this widget
options A bitfield of the Options to be enabled.
findStrings A list of strings to find.
replaceStrings A list of strings to replace.
hasSelection Whether a selection exists

Definition at line 31 of file koReplace.cpp.

References KoFindDialog::init(), setOptions(), and setReplacementHistory().

KoReplaceDialog::~KoReplaceDialog  )  [virtual]
 

Destructor.

Definition at line 39 of file koReplace.cpp.


Member Function Documentation

long KoReplaceDialog::options  )  const
 

Returns the state of the options.

Disabled options may be returned in an indeterminate state.

See also:
setOptions

Reimplemented from KoFindDialog.

Definition at line 48 of file koReplace.cpp.

References KoFindDialog::options(), and options().

Referenced by QEditorView::doReplace(), and options().

QWidget * KoReplaceDialog::replaceExtension  ) 
 

Returns an empty widget which the user may fill with additional UI elements as required.

The widget occupies the width of the dialog, and is positioned immediately the regular expression support widgets for the replacement string.

Definition at line 60 of file koReplace.cpp.

QString KoReplaceDialog::replacement  )  const
 

Returns the replacement string.

Definition at line 65 of file koReplace.cpp.

Referenced by QEditorView::doReplace(), QEditorView::replace(), and slotOk().

QStringList KoReplaceDialog::replacementHistory  )  const
 

Returns the list of history items.

See also:
setReplacementHistory

Definition at line 70 of file koReplace.cpp.

References KHistoryCombo::historyItems.

void KoReplaceDialog::setOptions long  options  ) 
 

Set the options which are enabled.

Parameters:
options The setting of the Options.

Reimplemented from KoFindDialog.

Definition at line 75 of file koReplace.cpp.

References BackReference, PromptOnReplace, and KoFindDialog::setOptions().

Referenced by KoReplaceDialog().

void KoReplaceDialog::setReplacementHistory const QStringList strings  ) 
 

Provide the list of strings to be displayed as the history of replacement strings.

strings might get truncated if it is too long.

See also:
replacementHistory

Definition at line 82 of file koReplace.cpp.

References KHistoryCombo::clearHistory(), and KHistoryCombo::setHistoryItems().

Referenced by KoReplaceDialog().

void KoReplaceDialog::slotOk  )  [protected, virtual, slot]
 

Reimplemented from KoFindDialog.

Definition at line 90 of file koReplace.cpp.

References KHistoryCombo::addToHistory(), replacement(), and KoFindDialog::slotOk().


Member Data Documentation

KoReplaceDialogPrivate* KoReplaceDialog::d [private]
 

Reimplemented from KoFindDialog.

Definition at line 145 of file koReplace.h.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:27:29 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003