kutils Library API Documentation

KReplaceDialog Class Reference

A generic "replace" dialog. More...

#include <kreplacedialog.h>

Inheritance diagram for KReplaceDialog:

KFindDialog KDialogBase KDialog QDialog List of all members.

Public Types

enum  Options { PromptOnReplace = 256, BackReference = 512 }

Public Methods

 KReplaceDialog (QWidget *parent=0, const char *name=0, long options=0, const QStringList &findStrings=QStringList(), const QStringList &replaceStrings=QStringList(), bool hasSelection=true)
virtual ~KReplaceDialog ()
void setReplacementHistory (const QStringList &history)
QStringList replacementHistory () const
void setOptions (long options)
long options () const
QString replacement () const
QWidgetreplaceExtension ()

Protected Slots

void slotOk ()
virtual void showEvent (QShowEvent *)

Detailed Description

A generic "replace" dialog.

Author:
S.R.Haque <srhaque@iee.org>
Detail:

This widget inherits from KFindDialog 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 kreplacedialog.h.


Constructor & Destructor Documentation

KReplaceDialog::KReplaceDialog 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 QStringList to insert in the combo box of text to find
replaceStrings  A QStringList to insert in the combo box of text to replace with
hasSelection  Whether a selection exists

Definition at line 41 of file kreplacedialog.cpp.

References options(), and setOptions().

KReplaceDialog::~KReplaceDialog   [virtual]
 

Destructor.

Definition at line 50 of file kreplacedialog.cpp.


Member Function Documentation

void KReplaceDialog::setReplacementHistory const QStringList   history
 

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

strings might get truncated if it is too long.

Parameters:
history  The replacement history.
See also:
replacementHistory

Definition at line 111 of file kreplacedialog.cpp.

QStringList KReplaceDialog::replacementHistory   const
 

Returns the list of history items.

See also:
setReplacementHistory

Definition at line 99 of file kreplacedialog.cpp.

void KReplaceDialog::setOptions long    options
 

Set the options which are enabled.

Parameters:
options  The setting of the Options.

Reimplemented from KFindDialog.

Definition at line 104 of file kreplacedialog.cpp.

References options(), and KFindDialog::setOptions().

Referenced by KReplaceDialog().

long KReplaceDialog::options   const
 

Returns the state of the options.

Disabled options may be returned in an indeterminate state.

See also:
setOptions

Reimplemented from KFindDialog.

Definition at line 71 of file kreplacedialog.cpp.

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

Referenced by KReplaceDialog(), options(), and setOptions().

QString KReplaceDialog::replacement   const
 

Returns the replacement string.

Definition at line 94 of file kreplacedialog.cpp.

QWidget * KReplaceDialog::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 83 of file kreplacedialog.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kutils Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun May 16 22:04:35 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003