KCompletionBase Class Reference
An abstract base class for adding a completion feature into widgets.An abstract class for adding text completion support to widgets. More...
#include <kcompletion.h>
Detailed Description
An abstract base class for adding a completion feature into widgets.An abstract class for adding text completion support to widgets.This is a convenience class that provides the basic functions needed to add text completion support into widgets. All that is required is an implementation for the pure virtual function setCompletedText. Refer to KLineEdit or KComboBox to see how easily such support can be added using this as a base class.
- Author:
- Dawit Alemayehu <adawit@kde.org>
Definition at line 664 of file kcompletion.h.
Member Enumeration Documentation
|
Constants that represent the items whose short-cut key-binding is programmable. The default key-bindings for these items are defined in KStdAccel.
Definition at line 672 of file kcompletion.h. |
Constructor & Destructor Documentation
|
Default constructor.
Definition at line 25 of file kcompletionbase.cpp. References KGlobalSettings::completionMode(), and useGlobalKeyBindings(). |
|
Destructor.
Definition at line 41 of file kcompletionbase.cpp. |
Member Function Documentation
|
Returns a pointer to the current completion object.
If the completion object does not exist, it is automatically created and by default handles all the completion signals internally unless See also compObj.
Definition at line 62 of file kcompletionbase.cpp. References completionObject(), and setCompletionObject(). Referenced by completionObject(). |
|
Sets up the completion object to be used. This method assigns the completion object and sets it up to automatically handle the completion and rotation signals internally. You should use this function if you want to share one completion object among your widgets or need to use a customized completion object. The object assigned through this method is not deleted when this object's destructor is invoked unless you explicitly call setAutoDeleteCompletionObject after calling this method. Be sure to set the bool argument to false, if you want to handle the completion signals yourself.
Reimplemented in KLineEdit. Definition at line 75 of file kcompletionbase.cpp. References setCompletionObject(). Referenced by completionObject(), and setCompletionObject(). |
|
Enables this object to handle completion and rotation events internally. This function simply assigns a boolean value that indicates whether it should handle rotation and completion events or not. Note that this does not stop the object from emitting signals when these events occur.
Definition at line 93 of file kcompletionbase.cpp. References setHandleSignals(). Referenced by setHandleSignals(). |
|
Returns true if the completion object is deleted upon this widget's destruction. See setCompletionObject() and enableCompletion() for details.
Definition at line 764 of file kcompletion.h. References isCompletionObjectAutoDeleted(). Referenced by isCompletionObjectAutoDeleted(). |
|
Sets the completion object when this widget's destructor is called. If the argument is set to true, the completion object is deleted when this widget's destructor is called.
Definition at line 777 of file kcompletion.h. References setAutoDeleteCompletionObject(). Referenced by setAutoDeleteCompletionObject(). |
|
Sets the widget's ability to emit text completion and rotation signals.
Invoking this function with 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.
Definition at line 804 of file kcompletion.h. References setEnableSignals(). Referenced by setEnableSignals(). |
|
Returns true if the object handles the signals.
Definition at line 816 of file kcompletion.h. References handleSignals(). Referenced by handleSignals(). |
|
Returns true if the object emits the signals.
Definition at line 823 of file kcompletion.h. References emitSignals(). Referenced by emitSignals(). |
|
Sets the type of completion to be used. The completion modes supported are those defined in KGlobalSettings(). See below.
Reimplemented in KLineEdit. Definition at line 101 of file kcompletionbase.cpp. References KGlobalSettings::CompletionNone, and setCompletionMode(). Referenced by setCompletionMode(). |
|
Returns the current completion mode. The return values are of type KGlobalSettings::Completion. See setCompletionMode() for details.
Definition at line 855 of file kcompletion.h. References completionMode(). Referenced by completionMode(). |
|
Sets the key-binding to be used for manual text completion, text rotation in a history list as well as a completion list.
When the keys set by this function are pressed, a signal defined by the inheriting widget will be activated. If the default value or 0 is specified by the second parameter, then the key-binding as defined in the global setting should be used. This method returns false value for
NOTE: To use a modifier key (Shift, Ctrl, Alt) as part of the key-binding simply simply
Definition at line 115 of file kcompletionbase.cpp. References KShortcut::isNull(), and setKeyBinding(). Referenced by setKeyBinding(). |
|
Returns the key-binding used for the specified item.
This methods returns the key-binding used to activate the feature feature given by
Definition at line 903 of file kcompletion.h. References getKeyBinding(). Referenced by getKeyBinding(). |
|
Sets this object to use global values for key-bindings. This method changes the values of the key bindings for rotation and completion features to the default values provided in KGlobalSettings. NOTE: By default inheriting widgets should uses the global key-bindings so that there will be no need to call this method. Definition at line 130 of file kcompletionbase.cpp. References NextCompletionMatch, PrevCompletionMatch, SubstringCompletion, TextCompletion, and useGlobalKeyBindings(). Referenced by KCompletionBase(), and useGlobalKeyBindings(). |
|
A pure virtual function that must be implemented by all inheriting classes. This function is intended to allow external completion implementations to set completed text appropriately. It is mostly relevant when the completion mode is set to CompletionAuto and CompletionManual modes. See KCompletionBase::setCompletedText. Does nothing in CompletionPopup mode, as all available matches will be shown in the popup.
|
|
A pure virtual function that must be implemented by all inheriting classes.
|
|
Returns a pointer to the completion object.
This method is only different from completionObject() in that it does not create a new KCompletion object even if the internal pointer is
Definition at line 954 of file kcompletion.h. References compObj(). Referenced by compObj(). |
|
Returns a key-binding map. This method is the same as getKeyBinding() except it returns the whole keymap containing the key-bindings.
Definition at line 965 of file kcompletion.h. References getKeyBindings(). Referenced by getKeyBindings(). |
|
Sets or removes the delegation object. If a delegation object is set, all function calls will be forwarded to the delegation object.
Definition at line 49 of file kcompletionbase.cpp. References m_bAutoDelCompObj, m_bEmitSignals, m_bHandleSignals, m_iCompletionMode, and m_keyMap. |
|
Returns the delegation object.
Definition at line 979 of file kcompletion.h. |
The documentation for this class was generated from the following files: