• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KUtils

KReplaceDialog Class Reference
[Main classes, Find and Replace classes]

A generic "replace" dialog. More...

#include <kreplacedialog.h>

Inheritance diagram for KReplaceDialog:

Inheritance graph
[legend]

List of all members.


Public Types

enum  Options { PromptOnReplace = 256, BackReference = 512 }

Public Member Functions

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

Protected Slots

virtual void showEvent (QShowEvent *)
void slotOk ()

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 59 of file kreplacedialog.h.


Member Enumeration Documentation

enum KReplaceDialog::Options

Options.

Enumerator:
PromptOnReplace  Should the user be prompted before the replace operation?
BackReference 

Reimplemented from KFindDialog.

Definition at line 69 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 45 of file kreplacedialog.cpp.

KReplaceDialog::~KReplaceDialog (  )  [virtual]

Destructor.

Definition at line 54 of file kreplacedialog.cpp.


Member Function Documentation

long KReplaceDialog::options (  )  const

Returns the state of the options.

Disabled options may be returned in an indeterminate state.

Returns:
The options.
See also:
setOptions, Options, KFindDialog::Options

Reimplemented from KFindDialog.

Definition at line 75 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.

Returns:
An extensible QWidget.

Definition at line 87 of file kreplacedialog.cpp.

QString KReplaceDialog::replacement (  )  const

Returns the replacement string.

Returns:
The replacement string.

Definition at line 98 of file kreplacedialog.cpp.

QStringList KReplaceDialog::replacementHistory (  )  const

Returns the list of history items.

Returns:
The replacement history.
See also:
setReplacementHistory

Definition at line 103 of file kreplacedialog.cpp.

void KReplaceDialog::setOptions ( long  options  ) 

Set the options which are enabled.

Parameters:
options The setting of the Options.
See also:
Options, KFindDialog::Options

Reimplemented from KFindDialog.

Definition at line 112 of file kreplacedialog.cpp.

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 119 of file kreplacedialog.cpp.

void KReplaceDialog::showEvent ( QShowEvent *  e  )  [protected, virtual, slot]

Reimplemented from KFindDialog.

Definition at line 59 of file kreplacedialog.cpp.

void KReplaceDialog::slotOk ( void   )  [protected, virtual, slot]

Reimplemented from KFindDialog.

Definition at line 127 of file kreplacedialog.cpp.


The documentation for this class was generated from the following files:
  • kreplacedialog.h
  • kreplacedialog.cpp

KUtils

Skip menu "KUtils"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal