org.kde.koala

Class KFindDialog

public class KFindDialog extends KDialogBase

Author: S.R.Haque

UNKNOWN: A generic "find" dialog. etail: 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. xample: To use the basic modal find dialog, and then run the search:

  KFindDialog dlg(....)
  if ( dlg.exec() != QDialog.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, SIGNAL("okClicked()"), this, 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(). @brief A generic "find" dialog.

Field Summary
static intCaseSensitive
static intFindBackwards
static intFindIncremental
static intFromCursor
static intMinimumUserOption
static intRegularExpression
static intSelectedText
static intWholeWordsOnly
Constructor Summary
protected KFindDialog(Class dummy)
KFindDialog(QWidget parent, String name, long options, String[] findStrings, boolean hasSelection)
Construct a modal find dialog
KFindDialog(QWidget parent, String name, long options, String[] findStrings)
KFindDialog(QWidget parent, String name, long options)
KFindDialog(QWidget parent, String name)
KFindDialog(QWidget parent)
KFindDialog()
KFindDialog(boolean modal, QWidget parent, String name, long options, String[] findStrings, boolean hasSelection)
Construct a non-modal find dialog
KFindDialog(boolean modal, QWidget parent, String name, long options, String[] findStrings)
KFindDialog(boolean modal, QWidget parent, String name, long options)
KFindDialog(boolean modal, QWidget parent, String name)
KFindDialog(boolean modal, QWidget parent)
KFindDialog(boolean modal)
Method Summary
StringclassName()
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
QWidgetfindExtension()
Returns an empty widget which the user may fill with additional UI elements as required.
ArrayListfindHistory()
Returns the list of history items.
booleanisDisposed()
Has the wrapped C++ instance been deleted?
QMetaObjectmetaObject()
longoptions()
Returns the state of the options.
Stringpattern()
Returns the pattern to find.
voidsetFindHistory(String[] history)
Provide the list of strings to be displayed as the history of find strings.
voidsetHasCursor(boolean hasCursor)
Hide/show the 'from cursor' option, depending on whether the application implements a cursor.
voidsetHasSelection(boolean hasSelection)
Enable/disable the 'search in selection' option, depending on whether there actually is a selection.
voidsetOptions(long options)
Set the options which are checked.
voidsetPattern(String pattern)
Sets the pattern to find
voidsetSupportsBackwardsFind(boolean supports)
Enable/disable the 'Find backwards' option, depending on whether the application supports it.
voidsetSupportsCaseSensitiveFind(boolean supports)
Enable/disable the 'Case sensitive' option, depending on whether the application supports it.
voidsetSupportsRegularExpressionFind(boolean supports)
Enable/disable the 'Regular expression' option, depending on whether the application supports it.
voidsetSupportsWholeWordsFind(boolean supports)
Enable/disable the 'Whole words only' option, depending on whether the application supports it.
voidshowEvent(QShowEvent arg1)
protected voidshowPatterns()
protected voidshowPlaceholders()
protected voidslotOk()
protected voidslotSelectedTextToggled(boolean arg1)
protected voidtextSearchChanged(String arg1)

Field Detail

CaseSensitive

public static final int CaseSensitive

FindBackwards

public static final int FindBackwards

FindIncremental

public static final int FindIncremental

FromCursor

public static final int FromCursor

MinimumUserOption

public static final int MinimumUserOption

RegularExpression

public static final int RegularExpression

SelectedText

public static final int SelectedText

WholeWordsOnly

public static final int WholeWordsOnly

Constructor Detail

KFindDialog

protected KFindDialog(Class dummy)

KFindDialog

public KFindDialog(QWidget parent, String name, long options, String[] findStrings, boolean hasSelection)
Construct a modal find dialog

Parameters: parent The parent object of this widget. name The name of this widget. options A bitfield of the Options to be checked. findStrings The find history, see findHistory() hasSelection Whether a selection exists

UNKNOWN: Construct a modal find dialog

KFindDialog

public KFindDialog(QWidget parent, String name, long options, String[] findStrings)

KFindDialog

public KFindDialog(QWidget parent, String name, long options)

KFindDialog

public KFindDialog(QWidget parent, String name)

KFindDialog

public KFindDialog(QWidget parent)

KFindDialog

public KFindDialog()

KFindDialog

public KFindDialog(boolean modal, QWidget parent, String name, long options, String[] findStrings, boolean hasSelection)
Construct a non-modal find dialog

Parameters: modal set to false to get a non-modal dialog parent The parent object of this widget. name The name of this widget. options A bitfield of the Options to be checked. findStrings The find history, see findHistory() hasSelection Whether a selection exists

UNKNOWN: Construct a non-modal find dialog

KFindDialog

public KFindDialog(boolean modal, QWidget parent, String name, long options, String[] findStrings)

KFindDialog

public KFindDialog(boolean modal, QWidget parent, String name, long options)

KFindDialog

public KFindDialog(boolean modal, QWidget parent, String name)

KFindDialog

public KFindDialog(boolean modal, QWidget parent)

KFindDialog

public KFindDialog(boolean modal)

Method Detail

className

public String className()

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

findExtension

public QWidget 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.

UNKNOWN: Returns an empty widget which the user may fill with additional UI elements as required.

findHistory

public ArrayList findHistory()
Returns the list of history items.

See Also: KFindDialog

UNKNOWN: Returns the list of history items.

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

metaObject

public QMetaObject metaObject()

options

public long options()
Returns the state of the options. Disabled options may be returned in an indeterminate state.

See Also: KFindDialog

UNKNOWN: Returns the state of the options.

pattern

public String pattern()
Returns the pattern to find.

UNKNOWN: Returns the pattern to find.

setFindHistory

public void setFindHistory(String[] 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: history The find history.

See Also: KFindDialog

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

setHasCursor

public void setHasCursor(boolean hasCursor)
Hide/show the 'from cursor' option, depending on whether the application implements a cursor.

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

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

setHasSelection

public void setHasSelection(boolean hasSelection)
Enable/disable the 'search in selection' option, depending on whether there actually is a selection.

Parameters: hasSelection true if a selection exists

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

setOptions

public void setOptions(long options)
Set the options which are checked.

Parameters: options The setting of the Options.

UNKNOWN: Set the options which are checked.

setPattern

public void setPattern(String pattern)
Sets the pattern to find

UNKNOWN: Sets the pattern to find

setSupportsBackwardsFind

public void setSupportsBackwardsFind(boolean supports)
Enable/disable the 'Find backwards' option, depending on whether the application supports it.

Parameters: supports true if the application supports backwards find This is assumed to be the case by default.

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

setSupportsCaseSensitiveFind

public void setSupportsCaseSensitiveFind(boolean supports)
Enable/disable the 'Case sensitive' option, depending on whether the application supports it.

Parameters: supports true if the application supports case sensitive find This is assumed to be the case by default.

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

setSupportsRegularExpressionFind

public void setSupportsRegularExpressionFind(boolean supports)
Enable/disable the 'Regular expression' option, depending on whether the application supports it.

Parameters: supports true if the application supports regular expression find This is assumed to be the case by default.

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

setSupportsWholeWordsFind

public void setSupportsWholeWordsFind(boolean supports)
Enable/disable the 'Whole words only' option, depending on whether the application supports it.

Parameters: supports true if the application supports whole words only find This is assumed to be the case by default.

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

showEvent

public void showEvent(QShowEvent arg1)

showPatterns

protected void showPatterns()

showPlaceholders

protected void showPlaceholders()

slotOk

protected void slotOk()

slotSelectedTextToggled

protected void slotSelectedTextToggled(boolean arg1)

textSearchChanged

protected void textSearchChanged(String arg1)