org.kde.koala
public class KCompletionBase extends Object implements QtSupport, KCompletionBaseInterface
UNKNOWN: An abstract class for adding text completion support to widgets.
Field Summary | |
---|---|
static int | NextCompletionMatch |
static int | PrevCompletionMatch |
static int | SubstringCompletion |
static int | TextCompletion
Constants that represent the items whose short-cut
key-binding is programmable. |
Constructor Summary | |
---|---|
protected | KCompletionBase(Class dummy) |
Method Summary | |
---|---|
int | completionMode()
Returns the current completion mode.
|
KCompletion | completionObject(boolean hsig)
Returns a pointer to the current completion object.
|
KCompletion | completionObject() |
KCompletion | compObj()
Returns a pointer to the completion object.
|
boolean | emitSignals()
Returns true if the object emits the signals. |
KShortcut | getKeyBinding(int item)
Returns the key-binding used for the specified item.
|
boolean | handleSignals()
Returns true if the object handles the signals. |
boolean | isCompletionObjectAutoDeleted()
Returns true if the completion object is deleted
upon this widget's destruction.
|
void | setAutoDeleteCompletionObject(boolean autoDelete)
Sets the completion object when this widget's destructor
is called.
|
void | setCompletedItems(String[] items)
A pure function that must be implemented by
all inheriting classes. |
void | setCompletedText(String text)
A pure function that must be implemented by
all inheriting classes.
|
void | setCompletionMode(int mode)
Sets the type of completion to be used.
|
void | setCompletionObject(KCompletion compObj, boolean hsig)
Sets up the completion object to be used.
|
void | setCompletionObject(KCompletion compObj) |
void | setEnableSignals(boolean enable)
Sets the widget's ability to emit text completion and
rotation signals.
|
void | setHandleSignals(boolean handle)
Enables this object to handle completion and rotation
events internally.
|
boolean | setKeyBinding(int item, KShortcut key)
Sets the key-binding to be used for manual text
completion, text rotation in a history list as
well as a completion list.
|
void | useGlobalKeyBindings()
Sets this object to use global values for key-bindings.
|
UNKNOWN: Constants that represent the items whose short-cut key-binding is programmable.
Returns: the completion mode.
UNKNOWN: Returns the current completion mode.
hsig
is set to false. It is also automatically destroyed when the destructor
is called. You can change this default behavior using the
KCompletionBase and KCompletionBase member
functions.
See also KCompletionBase.Parameters: hsig if true, handles completion signals internally.
Returns: a pointer the completion object.
UNKNOWN: Returns a pointer to the current completion object.
NULL.
Use this method to get the
pointer to a completion object when inheriting so that you
won't inadvertently create it!!Returns: the completion object or NULL if one does not exist.
UNKNOWN: Returns a pointer to the completion object.
Returns: true if signals are emitted
UNKNOWN: Returns true if the object emits the signals.
item.
If the binding
contains modifier key(s), the SUM of the modifier key
and the actual key code are returned.Parameters: item the item to check
Returns: the key-binding used for the feature given by item.
See Also: KCompletionBase
UNKNOWN: Returns the key-binding used for the specified item.
Returns: true if this signals are handled internally.
UNKNOWN: Returns true if the object handles the signals.
Returns: true if the completion object will be deleted automatically
UNKNOWN: Returns true if the completion object is deleted upon this widget's destruction.
Parameters: autoDelete if true, delete completion object on destruction.
UNKNOWN: Sets the completion object when this widget's destructor is called.
Parameters: items the list of completed items
UNKNOWN: A pure virtual function that must be implemented by all inheriting classes.
Parameters: text the completed text to be set in the widget.
UNKNOWN: A pure virtual function that must be implemented by all inheriting classes.
Parameters: mode Completion type:
Parameters: compObj a KCompletion() or a derived child object. hsig if true, handles completion signals internally.
UNKNOWN: Sets up the completion object to be used.
enable
set to false
will
cause the completion & rotation signals not to be emitted.
However, unlike setting the completion object to NULL
using setCompletionObject, disabling the emition of
the signals through this method does not affect the current
completion object.
There is no need to invoke this function by default. When a
completion object is created through completionObject or
setCompletionObject, these signals are set to emit
automatically. Also note that disabling this signals will not
necessarily interfere with the objects ability to handle these
events internally. See setHandleSignals.Parameters: enable if false, disables the emition of completion & rotation signals.
UNKNOWN: Sets the widget's ability to emit text completion and rotation signals.
Parameters: handle if true, handle completion & rotation internally.
UNKNOWN: Enables this object to handle completion and rotation events internally.
key
is negative or the supplied key-binding conflicts
with the ones set for one of the other features.
NOTE: To use a modifier key (Shift, Ctrl, Alt) as part of
the key-binding simply simply sum
up the values of the
modifier and the actual key. For example, to use CTRL+E as
a key binding for one of the items, you would simply supply
"Qt.CtrlButton + Qt.Key_E" as the second argument to this
function.Parameters: item the feature whose key-binding needs to be set:
Returns: true if key-binding can successfully be set.
See Also: KCompletionBase
UNKNOWN: Sets the key-binding to be used for manual text completion, text rotation in a history list as well as a completion list.
UNKNOWN: Sets this object to use global values for key-bindings.