org.kde.koala
public class KFindDialog extends KDialogBase
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 int | CaseSensitive |
static int | FindBackwards |
static int | FindIncremental |
static int | FromCursor |
static int | MinimumUserOption |
static int | RegularExpression |
static int | SelectedText |
static int | WholeWordsOnly |
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 | |
---|---|
String | className() |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
protected void | finalize() Deletes the wrapped C++ instance |
QWidget | findExtension()
Returns an empty widget which the user may fill with additional UI
elements as required. |
ArrayList | findHistory()
Returns the list of history items. |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
QMetaObject | metaObject() |
long | options()
Returns the state of the options. |
String | pattern()
Returns the pattern to find. |
void | setFindHistory(String[] history)
Provide the list of strings to be displayed as the history
of find strings. |
void | setHasCursor(boolean hasCursor)
Hide/show the 'from cursor' option, depending
on whether the application implements a cursor. |
void | setHasSelection(boolean hasSelection)
Enable/disable the 'search in selection' option, depending
on whether there actually is a selection. |
void | setOptions(long options)
Set the options which are checked. |
void | setPattern(String pattern)
Sets the pattern to find |
void | setSupportsBackwardsFind(boolean supports)
Enable/disable the 'Find backwards' option, depending
on whether the application supports it. |
void | setSupportsCaseSensitiveFind(boolean supports)
Enable/disable the 'Case sensitive' option, depending
on whether the application supports it. |
void | setSupportsRegularExpressionFind(boolean supports)
Enable/disable the 'Regular expression' option, depending
on whether the application supports it. |
void | setSupportsWholeWordsFind(boolean supports)
Enable/disable the 'Whole words only' option, depending
on whether the application supports it. |
void | showEvent(QShowEvent arg1) |
protected void | showPatterns() |
protected void | showPlaceholders() |
protected void | slotOk() |
protected void | slotSelectedTextToggled(boolean arg1) |
protected void | textSearchChanged(String arg1) |
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
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
UNKNOWN: Returns an empty widget which the user may fill with additional UI elements as required.
See Also: KFindDialog
UNKNOWN: Returns the list of history items.
See Also: KFindDialog
UNKNOWN: Returns the state of the options.
UNKNOWN: Returns the pattern to find.
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.
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.
Parameters: hasSelection true if a selection exists
UNKNOWN: Enable/disable the 'search in selection' option, depending on whether there actually is a selection.
Parameters: options The setting of the Options.
UNKNOWN: Set the options which are checked.
UNKNOWN: Sets the pattern to find
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.
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.
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.
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.