kexi

#include <kexifinddialog.h>

Public Slots

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

Signals

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

Public Member Functions

 KexiFindDialog (TQWidget *parent)
void setActions (TDEAction *findnext, TDEAction *findprev, TDEAction *replace, TDEAction *replaceall)
virtual void show ()
KexiSearchAndReplaceViewInterface::Options options () const
TQStringList lookInColumnNames () const
TQStringList lookInColumnCaptions () const
TQString currentLookInColumnName () const
TQVariant valueToFind () const
TQVariant valueToReplaceWith () const

Protected Slots

void slotCloseClicked ()

Protected Attributes

Private *const d

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.

Constructor & Destructor Documentation

◆ KexiFindDialog()

KexiFindDialog::KexiFindDialog ( TQWidget * parent)

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

Definition at line 78 of file kexifinddialog.cpp.

◆ ~KexiFindDialog()

KexiFindDialog::~KexiFindDialog ( )
virtual

Definition at line 107 of file kexifinddialog.cpp.

Member Function Documentation

◆ currentLookInColumnName()

TQString 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.

◆ findNext

void KexiFindDialog::findNext ( )
signal

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

◆ findPrevious

void KexiFindDialog::findPrevious ( )
signal

Emitted after pressing appropriate shortcut set by setActions().

◆ lookInColumnCaptions()

TQStringList 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.

◆ lookInColumnNames()

TQStringList 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.

◆ options()

KexiSearchAndReplaceViewInterface::Options KexiFindDialog::options ( ) const
Returns
current find and replace options set within the dialog
Todo
should we have setOptions() too?

Definition at line 260 of file kexifinddialog.cpp.

◆ replaceAll

void KexiFindDialog::replaceAll ( )
signal

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

◆ replaceNext

void KexiFindDialog::replaceNext ( )
signal

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

◆ setActions()

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

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

Definition at line 112 of file kexifinddialog.cpp.

◆ setButtonsEnabled

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.

◆ setCurrentLookInColumnName

void KexiFindDialog::setCurrentLookInColumnName ( const TQString & 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.

◆ setLookInColumnList

void KexiFindDialog::setLookInColumnList ( const TQStringList & columnNames,
const TQStringList & 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.

◆ setMessage

void KexiFindDialog::setMessage ( const TQString & message)
slot

Sets message at the bottom to message.

Definition at line 236 of file kexifinddialog.cpp.

◆ setObjectNameForCaption

void KexiFindDialog::setObjectNameForCaption ( const TQString & 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.

◆ setReplaceMode

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.

◆ show()

void KexiFindDialog::show ( )
virtual

Shows the dialog as a modal dialog.

Definition at line 254 of file kexifinddialog.cpp.

◆ slotCloseClicked

void KexiFindDialog::slotCloseClicked ( )
protectedslot

Definition at line 249 of file kexifinddialog.cpp.

◆ updateMessage

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.

◆ valueToFind()

TQVariant KexiFindDialog::valueToFind ( ) const
Returns
value that to be used for searching

Definition at line 146 of file kexifinddialog.cpp.

◆ valueToReplaceWith()

TQVariant KexiFindDialog::valueToReplaceWith ( ) const
Returns
value that to be used as a replacement

Definition at line 151 of file kexifinddialog.cpp.

Member Data Documentation

◆ d

Private* const KexiFindDialog::d
protected

Definition at line 128 of file kexifinddialog.h.


The documentation for this class was generated from the following files: