• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeutils
 

tdeutils

Public Types | Public Member Functions | Protected Slots | Protected Member Functions | Friends | List of all members
KFindDialog Class Reference
Main classes | Find and Replace classes

#include <kfinddialog.h>

Inheritance diagram for KFindDialog:
KDialogBase KDialog KReplaceDialog

Public Types

enum  Options {
  WholeWordsOnly = 1, FromCursor = 2, SelectedText = 4, CaseSensitive = 8,
  FindBackwards = 16, RegularExpression = 32, FindIncremental = 64, MinimumUserOption = 65536
}
 

Public Member Functions

 KFindDialog (TQWidget *parent=0, const char *name=0, long options=0, const TQStringList &findStrings=TQStringList(), bool hasSelection=false)
 
 KFindDialog (bool modal, TQWidget *parent=0, const char *name=0, long options=0, const TQStringList &findStrings=TQStringList(), bool hasSelection=false)
 
virtual ~KFindDialog ()
 
void setFindHistory (const TQStringList &history)
 
TQStringList findHistory () const
 
void setHasSelection (bool hasSelection)
 
void setHasCursor (bool hasCursor)
 
void setSupportsBackwardsFind (bool supports)
 
void setSupportsCaseSensitiveFind (bool supports)
 
void setSupportsWholeWordsFind (bool supports)
 
void setSupportsRegularExpressionFind (bool supports)
 
void setOptions (long options)
 
long options () const
 
TQString pattern () const
 
void setPattern (const TQString &pattern)
 
TQWidget * findExtension ()
 

Protected Slots

void slotOk ()
 
void slotSelectedTextToggled (bool)
 
void showPatterns ()
 
void showPlaceholders ()
 
void textSearchChanged (const TQString &)
 
void slotRegexCheckBoxToggled (bool checked)
 
void slotPlaceholdersCheckBoxToggled (bool checked)
 

Protected Member Functions

virtual void showEvent (TQShowEvent *)
 
- Protected Member Functions inherited from KDialog
virtual void keyPressEvent (TQKeyEvent *)
 

Friends

class KReplaceDialog
 

Detailed Description

A generic "find" dialog.

Author
S.R.Haque srhaq.nosp@m.ue@i.nosp@m.ee.or.nosp@m.g

Detail:

This widget inherits from KDialogBase and implements the following additional functionalities: a find string object and an area for a user-defined widget to extend the dialog.

Example:

To use the basic modal find dialog, and then run the search:

KFindDialog dlg(....)
if ( dlg.exec() != TQDialog::Accepted )
return;
// proceed with KFind from here

To create a non-modal find dialog:

if ( m_findDia )
KWin::setActiveWindow( m_findDia->winId() );
else
{
m_findDia = new KFindDialog(false,...);
connect( m_findDia, TQT_SIGNAL(okClicked()), this, TQT_SLOT(findTextNext()) );
}

Don't forget to delete and reset m_findDia when closed. (But do NOT delete your KFind object at that point, it's needed for "Find Next")

To use your own extensions: see findExtension().

Definition at line 74 of file kfinddialog.h.

Constructor & Destructor Documentation

KFindDialog::KFindDialog ( TQWidget *  parent = 0,
const char *  name = 0,
long  options = 0,
const TQStringList &  findStrings = TQStringList(),
bool  hasSelection = false 
)

Construct a modal find dialog.

Parameters
parentThe parent object of this widget.
nameThe name of this widget.
optionsA bitfield of the Options to be checked.
findStringsThe find history, see findHistory()
hasSelectionWhether a selection exists

Definition at line 54 of file kfinddialog.cpp.

KFindDialog::KFindDialog ( bool  modal,
TQWidget *  parent = 0,
const char *  name = 0,
long  options = 0,
const TQStringList &  findStrings = TQStringList(),
bool  hasSelection = false 
)

Construct a non-modal find dialog.

Parameters
modalset to false to get a non-modal dialog
parentThe parent object of this widget.
nameThe name of this widget.
optionsA bitfield of the Options to be checked.
findStringsThe find history, see findHistory()
hasSelectionWhether a selection exists

Definition at line 65 of file kfinddialog.cpp.

KFindDialog::~KFindDialog ( )
virtual

Destructor.

Definition at line 85 of file kfinddialog.cpp.

Member Function Documentation

TQWidget * KFindDialog::findExtension ( )

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 below the regular expression support widgets for the pattern string.

Returns
An extensible TQWidget.

Definition at line 90 of file kfinddialog.cpp.

TQStringList KFindDialog::findHistory ( ) const

Returns the list of history items.

Returns
The find history.
See also
setFindHistory

Definition at line 101 of file kfinddialog.cpp.

long KFindDialog::options ( ) const

Returns the state of the options.

Disabled options may be returned in an indeterminate state.

Returns
The options.
See also
Options, setOptions

Definition at line 318 of file kfinddialog.cpp.

TQString KFindDialog::pattern ( ) const

Returns the pattern to find.

Returns
The search text.

Definition at line 337 of file kfinddialog.cpp.

void KFindDialog::setFindHistory ( const TQStringList &  history)

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

strings might get truncated if it is too long.

Parameters
historyThe find history.
See also
findHistory

Definition at line 350 of file kfinddialog.cpp.

void KFindDialog::setHasCursor ( bool  hasCursor)

Hide/show the 'from cursor' option, depending on whether the application implements a cursor.

Parameters
hasCursortrue if the application features a cursor This is assumed to be the case by default.

Definition at line 382 of file kfinddialog.cpp.

void KFindDialog::setHasSelection ( bool  hasSelection)

Enable/disable the 'search in selection' option, depending on whether there actually is a selection.

Parameters
hasSelectiontrue if a selection exists

Definition at line 362 of file kfinddialog.cpp.

void KFindDialog::setOptions ( long  options)

Set the options which are checked.

Parameters
optionsThe setting of the Options.
See also
Options

Definition at line 426 of file kfinddialog.cpp.

void KFindDialog::setPattern ( const TQString &  pattern)

Sets the pattern to find.

Parameters
patternThe new search pattern.

Definition at line 342 of file kfinddialog.cpp.

void KFindDialog::setSupportsBackwardsFind ( bool  supports)

Enable/disable the 'Find backwards' option, depending on whether the application supports it.

Parameters
supportstrue if the application supports backwards find This is assumed to be the case by default.
Since
3.4

Definition at line 390 of file kfinddialog.cpp.

void KFindDialog::setSupportsCaseSensitiveFind ( bool  supports)

Enable/disable the 'Case sensitive' option, depending on whether the application supports it.

Parameters
supportstrue if the application supports case sensitive find This is assumed to be the case by default.
Since
3.4

Definition at line 399 of file kfinddialog.cpp.

void KFindDialog::setSupportsRegularExpressionFind ( bool  supports)

Enable/disable the 'Regular expression' option, depending on whether the application supports it.

Parameters
supportstrue if the application supports regular expression find This is assumed to be the case by default.
Since
3.4

Definition at line 417 of file kfinddialog.cpp.

void KFindDialog::setSupportsWholeWordsFind ( bool  supports)

Enable/disable the 'Whole words only' option, depending on whether the application supports it.

Parameters
supportstrue if the application supports whole words only find This is assumed to be the case by default.
Since
3.4

Definition at line 408 of file kfinddialog.cpp.


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

tdeutils

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

tdeutils

Skip menu "tdeutils"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeutils by doxygen 1.8.8
This website is maintained by Timothy Pearson.