kexi

KexiFindDialog Class Reference

#include <kexifinddialog.h>

List of all members.


Detailed Description

A Kexi-specific "Find text" dialog.

Also used for as replace dialog.

Todo:
replace m_textToFind and m_textToReplace KComboBoxes with Kexi's db-aware comboboxes, so we ca adapt to datatype being searched, e.g. date, time and numbers

Definition at line 34 of file kexifinddialog.h.


Public Slots

void setLookInColumnList (const QStringList &columnNames, const QStringList &columnCaptions)
void setCurrentLookInColumnName (const QString &columnName)
void setReplaceMode (bool set)
void setObjectNameForCaption (const QString &name)
void setButtonsEnabled (bool enable)
void setMessage (const QString &message)
void updateMessage (bool found=true)

Signals

void findNext ()
void findPrevious ()
void replaceNext ()
void replaceAll ()

Public Member Functions

 KexiFindDialog (QWidget *parent)
virtual ~KexiFindDialog ()
void setActions (KAction *findnext, KAction *findprev, KAction *replace, KAction *replaceall)
virtual void show ()
KexiSearchAndReplaceViewInterface::Options options () const
QStringList lookInColumnNames () const
QStringList lookInColumnCaptions () const
QString currentLookInColumnName () const
QVariant valueToFind () const
QVariant valueToReplaceWith () const

Protected Slots

void slotCloseClicked ()

Protected Attributes

Private *const d

Constructor & Destructor Documentation

KexiFindDialog::KexiFindDialog ( QWidget *  parent  ) 

Creates a new find dialog. Replace mode is off by default.

modal

Definition at line 78 of file kexifinddialog.cpp.


Member Function Documentation

void KexiFindDialog::setActions ( KAction *  findnext,
KAction *  findprev,
KAction *  replace,
KAction *  replaceall 
)

Sets actions that receive button clicks and shortcuts within the dialog. Should be called once.

Definition at line 112 of file kexifinddialog.cpp.

void KexiFindDialog::show (  )  [virtual]

Shows the dialog as a modal dialog.

Definition at line 254 of file kexifinddialog.cpp.

KexiSearchAndReplaceViewInterface::Options KexiFindDialog::options (  )  const

Todo:
should we have setOptions() too?

Definition at line 260 of file kexifinddialog.cpp.

QStringList KexiFindDialog::lookInColumnNames (  )  const

Returns:
a list of column names for 'look in column' combo box. Neither "(All fields)" nor "(Current field)" items are prepended.

Definition at line 126 of file kexifinddialog.cpp.

QStringList KexiFindDialog::lookInColumnCaptions (  )  const

Returns:
a list of column captions (i.e. visible values) for 'look in column' combo box. Neither "(All fields)" nor "(Current field)" items are prepended.

Definition at line 131 of file kexifinddialog.cpp.

QString KexiFindDialog::currentLookInColumnName (  )  const

Returns:
column name selected in "look in column" combo box. If "(All fields)" item is selected, empty string is returned. If "(Current field)" item is selected, "(field)" string is returned.

Definition at line 136 of file kexifinddialog.cpp.

QVariant KexiFindDialog::valueToFind (  )  const

Returns:
value that to be used for searching

Definition at line 146 of file kexifinddialog.cpp.

QVariant KexiFindDialog::valueToReplaceWith (  )  const

Returns:
value that to be used as a replacement

Definition at line 151 of file kexifinddialog.cpp.

void KexiFindDialog::setLookInColumnList ( const QStringList &  columnNames,
const QStringList &  columnCaptions 
) [slot]

Sets columnNames list and columnCaptions for 'look in column' combo box. columnCaptions are visible values, while columnNames are used for returning in currentLookInColumn(). "(All fields)" and "(Current field)" items are also prepended.

Definition at line 156 of file kexifinddialog.cpp.

void KexiFindDialog::setCurrentLookInColumnName ( const QString &  columnName  )  [slot]

Selects columnName to be selected 'look in column'. By default "(All fields)" item is selected. To select this item, pass empty string as columnName. To select "(Current field)" item, "(field)" string should be passed as columnName.

Definition at line 167 of file kexifinddialog.cpp.

void KexiFindDialog::setReplaceMode ( bool  set  )  [slot]

Sets or clears replace mode. For replace mode 'prompt or replace' option is visible.

Definition at line 186 of file kexifinddialog.cpp.

void KexiFindDialog::setObjectNameForCaption ( const QString &  name  )  [slot]

Sets object name for caption, so for example it will be set to i18n("Find \"Persons\"")).

Definition at line 210 of file kexifinddialog.cpp.

void KexiFindDialog::setButtonsEnabled ( bool  enable  )  [slot]

Enables of disables the find/replace/replace all buttons. This is used if for the current context the dialog could not be used. If enable is false, object name for caption is cleared using setObjectNameForCaption() too.

Definition at line 227 of file kexifinddialog.cpp.

void KexiFindDialog::setMessage ( const QString &  message  )  [slot]

Sets message at the bottom to message.

Definition at line 236 of file kexifinddialog.cpp.

void KexiFindDialog::updateMessage ( bool  found = true  )  [slot]

Updates message at the bottom; "The search item was not found" is set if found is true, else the message is cleared.

Todo:
add "Search again" hyperlink

Definition at line 241 of file kexifinddialog.cpp.

void KexiFindDialog::findNext (  )  [signal]

Emitted after clicking "Find next" button or pressing appropriate shortcut set by setActions().

void KexiFindDialog::findPrevious (  )  [signal]

Emitted after pressing appropriate shortcut set by setActions().

void KexiFindDialog::replaceNext (  )  [signal]

Emitted after clicking "Replace" button or pressing appropriate shortcut set by setActions().

void KexiFindDialog::replaceAll (  )  [signal]

Emitted after clicking "Replace All" button or pressing appropriate shortcut set by setActions().


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys