\section{KCompletion\-Base Class Reference}
\label{classKCompletionBase}\index{KCompletionBase@{KCompletionBase}}
An abstract base class for adding a completion feature into widgets. An abstract class for adding text completion support to widgets.  


{\tt \#include $<$kcompletion.h$>$}

Inheritance diagram for KCompletion\-Base:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=92pt]{classKCompletionBase__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KCompletion\-Base:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=193pt]{classKCompletionBase__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
typedef {\bf QMap}$<$ {\bf Key\-Binding\-Type}, {\bf KShortcut} $>$ {\bf Key\-Binding\-Map}\label{classKCompletionBase_w0}

\item 
enum {\bf Key\-Binding\-Type} \{ {\bf Text\-Completion}, 
{\bf Prev\-Completion\-Match}, 
{\bf Next\-Completion\-Match}, 
{\bf Substring\-Completion}
 \}
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KCompletion\-Base} ()
\item 
virtual {\bf $\sim$KCompletion\-Base} ()
\item 
{\bf KCompletion} $\ast$ {\bf completion\-Object} (bool hsig=true)
\item 
virtual void {\bf set\-Completion\-Object} ({\bf KCompletion} $\ast$comp\-Obj, bool hsig=true)
\item 
virtual void {\bf set\-Handle\-Signals} (bool handle)
\item 
bool {\bf is\-Completion\-Object\-Auto\-Deleted} () const 
\item 
void {\bf set\-Auto\-Delete\-Completion\-Object} (bool auto\-Delete)
\item 
void {\bf set\-Enable\-Signals} (bool enable)
\item 
bool {\bf handle\-Signals} () const 
\item 
bool {\bf emit\-Signals} () const 
\item 
virtual void {\bf set\-Completion\-Mode} ({\bf KGlobal\-Settings::Completion} mode)
\item 
{\bf KGlobal\-Settings::Completion} {\bf completion\-Mode} () const 
\item 
bool {\bf set\-Key\-Binding} ({\bf Key\-Binding\-Type} item, const {\bf KShortcut} \&key)
\item 
const {\bf KShortcut} \& {\bf get\-Key\-Binding} ({\bf Key\-Binding\-Type} item) const 
\item 
void {\bf use\-Global\-Key\-Bindings} ()
\item 
virtual void {\bf set\-Completed\-Text} (const {\bf QString} \&text)=0
\item 
virtual void {\bf set\-Completed\-Items} (const {\bf QString\-List} \&items)=0
\item 
{\bf KCompletion} $\ast$ {\bf comp\-Obj} () const 
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf Key\-Binding\-Map} {\bf get\-Key\-Bindings} () const 
\item 
void {\bf set\-Delegate} ({\bf KCompletion\-Base} $\ast$delegate)
\item 
{\bf KCompletion\-Base} $\ast$ {\bf delegate} () const 
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKCompletionBase_b3}

\end{CompactItemize}


\subsection{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 set\-Completed\-Text. Refer to {\bf KLine\-Edit} or {\bf KCombo\-Box} to see how easily such support can be added using this as a base class.

\begin{Desc}
\item[Author:]Dawit Alemayehu $<${\tt adawit@kde.org}$>$ \end{Desc}




Definition at line 663 of file kcompletion.h.

\subsection{Member Enumeration Documentation}
\index{KCompletionBase@{KCompletion\-Base}!KeyBindingType@{KeyBindingType}}
\index{KeyBindingType@{KeyBindingType}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf KCompletion\-Base::Key\-Binding\-Type}}\label{classKCompletionBase_w5}


Constants that represent the items whose short-cut key-binding is programmable. 

The default key-bindings for these items are defined in {\bf KStd\-Accel}{\rm (p.\,\pageref{namespaceKStdAccel})}. \begin{Desc}
\item[Enumeration values: ]\par
\begin{description}
\index{TextCompletion@{TextCompletion}!KCompletionBase@{KCompletionBase}}\index{KCompletionBase@{KCompletionBase}!TextCompletion@{TextCompletion}}\item[{\em 
Text\-Completion\label{classKCompletionBase_w5w1}
}]Text completion (by default Ctrl-E). \index{PrevCompletionMatch@{PrevCompletionMatch}!KCompletionBase@{KCompletionBase}}\index{KCompletionBase@{KCompletionBase}!PrevCompletionMatch@{PrevCompletionMatch}}\item[{\em 
Prev\-Completion\-Match\label{classKCompletionBase_w5w2}
}]Switch to previous completion (by default Ctrl-Up). \index{NextCompletionMatch@{NextCompletionMatch}!KCompletionBase@{KCompletionBase}}\index{KCompletionBase@{KCompletionBase}!NextCompletionMatch@{NextCompletionMatch}}\item[{\em 
Next\-Completion\-Match\label{classKCompletionBase_w5w3}
}]Switch to next completion (by default Ctrl-Down). \index{SubstringCompletion@{SubstringCompletion}!KCompletionBase@{KCompletionBase}}\index{KCompletionBase@{KCompletionBase}!SubstringCompletion@{SubstringCompletion}}\item[{\em 
Substring\-Completion\label{classKCompletionBase_w5w4}
}]Substring completion (by default Ctrl-T). \end{description}
\end{Desc}



Definition at line 671 of file kcompletion.h.

\subsection{Constructor \& Destructor Documentation}
\index{KCompletionBase@{KCompletion\-Base}!KCompletionBase@{KCompletionBase}}
\index{KCompletionBase@{KCompletionBase}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KCompletion\-Base::KCompletion\-Base ()}\label{classKCompletionBase_a0}


Default constructor. 



Definition at line 25 of file kcompletionbase.cpp.

References KGlobal\-Settings::completion\-Mode(), and use\-Global\-Key\-Bindings().\index{KCompletionBase@{KCompletion\-Base}!~KCompletionBase@{$\sim$KCompletionBase}}
\index{~KCompletionBase@{$\sim$KCompletionBase}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KCompletion\-Base::$\sim${\bf KCompletion\-Base} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKCompletionBase_a1}


Destructor. 



Definition at line 41 of file kcompletionbase.cpp.

\subsection{Member Function Documentation}
\index{KCompletionBase@{KCompletion\-Base}!completionObject@{completionObject}}
\index{completionObject@{completionObject}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KCompletion} $\ast$ KCompletion\-Base::completion\-Object (bool {\em hsig} = {\tt true})}\label{classKCompletionBase_a2}


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 {\tt hsig} is set to false. It is also automatically destroyed when the destructor is called. You can change this default behavior using the {\bf set\-Auto\-Delete\-Completion\-Object}{\rm (p.\,\pageref{classKCompletionBase_a6})} and {\bf set\-Handle\-Signals}{\rm (p.\,\pageref{classKCompletionBase_a4})} member functions.

See also {\bf comp\-Obj}{\rm (p.\,\pageref{classKCompletionBase_a17})}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em hsig}]if true, handles completion signals internally. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a pointer the completion object. \end{Desc}


Definition at line 62 of file kcompletionbase.cpp.

References set\-Completion\-Object().\index{KCompletionBase@{KCompletion\-Base}!setCompletionObject@{setCompletionObject}}
\index{setCompletionObject@{setCompletionObject}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCompletion\-Base::set\-Completion\-Object ({\bf KCompletion} $\ast$ {\em comp\-Obj}, bool {\em hsig} = {\tt true})\hspace{0.3cm}{\tt  [virtual]}}\label{classKCompletionBase_a3}


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 {\bf set\-Auto\-Delete\-Completion\-Object}{\rm (p.\,\pageref{classKCompletionBase_a6})} after calling this method. Be sure to set the bool argument to false, if you want to handle the completion signals yourself.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em comp\-Obj}]a KCompletion() or a derived child object. \item[{\em hsig}]if true, handles completion signals internally. \end{description}
\end{Desc}


Reimplemented in {\bf KLine\-Edit}.

Definition at line 75 of file kcompletionbase.cpp.

References comp\-Obj(), and QGuarded\-Ptr::is\-Null().

Referenced by completion\-Object().\index{KCompletionBase@{KCompletion\-Base}!setHandleSignals@{setHandleSignals}}
\index{setHandleSignals@{setHandleSignals}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCompletion\-Base::set\-Handle\-Signals (bool {\em handle})\hspace{0.3cm}{\tt  [virtual]}}\label{classKCompletionBase_a4}


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.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em handle}]if true, handle completion \& rotation internally. \end{description}
\end{Desc}


Definition at line 93 of file kcompletionbase.cpp.\index{KCompletionBase@{KCompletion\-Base}!isCompletionObjectAutoDeleted@{isCompletionObjectAutoDeleted}}
\index{isCompletionObjectAutoDeleted@{isCompletionObjectAutoDeleted}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KCompletion\-Base::is\-Completion\-Object\-Auto\-Deleted () const\hspace{0.3cm}{\tt  [inline]}}\label{classKCompletionBase_a5}


Returns true if the completion object is deleted upon this widget's destruction. 

See {\bf set\-Completion\-Object()}{\rm (p.\,\pageref{classKCompletionBase_a3})} and enable\-Completion() for details.

\begin{Desc}
\item[Returns:]true if the completion object will be deleted automatically \end{Desc}


Definition at line 763 of file kcompletion.h.\index{KCompletionBase@{KCompletion\-Base}!setAutoDeleteCompletionObject@{setAutoDeleteCompletionObject}}
\index{setAutoDeleteCompletionObject@{setAutoDeleteCompletionObject}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCompletion\-Base::set\-Auto\-Delete\-Completion\-Object (bool {\em auto\-Delete})\hspace{0.3cm}{\tt  [inline]}}\label{classKCompletionBase_a6}


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.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em auto\-Delete}]if true, delete completion object on destruction. \end{description}
\end{Desc}


Definition at line 776 of file kcompletion.h.\index{KCompletionBase@{KCompletion\-Base}!setEnableSignals@{setEnableSignals}}
\index{setEnableSignals@{setEnableSignals}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCompletion\-Base::set\-Enable\-Signals (bool {\em enable})\hspace{0.3cm}{\tt  [inline]}}\label{classKCompletionBase_a7}


Sets the widget's ability to emit text completion and rotation signals. 

Invoking this function with {\tt enable} set to {\tt false} will cause the completion \& rotation signals not to be emitted. However, unlike setting the completion object to {\tt NULL} using set\-Completion\-Object, 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 completion\-Object or set\-Completion\-Object, 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 set\-Handle\-Signals.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em enable}]if false, disables the emition of completion \& rotation signals. \end{description}
\end{Desc}


Definition at line 803 of file kcompletion.h.\index{KCompletionBase@{KCompletion\-Base}!handleSignals@{handleSignals}}
\index{handleSignals@{handleSignals}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KCompletion\-Base::handle\-Signals () const\hspace{0.3cm}{\tt  [inline]}}\label{classKCompletionBase_a8}


Returns true if the object handles the signals. 

\begin{Desc}
\item[Returns:]true if this signals are handled internally. \end{Desc}


Definition at line 815 of file kcompletion.h.\index{KCompletionBase@{KCompletion\-Base}!emitSignals@{emitSignals}}
\index{emitSignals@{emitSignals}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KCompletion\-Base::emit\-Signals () const\hspace{0.3cm}{\tt  [inline]}}\label{classKCompletionBase_a9}


Returns true if the object emits the signals. 

\begin{Desc}
\item[Returns:]true if signals are emitted \end{Desc}


Definition at line 822 of file kcompletion.h.\index{KCompletionBase@{KCompletion\-Base}!setCompletionMode@{setCompletionMode}}
\index{setCompletionMode@{setCompletionMode}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCompletion\-Base::set\-Completion\-Mode ({\bf KGlobal\-Settings::Completion} {\em mode})\hspace{0.3cm}{\tt  [virtual]}}\label{classKCompletionBase_a10}


Sets the type of completion to be used. 

The completion modes supported are those defined in KGlobal\-Settings(). See below.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mode}]Completion type: \begin{itemize}
\item Completion\-None: Disables completion feature. \item Completion\-Auto: Attempts to find a match \& fills-in the remaining text. \item Completion\-Man: Acts the same as the above except the action has to be manually triggered through pre-defined completion key. \item Completion\-Shell: Mimics the completion feature found in typical $\ast$nix shell environments. \item Completion\-Popup: Shows all available completions at once, in a listbox popping up. \end{itemize}
\end{description}
\end{Desc}


Reimplemented in {\bf KLine\-Edit}.

Definition at line 101 of file kcompletionbase.cpp.\index{KCompletionBase@{KCompletion\-Base}!completionMode@{completionMode}}
\index{completionMode@{completionMode}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KGlobal\-Settings::Completion} KCompletion\-Base::completion\-Mode () const\hspace{0.3cm}{\tt  [inline]}}\label{classKCompletionBase_a11}


Returns the current completion mode. 

The return values are of type {\bf KGlobal\-Settings::Completion}{\rm (p.\,\pageref{classKGlobalSettings_w10})}. See {\bf set\-Completion\-Mode()}{\rm (p.\,\pageref{classKCompletionBase_a10})} for details.

\begin{Desc}
\item[Returns:]the completion mode. \end{Desc}


Definition at line 854 of file kcompletion.h.\index{KCompletionBase@{KCompletion\-Base}!setKeyBinding@{setKeyBinding}}
\index{setKeyBinding@{setKeyBinding}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KCompletion\-Base::set\-Key\-Binding ({\bf Key\-Binding\-Type} {\em item}, const {\bf KShortcut} \& {\em key})}\label{classKCompletionBase_a12}


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 {\tt 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 {\tt 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 {\tt \char`\"{}Qt::Ctrl\-Button + Qt::Key\_\-E\char`\"{}} as the second argument to this function.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em item}]the feature whose key-binding needs to be set: \begin{itemize}
\item Text\-Completion the manual completion key-binding. \item Prev\-Completion\-Match the previous match key for multiple completion. \item Next\-Completion\-Match the next match key for for multiple completion. \item Substring\-Completion the key for substring completion \end{itemize}
\item[{\em key}]key-binding used to rotate down in a list. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if key-binding can successfully be set. \end{Desc}
\begin{Desc}
\item[See also:]{\bf get\-Key\-Binding}{\rm (p.\,\pageref{classKCompletionBase_a13})} \end{Desc}


Definition at line 115 of file kcompletionbase.cpp.

References QMap::begin(), QMap::end(), and QMap::replace().\index{KCompletionBase@{KCompletion\-Base}!getKeyBinding@{getKeyBinding}}
\index{getKeyBinding@{getKeyBinding}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf KShortcut}\& KCompletion\-Base::get\-Key\-Binding ({\bf Key\-Binding\-Type} {\em item}) const\hspace{0.3cm}{\tt  [inline]}}\label{classKCompletionBase_a13}


Returns the key-binding used for the specified item. 

This methods returns the key-binding used to activate the feature feature given by {\tt item}. If the binding contains modifier key(s), the SUM of the modifier key and the actual key code are returned.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em item}]the item to check \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the key-binding used for the feature given by {\tt item}. \end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Key\-Binding}{\rm (p.\,\pageref{classKCompletionBase_a12})} \end{Desc}


Definition at line 902 of file kcompletion.h.\index{KCompletionBase@{KCompletion\-Base}!useGlobalKeyBindings@{useGlobalKeyBindings}}
\index{useGlobalKeyBindings@{useGlobalKeyBindings}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCompletion\-Base::use\-Global\-Key\-Bindings ()}\label{classKCompletionBase_a14}


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 {\bf KGlobal\-Settings}{\rm (p.\,\pageref{classKGlobalSettings})}.

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 QMap::clear(), QMap::insert(), Next\-Completion\-Match, Prev\-Completion\-Match, Substring\-Completion, and Text\-Completion.

Referenced by KCompletion\-Base().\index{KCompletionBase@{KCompletion\-Base}!setCompletedText@{setCompletedText}}
\index{setCompletedText@{setCompletedText}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KCompletion\-Base::set\-Completed\-Text (const {\bf QString} \& {\em text})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKCompletionBase_a15}


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 Completion\-Auto and Completion\-Manual modes. See {\bf KCompletion\-Base::set\-Completed\-Text}{\rm (p.\,\pageref{classKCompletionBase_a15})}. Does nothing in Completion\-Popup mode, as all available matches will be shown in the popup.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]the completed text to be set in the widget. \end{description}
\end{Desc}


Implemented in {\bf KCombo\-Box}, and {\bf KLine\-Edit}.\index{KCompletionBase@{KCompletion\-Base}!setCompletedItems@{setCompletedItems}}
\index{setCompletedItems@{setCompletedItems}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KCompletion\-Base::set\-Completed\-Items (const {\bf QString\-List} \& {\em items})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKCompletionBase_a16}


A pure virtual function that must be implemented by all inheriting classes. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em items}]the list of completed items \end{description}
\end{Desc}


Implemented in {\bf KCombo\-Box}, and {\bf KLine\-Edit}.\index{KCompletionBase@{KCompletion\-Base}!compObj@{compObj}}
\index{compObj@{compObj}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KCompletion}$\ast$ KCompletion\-Base::comp\-Obj () const\hspace{0.3cm}{\tt  [inline]}}\label{classKCompletionBase_a17}


Returns a pointer to the completion object. 

This method is only different from {\bf completion\-Object()}{\rm (p.\,\pageref{classKCompletionBase_a2})} in that it does not create a new {\bf KCompletion}{\rm (p.\,\pageref{classKCompletion})} object even if the internal pointer is {\tt NULL}. Use this method to get the pointer to a completion object when inheriting so that you won't inadvertently create it!!

\begin{Desc}
\item[Returns:]the completion object or NULL if one does not exist. \end{Desc}


Definition at line 953 of file kcompletion.h.

Referenced by set\-Completion\-Object().\index{KCompletionBase@{KCompletion\-Base}!getKeyBindings@{getKeyBindings}}
\index{getKeyBindings@{getKeyBindings}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Key\-Binding\-Map} KCompletion\-Base::get\-Key\-Bindings () const\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKCompletionBase_b0}


Returns a key-binding map. 

This method is the same as {\bf get\-Key\-Binding()}{\rm (p.\,\pageref{classKCompletionBase_a13})} except it returns the whole keymap containing the key-bindings.

\begin{Desc}
\item[Returns:]the key-binding used for the feature given by {\tt item}. \end{Desc}


Definition at line 964 of file kcompletion.h.\index{KCompletionBase@{KCompletion\-Base}!setDelegate@{setDelegate}}
\index{setDelegate@{setDelegate}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCompletion\-Base::set\-Delegate ({\bf KCompletion\-Base} $\ast$ {\em delegate})\hspace{0.3cm}{\tt  [protected]}}\label{classKCompletionBase_b1}


Sets or removes the delegation object. 

If a delegation object is set, all function calls will be forwarded to the delegation object. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em delegate}]the delegation object, or 0 to remove it \end{description}
\end{Desc}


Definition at line 49 of file kcompletionbase.cpp.

References delegate(), m\_\-b\-Auto\-Del\-Comp\-Obj, m\_\-b\-Emit\-Signals, m\_\-b\-Handle\-Signals, m\_\-i\-Completion\-Mode, and m\_\-key\-Map.\index{KCompletionBase@{KCompletion\-Base}!delegate@{delegate}}
\index{delegate@{delegate}!KCompletionBase@{KCompletion\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KCompletion\-Base}$\ast$ KCompletion\-Base::delegate () const\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKCompletionBase_b2}


Returns the delegation object. 

\begin{Desc}
\item[Returns:]the delegation object, or 0 if there is none \end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Delegate()}{\rm (p.\,\pageref{classKCompletionBase_b1})} \end{Desc}


Definition at line 978 of file kcompletion.h.

Referenced by set\-Delegate().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kcompletion.h\item 
kcompletion.cpp\item 
kcompletionbase.cpp\end{CompactItemize}
