• 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 Types inherited from KDialogBase
enum  ButtonCode
 
enum  DialogType
 

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 ()
 
- Public Member Functions inherited from KDialogBase
 KDialogBase (TQWidget *parent=0, const char *name=0, bool modal=true, const TQString &caption=TQString::null, int buttonMask=Ok|Apply|Cancel, ButtonCode defaultButton=Ok, bool separator=false, const KGuiItem &user1=KGuiItem(), const KGuiItem &user2=KGuiItem(), const KGuiItem &user3=KGuiItem())
 
 KDialogBase (int dialogFace, const TQString &caption, int buttonMask, ButtonCode defaultButton, TQWidget *parent=0, const char *name=0, bool modal=true, bool separator=false, const KGuiItem &user1=KGuiItem(), const KGuiItem &user2=KGuiItem(), const KGuiItem &user3=KGuiItem())
 
 KDialogBase (KDialogBase::DialogType dialogFace, WFlags f, TQWidget *parent=0, const char *name=0, bool modal=true, const TQString &caption=TQString::null, int buttonMask=Ok|Apply|Cancel, ButtonCode defaultButton=Ok, bool separator=false, const KGuiItem &user1=KGuiItem(), const KGuiItem &user2=KGuiItem(), const KGuiItem &user3=KGuiItem())
 
 KDialogBase (const TQString &caption, int buttonMask=Yes|No|Cancel, ButtonCode defaultButton=Yes, ButtonCode escapeButton=Cancel, TQWidget *parent=0, const char *name=0, bool modal=true, bool separator=false, const KGuiItem &yes=KStdGuiItem::yes(), const KGuiItem &no=KStdGuiItem::no(), const KGuiItem &cancel=KStdGuiItem::cancel())
 
void setButtonBoxOrientation (int orientation)
 
void setEscapeButton (ButtonCode id)
 
virtual void adjustSize ()
 
TQFrame * plainPage ()
 
TQFrame * addPage (const TQString &itemName, const TQString &header=TQString::null, const TQPixmap &pixmap=TQPixmap())
 
TQFrame * addPage (const TQStringList &items, const TQString &header=TQString::null, const TQPixmap &pixmap=TQPixmap())
 
TQVBox * addVBoxPage (const TQString &itemName, const TQString &header=TQString::null, const TQPixmap &pixmap=TQPixmap())
 
TQVBox * addVBoxPage (const TQStringList &items, const TQString &header=TQString::null, const TQPixmap &pixmap=TQPixmap())
 
TQHBox * addHBoxPage (const TQString &itemName, const TQString &header=TQString::null, const TQPixmap &pixmap=TQPixmap())
 
TQHBox * addHBoxPage (const TQStringList &items, const TQString &header=TQString::null, const TQPixmap &pixmap=TQPixmap())
 
TQGrid * addGridPage (int n, Orientation dir, const TQString &itemName, const TQString &header=TQString::null, const TQPixmap &pixmap=TQPixmap())
 
TQGrid * addGridPage (int n, Orientation dir, const TQStringList &items, const TQString &header=TQString::null, const TQPixmap &pixmap=TQPixmap())
 
void setFolderIcon (const TQStringList &path, const TQPixmap &pixmap)
 
TQFrame * makeMainWidget ()
 
TQVBox * makeVBoxMainWidget ()
 
TQHBox * makeHBoxMainWidget ()
 
TQGrid * makeGridMainWidget (int n, Orientation dir)
 
void enableButtonSeparator (bool state)
 
void showButton (ButtonCode id, bool state)
 
void showButtonOK (bool state)
 
void showButtonApply (bool state)
 
void showButtonCancel (bool state)
 
bool showPage (int index)
 
int activePageIndex () const
 
int pageIndex (TQWidget *widget) const
 
void setMainWidget (TQWidget *widget)
 
TQWidget * mainWidget ()
 
void disableResize ()
 
void setInitialSize (const TQSize &s, bool noResize=false)
 
void incInitialSize (const TQSize &s, bool noResize=false)
 
TQSize configDialogSize (const TQString &groupName) const
 
TQSize configDialogSize (TDEConfig &config, const TQString &groupName) const
 
void saveDialogSize (const TQString &groupName, bool global=false)
 
void saveDialogSize (TDEConfig &config, const TQString &groupName, bool global=false) const
 
void setButtonOK (const KGuiItem &item=KStdGuiItem::ok())
 
void setButtonOKText (const TQString &text=TQString::null, const TQString &tooltip=TQString::null, const TQString &quickhelp=TQString::null) TDE_DEPRECATED
 
void setButtonApply (const KGuiItem &item=KStdGuiItem::apply())
 
void setButtonApplyText (const TQString &text=TQString::null, const TQString &tooltip=TQString::null, const TQString &quickhelp=TQString::null) TDE_DEPRECATED
 
void setButtonCancel (const KGuiItem &item=KStdGuiItem::cancel())
 
void setButtonCancelText (const TQString &text=TQString::null, const TQString &tooltip=TQString::null, const TQString &quickhelp=TQString::null) TDE_DEPRECATED
 
void setButtonText (ButtonCode id, const TQString &text)
 
void setButtonTip (ButtonCode id, const TQString &text)
 
void setButtonWhatsThis (ButtonCode id, const TQString &text)
 
void setButtonGuiItem (ButtonCode id, const KGuiItem &item)
 
void setTreeListAutoResize (bool state)
 
void setShowIconsInTreeList (bool state)
 
void setRootIsDecorated (bool state)
 
void unfoldTreeList (bool persist=false)
 
void addWidgetBelowList (TQWidget *widget)
 
void addButtonBelowList (const TQString &text, TQObject *recv, const char *slot)
 
void addButtonBelowList (const KGuiItem &guiitem, TQObject *recv, const char *slot)
 
void setIconListAllVisible (bool state)
 
void showTile (bool state)
 
void getBorderWidths (int &ulx, int &uly, int &lrx, int &lry) const TDE_DEPRECATED
 
TQRect getContentsRect () const TDE_DEPRECATED
 
TQSize calculateSize (int w, int h) const
 
TQString helpLinkText () const
 
TQPushButton * actionButton (ButtonCode id)
 
- Public Member Functions inherited from KDialog
 KDialog (TQWidget *parent=0, const char *name=0, bool modal=false, WFlags f=0)
 

Protected Slots

void slotOk ()
 
void slotSelectedTextToggled (bool)
 
void showPatterns ()
 
void showPlaceholders ()
 
void textSearchChanged (const TQString &)
 
void slotRegexCheckBoxToggled (bool checked)
 
void slotPlaceholdersCheckBoxToggled (bool checked)
 
- Protected Slots inherited from KDialogBase
virtual void slotHelp ()
 
virtual void slotDefault ()
 
virtual void slotDetails ()
 
virtual void slotUser3 ()
 
virtual void slotUser2 ()
 
virtual void slotUser1 ()
 
virtual void slotOk ()
 
virtual void slotApply ()
 
virtual void slotTry ()
 
virtual void slotYes ()
 
virtual void slotNo ()
 
virtual void slotCancel ()
 
virtual void slotClose ()
 
virtual void applyPressed ()
 
void updateGeometry ()
 
void slotDelayedDestruct ()
 

Protected Member Functions

virtual void showEvent (TQShowEvent *)
 
- Protected Member Functions inherited from KDialogBase
virtual void keyPressEvent (TQKeyEvent *e)
 
virtual void hideEvent (TQHideEvent *)
 
virtual void closeEvent (TQCloseEvent *e)
 
virtual void keyPressEvent (TQKeyEvent *)
 

Friends

class KReplaceDialog
 

Additional Inherited Members

- Public Slots inherited from KDialogBase
void enableButton (ButtonCode id, bool state)
 
void enableButtonOK (bool state)
 
void enableButtonApply (bool state)
 
void enableButtonCancel (bool state)
 
void enableLinkedHelp (bool state)
 
void delayedDestruct ()
 
void setHelpLinkText (const TQString &text)
 
void setHelp (const TQString &anchor, const TQString &appname=TQString::null)
 
void helpClickedSlot (const TQString &)
 
void setDetails (bool showDetails)
 
void setDetailsWidget (TQWidget *detailsWidget)
 
void updateBackground ()
 
void cancel ()
 
- Public Slots inherited from KDialog
virtual void polish ()
 
virtual void setCaption (const TQString &caption)
 
virtual void setPlainCaption (const TQString &caption)
 
- Signals inherited from KDialogBase
void helpClicked ()
 
void defaultClicked ()
 
void user3Clicked ()
 
void user2Clicked ()
 
void user1Clicked ()
 
void applyClicked ()
 
void tryClicked ()
 
void okClicked ()
 
void yesClicked ()
 
void noClicked ()
 
void cancelClicked ()
 
void closeClicked ()
 
void apply ()
 
void backgroundChanged ()
 
void hidden ()
 
void finished ()
 
void aboutToShowDetails ()
 
void aboutToShowPage (TQWidget *page)
 
- Signals inherited from KDialog
void layoutHintChanged ()
 
- Static Public Member Functions inherited from KDialogBase
static bool haveBackgroundTile ()
 
static const TQPixmap * backgroundTile ()
 
static const TQPixmap * getBackgroundTile () TDE_DEPRECATED
 
static void setBackgroundTile (const TQPixmap *pix)
 
- Static Public Member Functions inherited from KDialog
static int marginHint ()
 
static int spacingHint ()
 
static void resizeLayout (TQWidget *widget, int margin, int spacing)
 
static void resizeLayout (TQLayoutItem *lay, int margin, int spacing)
 
static void centerOnScreen (TQWidget *widget, int screen=-1)
 
static bool avoidArea (TQWidget *widget, const TQRect &area, int screen=-1)
 
- Public Attributes inherited from KDialogBase
 Help
 
 Default
 
 Ok
 
 Apply
 
 Try
 
 Cancel
 
 Close
 
 User1
 
 User2
 
 User3
 
 No
 
 Yes
 
 Details
 
 Filler
 
 Stretch
 
 NoDefault
 

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
KFindDialog
A generic "find" dialog.
Definition: kfinddialog.h:76

To create a non-modal find dialog:

if ( m_findDia )
KWin::setActiveWindow( m_findDia->winId() );
else
{
m_findDia = new KFindDialog(false,...);
connect( m_findDia, TQ_SIGNAL(okClicked()), this, TQ_SLOT(findTextNext()) );
}
KDialogBase::okClicked
void okClicked()
KFindDialog::KFindDialog
KFindDialog(TQWidget *parent=0, const char *name=0, long options=0, const TQStringList &findStrings=TQStringList(), bool hasSelection=false)
Construct a modal find dialog.
Definition: kfinddialog.cpp:54
KWin::setActiveWindow
static void setActiveWindow(WId win) TDE_DEPRECATED

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.

Member Enumeration Documentation

◆ Options

enum KFindDialog::Options

Options for the search.

Enumerator
WholeWordsOnly 

Match whole words only.

FromCursor 

Start from current cursor position.

SelectedText 

Only search selected area.

CaseSensitive 

Consider case when matching.

FindBackwards 

Go backwards.

RegularExpression 

Interpret the pattern as a regular expression.

FindIncremental 

Find incremental.

MinimumUserOption 

The first flag which can be used by extensions.

Definition at line 87 of file kfinddialog.h.

Constructor & Destructor Documentation

◆ KFindDialog() [1/2]

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() [2/2]

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::~KFindDialog ( )
virtual

Destructor.

Definition at line 85 of file kfinddialog.cpp.

Member Function Documentation

◆ findExtension()

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.

◆ findHistory()

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.

◆ options()

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.

◆ pattern()

TQString KFindDialog::pattern ( ) const

Returns the pattern to find.

Returns
The search text.

Definition at line 337 of file kfinddialog.cpp.

◆ setFindHistory()

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.

◆ setHasCursor()

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.

◆ setHasSelection()

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.

◆ setOptions()

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.

◆ setPattern()

void KFindDialog::setPattern ( const TQString &  pattern)

Sets the pattern to find.

Parameters
patternThe new search pattern.

Definition at line 342 of file kfinddialog.cpp.

◆ setSupportsBackwardsFind()

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.

◆ setSupportsCaseSensitiveFind()

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.

◆ setSupportsRegularExpressionFind()

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.

◆ setSupportsWholeWordsFind()

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.

◆ showEvent()

void KFindDialog::showEvent ( TQShowEvent *  e)
protectedvirtual

Definition at line 300 of file kfinddialog.cpp.

◆ showPatterns

void KFindDialog::showPatterns ( )
protectedslot

Definition at line 438 of file kfinddialog.cpp.

◆ showPlaceholders

void KFindDialog::showPlaceholders ( )
protectedslot

Definition at line 505 of file kfinddialog.cpp.

◆ slotOk

void KFindDialog::slotOk ( void  )
protectedslot

Definition at line 534 of file kfinddialog.cpp.

◆ slotPlaceholdersCheckBoxToggled

void KFindDialog::slotPlaceholdersCheckBoxToggled ( bool  checked)
protectedslot

Definition at line 295 of file kfinddialog.cpp.

◆ slotRegexCheckBoxToggled

void KFindDialog::slotRegexCheckBoxToggled ( bool  checked)
protectedslot

Definition at line 288 of file kfinddialog.cpp.

◆ slotSelectedTextToggled

void KFindDialog::slotSelectedTextToggled ( bool  selec)
protectedslot

Definition at line 374 of file kfinddialog.cpp.

◆ textSearchChanged

void KFindDialog::textSearchChanged ( const TQString &  text)
protectedslot

Definition at line 283 of file kfinddialog.cpp.

Friends And Related Function Documentation

◆ KReplaceDialog

friend class KReplaceDialog
friend

Definition at line 289 of file kfinddialog.h.


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
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeutils by doxygen 1.9.4
This website is maintained by Timothy Pearson.