.TH "KLineEdit" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KLineEdit \- An enhanced \fBQLineEdit\fP widget for inputting text.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <klineedit.h>\fP
.PP
Inherits \fBQLineEdit\fP, and \fBKCompletionBase\fP.
.PP
Inherited by \fBKIconViewSearchLine\fP, \fBKListViewLineEdit\fP, \fBKListViewSearchLine\fP, and \fBKRestrictedLine\fP.
.PP
.SS "Public Slots"

.in +1c
.ti -1c
.RI "virtual void \fBsetReadOnly\fP (bool)"
.br
.ti -1c
.RI "void \fBrotateText\fP (\fBKCompletionBase::KeyBindingType\fP type)"
.br
.ti -1c
.RI "virtual void \fBsetCompletedText\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "void \fBsetCompletedItems\fP (const \fBQStringList\fP &items)"
.br
.ti -1c
.RI "void \fBsetCompletedItems\fP (const \fBQStringList\fP &items, bool autoSuggest)"
.br
.ti -1c
.RI "virtual void \fBclear\fP ()"
.br
.ti -1c
.RI "void \fBsetSqueezedText\fP (const \fBQString\fP &\fBtext\fP)"
.br
.ti -1c
.RI "virtual void \fBsetText\fP (const \fBQString\fP &)"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBcompletionBoxActivated\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "void \fBreturnPressed\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "void \fBcompletion\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "void \fBsubstringCompletion\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "void \fBtextRotation\fP (\fBKCompletionBase::KeyBindingType\fP)"
.br
.ti -1c
.RI "void \fBcompletionModeChanged\fP (\fBKGlobalSettings::Completion\fP)"
.br
.ti -1c
.RI "void \fBaboutToShowContextMenu\fP (\fBQPopupMenu\fP *p)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKLineEdit\fP (const \fBQString\fP &string, \fBQWidget\fP *parent, const char *name=0)"
.br
.ti -1c
.RI "\fBKLineEdit\fP (\fBQWidget\fP *parent=0, const char *name=0)"
.br
.ti -1c
.RI "virtual \fB~KLineEdit\fP ()"
.br
.ti -1c
.RI "void \fBsetURL\fP (const \fBKURL\fP &url)"
.br
.ti -1c
.RI "void \fBcursorAtEnd\fP ()"
.br
.ti -1c
.RI "virtual void \fBsetCompletionMode\fP (\fBKGlobalSettings::Completion\fP mode)"
.br
.ti -1c
.RI "virtual void \fBsetContextMenuEnabled\fP (bool showMenu)"
.br
.ti -1c
.RI "bool \fBisContextMenuEnabled\fP () const "
.br
.ti -1c
.RI "void \fBsetURLDropsEnabled\fP (bool enable)"
.br
.ti -1c
.RI "bool \fBisURLDropsEnabled\fP () const "
.br
.ti -1c
.RI "void \fBsetTrapReturnKey\fP (bool trap)"
.br
.ti -1c
.RI "bool \fBtrapReturnKey\fP () const "
.br
.ti -1c
.RI "virtual bool \fBeventFilter\fP (\fBQObject\fP *, \fBQEvent\fP *)"
.br
.ti -1c
.RI "\fBKCompletionBox\fP * \fBcompletionBox\fP (bool create=true)"
.br
.ti -1c
.RI "virtual void \fBsetCompletionObject\fP (\fBKCompletion\fP *, bool hsig=true)"
.br
.ti -1c
.RI "virtual void \fBcopy\fP () const "
.br
.ti -1c
.RI "void \fBsetEnableSqueezedText\fP (bool enable)"
.br
.ti -1c
.RI "bool \fBisSqueezedTextEnabled\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBoriginalText\fP () const "
.br
.ti -1c
.RI "void \fBsetCompletionBox\fP (\fBKCompletionBox\fP *box)"
.br
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "virtual void \fBmakeCompletion\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "void \fBslotAboutToShow\fP ()"
.br
.ti -1c
.RI "void \fBslotCancelled\fP ()"
.br
.ti -1c
.RI "void \fBuserCancelled\fP (const \fBQString\fP &cancelText)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBresizeEvent\fP (\fBQResizeEvent\fP *)"
.br
.ti -1c
.RI "virtual void \fBkeyPressEvent\fP (\fBQKeyEvent\fP *)"
.br
.ti -1c
.RI "virtual void \fBmousePressEvent\fP (\fBQMouseEvent\fP *)"
.br
.ti -1c
.RI "virtual void \fBmouseDoubleClickEvent\fP (\fBQMouseEvent\fP *)"
.br
.ti -1c
.RI "virtual void \fBcontextMenuEvent\fP (\fBQContextMenuEvent\fP *)"
.br
.ti -1c
.RI "virtual \fBQPopupMenu\fP * \fBcreatePopupMenu\fP ()"
.br
.ti -1c
.RI "virtual void \fBdropEvent\fP (\fBQDropEvent\fP *)"
.br
.ti -1c
.RI "virtual void \fBsetCompletedText\fP (const \fBQString\fP &, bool)"
.br
.ti -1c
.RI "void \fBsetUserSelection\fP (bool userSelection)"
.br
.ti -1c
.RI "virtual void \fBcreate\fP (WId=0, bool initializeWindow=true, bool destroyOldWindow=true)"
.br
.ti -1c
.RI "virtual void \fBfocusInEvent\fP (\fBQFocusEvent\fP *)"
.br
.ti -1c
.RI "bool \fBautoSuggest\fP () const "
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Properties"

.in +1c
.ti -1c
.RI "bool \fBcontextMenuEnabled\fP"
.br
.ti -1c
.RI "bool \fBurlDropsEnabled\fP"
.br
.ti -1c
.RI "bool \fBtrapEnterKeyEvent\fP"
.br
.ti -1c
.RI "bool \fBenableSqueezedText\fP"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKComboBox\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
An enhanced \fBQLineEdit\fP widget for inputting text. 

\fBDetail\fP 
.br
.PP
This widget inherits from \fBQLineEdit\fP and implements the following additional functionalities: a completion object that provides both automatic and manual text completion as well as multiple match iteration features, configurable key-bindings to activate these features and a popup-menu item that can be used to allow the user to set text completion modes on the fly based on their preference.
.PP
To support these new features KLineEdit also emits a few more additional signals. These are: \fBcompletion( const QString& )\fP, \fBtextRotation( KeyBindingType )\fP, and \fBreturnPressed( const QString& )\fP. The completion signal can be connected to a slot that will assist the user in filling out the remaining text. The text rotation signal is intended to be used to iterate through the list of all possible matches whenever there is more than one match for the entered text. The \fC\fBreturnPressed( const QString& )\fP\fP signals are the same as QLineEdit's except it provides the current text in the widget as its argument whenever appropriate.
.PP
This widget by default creates a completion object when you invoke the \fBcompletionObject( bool )\fP member function for the first time or use \fBsetCompletionObject( KCompletion*, bool )\fP to assign your own completion object. Additionally, to make this widget more functional, KLineEdit will by default handle the text rotation and completion events internally when a completion object is created through either one of the methods mentioned above. If you do not need this functionality, simply use \fBKCompletionBase::setHandleSignals( bool )\fP or set the boolean parameter in the above functions to false.
.PP
The default key-bindings for completion and rotation is determined from the global settings in \fBKStdAccel\fP. These values, however, can be overridden locally by invoking \fBKCompletionBase::setKeyBinding()\fP. The values can easily be reverted back to the default setting, by simply calling useGlobalSettings(). An alternate method would be to default individual key-bindings by using \fBsetKeyBinding()\fP with the default second argument.
.PP
If \fCEchoMode\fP for this widget is set to something other than \fCQLineEdit::Normal\fP, the completion mode will always be defaulted to \fBKGlobalSettings::CompletionNone\fP. This is done purposefully to guard against protected entries such as passwords being cached in KCompletion's list. Hence, if the \fCEchoMode\fP is not QLineEdit::Normal, the completion mode is automatically disabled.
.PP
A read-only KLineEdit will have the same background color as a disabled KLineEdit, but its foreground color will be the one used for the read-write mode. This differs from QLineEdit's implementation and is done to give visual distinction between the three different modes: disabled, read-only, and read-write.
.PP
\fBUsage\fP 
.br
.PP
To enable the basic completion feature :
.PP
.PP
.nf
 KLineEdit *edit = new KLineEdit( this, 'mywidget' );
 KCompletion *comp = edit->completionObject();
 // Connect to the return pressed signal - optional
 connect(edit,SIGNAL(returnPressed(const QString&)),comp,SLOT(addItem(const QString&)));
.fi
.PP
.PP
To use a customized completion objects or your own completion object :
.PP
.PP
.nf
 KLineEdit *edit = new KLineEdit( this,'mywidget' );
 KURLCompletion *comp = new KURLCompletion();
 edit->setCompletionObject( comp );
 // Connect to the return pressed signal - optional
 connect(edit,SIGNAL(returnPressed(const QString&)),comp,SLOT(addItem(const QString&)));
.fi
.PP
.PP
Note if you specify your own completion object you have to either delete it when you don't need it anymore, or you can tell KLineEdit to delete it for you: 
.PP
.nf
 edit->setAutoDeleteCompletionObject( true );

.fi
.PP
.PP
\fBMiscellaneous function calls :\fP
.br
.PP
.PP
.nf
 // Tell the widget to not handle completion and iteration automatically.
 edit->setHandleSignals( false );

 // Set your own key-bindings for a text completion mode.
 edit->setKeyBinding( KCompletionBase::TextCompletion, Qt::End );

 // Hide the context (popup) menu
 edit->setContextMenuEnabled( false );

 // Temporarily disable signal (both completion & iteration) emitions
 edit->disableSignals();

 // Default the key-bindings back to the default system settings.
 edit->useGlobalKeyBindings();
.fi
.PP
.PP
\fBAuthor:\fP
.RS 4
Dawit Alemayehu <adawit@kde.org> 
.RE
.PP

.PP
Definition at line 145 of file klineedit.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KLineEdit::KLineEdit (const \fBQString\fP & string, \fBQWidget\fP * parent, const char * name = \fC0\fP)"
.PP
Constructs a KLineEdit object with a default text, a parent, and a name. 
.PP
\fBParameters:\fP
.RS 4
\fIstring\fP Text to be shown in the edit widget. 
.br
\fIparent\fP The parent object of this widget. 
.br
\fIname\fP the name of this widget 
.RE
.PP

.PP
Definition at line 102 of file klineedit.cpp.
.SS "KLineEdit::KLineEdit (\fBQWidget\fP * parent = \fC0\fP, const char * name = \fC0\fP)"
.PP
Constructs a KLineEdit object with a parent and a name. 
.PP
\fBParameters:\fP
.RS 4
\fIparent\fP The parent object of this widget. 
.br
\fIname\fP The name of this widget. 
.RE
.PP

.PP
Definition at line 108 of file klineedit.cpp.
.SS "KLineEdit::~\fBKLineEdit\fP ()\fC [virtual]\fP"
.PP
Destructor. 
.PP
Definition at line 114 of file klineedit.cpp.
.SH "Member Function Documentation"
.PP 
.SS "void KLineEdit::setURL (const \fBKURL\fP & url)"
.PP
Sets \fCurl\fP into the lineedit. 
.PP
It uses \fBKURL::prettyURL()\fP so that the url is properly decoded for displaying. 
.PP
Definition at line 1036 of file klineedit.cpp.
.PP
References setText().
.SS "void KLineEdit::cursorAtEnd ()\fC [inline]\fP"
.PP
Puts the text cursor at the end of the string. 
.PP
This method is deprecated. Use \fBQLineEdit::end()\fP instead.
.PP
\fBDeprecated\fP
.RS 4
\fBQLineEdit::end()\fP 
.RE
.PP

.PP
Definition at line 195 of file klineedit.h.
.PP
References QLineEdit::end().
.SS "void KLineEdit::setCompletionMode (\fBKGlobalSettings::Completion\fP mode)\fC [virtual]\fP"
.PP
Re-implemented from \fBKCompletionBase\fP for internal reasons. 
.PP
This function is re-implemented in order to make sure that the EchoMode is acceptable before we set the completion mode.
.PP
See \fBKCompletionBase::setCompletionMode\fP 
.PP
Reimplemented from \fBKCompletionBase\fP.
.PP
Definition at line 144 of file klineedit.cpp.
.PP
References KCompletionBase::completionMode(), QLineEdit::echoMode(), and KCompletionBase::setCompletionMode().
.SS "virtual void KLineEdit::setContextMenuEnabled (bool showMenu)\fC [inline, virtual]\fP"
.PP
Enables/disables the popup (context) menu. 
.PP
Note that when this function is invoked with its argument set to \fCtrue\fP, then both the context menu and the completion menu item are enabled. If you do not want to the completion item to be visible simply invoke hideModechanger() right after calling this method. Also by default, the context menu is automatically created if this widget is editable. Thus you need to call this function with the argument set to false if you do not want this behavior.
.PP
\fBParameters:\fP
.RS 4
\fIshowMenu\fP If \fCtrue\fP, show the context menu. 
.RE
.PP

.PP
Definition at line 221 of file klineedit.h.
.SS "bool KLineEdit::isContextMenuEnabled () const\fC [inline]\fP"
.PP
Returns \fCtrue\fP when the context menu is enabled. 
.PP
Definition at line 226 of file klineedit.h.
.SS "void KLineEdit::setURLDropsEnabled (bool enable)"
.PP
Enables/Disables handling of URL drops. 
.PP
If enabled and the user drops an URL, the decoded URL will be inserted. Otherwise the default behavior of \fBQLineEdit\fP is used, which inserts the encoded URL.
.PP
\fBParameters:\fP
.RS 4
\fIenable\fP If \fCtrue\fP, insert decoded URLs 
.RE
.PP

.PP
Definition at line 1016 of file klineedit.cpp.
.SS "bool KLineEdit::isURLDropsEnabled () const"
.PP
Returns \fCtrue\fP when decoded URL drops are enabled. 
.PP
Definition at line 1021 of file klineedit.cpp.
.SS "void KLineEdit::setTrapReturnKey (bool trap)"
.PP
By default, KLineEdit recognizes \fCKey_Return\fP and \fCKey_Enter\fP and emits the \fBreturnPressed()\fP signals, but it also lets the event pass, for example causing a dialog's default-button to be called. 
.PP
Call this method with \fCtrap\fP = \fCtrue\fP to make \fCKLineEdit\fP stop these events. The signals will still be emitted of course.
.PP
\fBSee also:\fP
.RS 4
\fBtrapReturnKey()\fP 
.RE
.PP

.PP
Definition at line 1026 of file klineedit.cpp.
.SS "bool KLineEdit::trapReturnKey () const"
.PP
\fBReturns:\fP
.RS 4
\fCtrue\fP if keyevents of \fCKey_Return\fP or \fCKey_Enter\fP will be stopped or if they will be propagated.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetTrapReturnKey\fP () 
.RE
.PP

.PP
Definition at line 1031 of file klineedit.cpp.
.SS "bool KLineEdit::eventFilter (\fBQObject\fP *, \fBQEvent\fP *)\fC [virtual]\fP"
.PP
Re-implemented for internal reasons. 
.PP
API not affected. 
.PP
Definition at line 965 of file klineedit.cpp.
.PP
References QKeyEvent::accept(), KCursor::autoHideEventFilter(), QLineEdit::deselect(), QLineEdit::displayText(), QKeyEvent::key(), QLineEdit::returnPressed(), QLineEdit::setCursorPosition(), QKeyEvent::state(), and QLineEdit::text().
.SS "\fBKCompletionBox\fP * KLineEdit::completionBox (bool create = \fCtrue\fP)"
.PP
\fBReturns:\fP
.RS 4
the completion-box, that is used in completion mode \fBKGlobalSettings::CompletionPopup\fP. This method will create a completion-box if none is there, yet.
.RE
.PP
\fBParameters:\fP
.RS 4
\fIcreate\fP Set this to false if you don't want the box to be created i.e. to test if it is available. 
.RE
.PP

.PP
Definition at line 1218 of file klineedit.cpp.
.PP
References setCompletionBox().
.PP
Referenced by setCompletedItems().
.SS "void KLineEdit::setCompletionObject (\fBKCompletion\fP *, bool hsig = \fCtrue\fP)\fC [virtual]\fP"
.PP
Reimplemented for internal reasons, the API is not affected. 
.PP
Reimplemented from \fBKCompletionBase\fP.
.PP
Definition at line 1226 of file klineedit.cpp.
.PP
References KCompletionBase::compObj(), KCompletionBase::handleSignals(), setCompletedItems(), and KCompletionBase::setCompletionObject().
.SS "void KLineEdit::copy () const\fC [virtual]\fP"
.PP
Reimplemented for internal reasons, the API is not affected. 
.PP
Reimplemented from \fBQLineEdit\fP.
.PP
Definition at line 388 of file klineedit.cpp.
.PP
References QApplication::clipboard(), QLineEdit::copy(), QString::mid(), and QLineEdit::selectionChanged().
.PP
Referenced by keyPressEvent().
.SS "void KLineEdit::setEnableSqueezedText (bool enable)"
.PP
Enable text squeezing whenever the supplied text is too long. 
.PP
Only works for 'read-only' mode.
.PP
Note that once text squeezing is enabled, \fBQLineEdit::text()\fP and \fBQLineEdit::displayText()\fP return the squeezed text. If you want the original text, use \fBoriginalText\fP.
.PP
\fBSee also:\fP
.RS 4
\fBQLineEdit\fP 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 294 of file klineedit.cpp.
.PP
Referenced by setSqueezedText().
.SS "bool KLineEdit::isSqueezedTextEnabled () const"
.PP
Returns true if text squeezing is enabled. 
.PP
This is only valid when the widget is in read-only mode.
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 299 of file klineedit.cpp.
.SS "\fBQString\fP KLineEdit::originalText () const"
.PP
Returns the original text if text squeezing is enabled. 
.PP
If the widget is not in 'read-only' mode, this function returns the same thing as \fBQLineEdit::text()\fP.
.PP
\fBSee also:\fP
.RS 4
\fBQLineEdit\fP 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 1287 of file klineedit.cpp.
.PP
References QLineEdit::text().
.SS "void KLineEdit::setCompletionBox (\fBKCompletionBox\fP * box)"
.PP
Set the completion-box to be used in completion mode \fBKGlobalSettings::CompletionPopup\fP. 
.PP
This will do nothing if a completion-box already exists.
.PP
\fBParameters:\fP
.RS 4
\fIbox\fP The \fBKCompletionBox\fP to set 
.RE
.PP
\fBSince:\fP
.RS 4
3.4 
.RE
.PP

.PP
Definition at line 1041 of file klineedit.cpp.
.PP
References completionBoxActivated(), KCompletionBase::handleSignals(), and userCancelled().
.PP
Referenced by completionBox().
.SS "void KLineEdit::completionBoxActivated (const \fBQString\fP &)\fC [signal]\fP"
.PP
Emitted whenever the completion box is activated. 
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Referenced by setCompletionBox().
.SS "void KLineEdit::returnPressed (const \fBQString\fP &)\fC [signal]\fP"
.PP
Emitted when the user presses the return key. 
.PP
The argument is the current text. Note that this signal is \fInot\fP emitted if the widget's \fCEchoMode\fP is set to QLineEdit::EchoMode. 
.SS "void KLineEdit::completion (const \fBQString\fP &)\fC [signal]\fP"
.PP
Emitted when the completion key is pressed. 
.PP
Please note that this signal is \fInot\fP emitted if the completion mode is set to \fCCompletionNone\fP or \fCEchoMode\fP is \fInormal\fP. 
.PP
Referenced by keyPressEvent().
.SS "void KLineEdit::substringCompletion (const \fBQString\fP &)\fC [signal]\fP"
.PP
Emitted when the shortcut for substring completion is pressed. 
.PP
Referenced by keyPressEvent().
.SS "void KLineEdit::textRotation (\fBKCompletionBase::KeyBindingType\fP)\fC [signal]\fP"
.PP
Emitted when the text rotation key-bindings are pressed. 
.PP
The argument indicates which key-binding was pressed. In KLineEdit's case this can be either one of two values: PrevCompletionMatch or NextCompletionMatch. See \fBKCompletionBase::setKeyBinding\fP for details.
.PP
Note that this signal is \fInot\fP emitted if the completion mode is set to \fC\fBKGlobalSettings::CompletionNone\fP\fP or \fC\fBechoMode()\fP\fP is \fInot\fP normal. 
.PP
Referenced by keyPressEvent().
.SS "void KLineEdit::completionModeChanged (\fBKGlobalSettings::Completion\fP)\fC [signal]\fP"
.PP
Emitted when the user changed the completion mode by using the popupmenu. 
.PP
.SS "void KLineEdit::aboutToShowContextMenu (\fBQPopupMenu\fP * p)\fC [signal]\fP"
.PP
Emitted before the context menu is displayed. 
.PP
The signal allows you to add your own entries into the the context menu that is created on demand.
.PP
NOTE: Do not store the pointer to the \fBQPopupMenu\fP provided through since it is created and deleted on demand.
.PP
\fBParameters:\fP
.RS 4
\fIp\fP the context menu about to be displayed 
.RE
.PP

.PP
Referenced by createPopupMenu().
.SS "void KLineEdit::setReadOnly (bool)\fC [virtual, slot]\fP"
.PP
Re-implemented for internal reasons. 
.PP
API not changed. 
.PP
Reimplemented from \fBQLineEdit\fP.
.PP
Definition at line 259 of file klineedit.cpp.
.PP
References QLineEdit::setReadOnly(), setSqueezedText(), setText(), and QLineEdit::text().
.SS "void KLineEdit::rotateText (\fBKCompletionBase::KeyBindingType\fP type)\fC [slot]\fP"
.PP
Iterates through all possible matches of the completed text or the history list. 
.PP
This function simply iterates over all possible matches in case multimple matches are found as a result of a text completion request. It will have no effect if only a single match is found.
.PP
\fBParameters:\fP
.RS 4
\fItype\fP The key-binding invoked. 
.RE
.PP

.PP
Definition at line 199 of file klineedit.cpp.
.PP
References KCompletionBase::compObj(), QLineEdit::displayText(), QLineEdit::hasSelectedText(), QString::isNull(), KCompletion::nextMatch(), KCompletion::previousMatch(), and setCompletedText().
.PP
Referenced by keyPressEvent().
.SS "void KLineEdit::setCompletedText (const \fBQString\fP &)\fC [virtual, slot]\fP"
.PP
See \fBKCompletionBase::setCompletedText\fP. 
.PP
Implements \fBKCompletionBase\fP.
.PP
Definition at line 189 of file klineedit.cpp.
.PP
References KCompletionBase::completionMode().
.PP
Referenced by makeCompletion(), rotateText(), and setCompletedItems().
.SS "void KLineEdit::setCompletedItems (const \fBQStringList\fP & items)\fC [virtual, slot]\fP"
.PP
Sets \fCitems\fP into the completion-box if \fBcompletionMode()\fP is CompletionPopup. 
.PP
The popup will be shown immediately.
.PP
\fBParameters:\fP
.RS 4
\fIitems\fP list of completion matches to be shown in the completion box. 
.RE
.PP

.PP
Implements \fBKCompletionBase\fP.
.PP
Definition at line 1151 of file klineedit.cpp.
.PP
Referenced by keyPressEvent(), makeCompletion(), and setCompletionObject().
.SS "void KLineEdit::setCompletedItems (const \fBQStringList\fP & items, bool autoSuggest)\fC [slot]\fP"
.PP
Same as the above function except it allows you to temporarily turn off text completion in CompletionPopupAuto mode. 
.PP
TODO: Merge with above function in \fBKDE\fP 4. TODO: Does that make this or the above 
.PP
\fBDeprecated\fP
.RS 4
? 
.RE
.PP
\fBParameters:\fP
.RS 4
\fIitems\fP list of completion matches to be shown in the completion box. 
.br
\fIautoSuggest\fP true if you want automatic text completion (suggestion) enabled. 
.RE
.PP

.PP
Definition at line 1156 of file klineedit.cpp.
.PP
References KCompletionBox::cancelledText, completionBox(), QListBox::currentText(), QListBox::findItem(), QString::isEmpty(), QListBox::isSelected(), setCompletedText(), KCompletionBox::setItems(), setUserSelection(), and QLineEdit::text().
.SS "void KLineEdit::clear ()\fC [virtual, slot]\fP"
.PP
Reimplemented to workaround a buggy \fBQLineEdit::clear()\fP (changing the clipboard to the text we just had in the lineedit). 
.PP
Reimplemented from \fBQLineEdit\fP.
.PP
Reimplemented in \fBKIconViewSearchLine\fP.
.PP
Definition at line 1276 of file klineedit.cpp.
.PP
References setText().
.PP
Referenced by KIconViewSearchLine::clear(), and KEditListBox::clear().
.SS "void KLineEdit::setSqueezedText (const \fBQString\fP & text)\fC [slot]\fP"
.PP
Squeezes \fCtext\fP into the line edit. 
.PP
This can only be used with read-only line-edits. 
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 288 of file klineedit.cpp.
.PP
References setEnableSqueezedText(), and setText().
.PP
Referenced by resizeEvent(), setReadOnly(), and setText().
.SS "void KLineEdit::setText (const \fBQString\fP &)\fC [virtual, slot]\fP"
.PP
Re-implemented to enable text squeezing. 
.PP
API is not affected. 
.PP
Reimplemented from \fBQLineEdit\fP.
.PP
Definition at line 304 of file klineedit.cpp.
.PP
References QLineEdit::isReadOnly(), setSqueezedText(), and QLineEdit::setText().
.PP
Referenced by clear(), KToolBar::insertLined(), KLineEditDlg::KLineEditDlg(), KToolBar::setLinedText(), setReadOnly(), setSqueezedText(), setURL(), KLineEditDlg::slotClear(), and userCancelled().
.SS "void KLineEdit::makeCompletion (const \fBQString\fP &)\fC [protected, virtual, slot]\fP"
.PP
Completes the remaining text with a matching one from a given list. 
.PP
Definition at line 220 of file klineedit.cpp.
.PP
References KCompletion::allMatches(), KCompletionBase::completionMode(), KCompletionBase::compObj(), QString::isNull(), KCompletion::makeCompletion(), setCompletedItems(), setCompletedText(), and setUserSelection().
.PP
Referenced by keyPressEvent().
.SS "void KLineEdit::slotAboutToShow ()\fC [inline, protected, slot]\fP"
.PP
\fBDeprecated\fP
.RS 4
. Will be removed in the next major release! 
.RE
.PP

.PP
Definition at line 467 of file klineedit.h.
.SS "void KLineEdit::slotCancelled ()\fC [inline, protected, slot]\fP"
.PP
\fBDeprecated\fP
.RS 4
. Will be removed in the next major release! 
.RE
.PP

.PP
Definition at line 472 of file klineedit.h.
.SS "void KLineEdit::userCancelled (const \fBQString\fP & cancelText)\fC [protected, slot]\fP"
.PP
Resets the current displayed text. 
.PP
Call this function to revert a text completion if the user cancels the request. Mostly applies to popup completions. 
.PP
Definition at line 1059 of file klineedit.cpp.
.PP
References KCompletionBase::completionMode(), QLineEdit::deselect(), QLineEdit::hasSelectedText(), QString::length(), setText(), and QLineEdit::text().
.PP
Referenced by setCompletionBox().
.SS "void KLineEdit::resizeEvent (\fBQResizeEvent\fP *)\fC [protected, virtual]\fP"
.PP
Re-implemented for internal reasons. 
.PP
API not affected.
.PP
See QLineEdit::resizeEvent(). 
.PP
Definition at line 418 of file klineedit.cpp.
.PP
References setSqueezedText().
.SS "void KLineEdit::keyPressEvent (\fBQKeyEvent\fP *)\fC [protected, virtual]\fP"
.PP
Re-implemented for internal reasons. 
.PP
API not affected.
.PP
See \fBQLineEdit::keyPressEvent()\fP. 
.PP
Reimplemented from \fBQLineEdit\fP.
.PP
Reimplemented in \fBKListViewLineEdit\fP, and \fBKRestrictedLine\fP.
.PP
Definition at line 426 of file klineedit.cpp.
.PP
References QLineEdit::backspace(), QApplication::clipboard(), completion(), KCompletionBase::completionMode(), KCompletionBase::compObj(), KShortcut::contains(), copy(), QLineEdit::cursorPosition(), QLineEdit::cursorWordBackward(), QLineEdit::cursorWordForward(), QLineEdit::cut(), QLineEdit::del(), QLineEdit::deselect(), QLineEdit::echoMode(), KCompletionBase::emitSignals(), QLineEdit::end(), KCompletionBase::getKeyBindings(), KCompletionBase::handleSignals(), QLineEdit::hasSelectedText(), QLineEdit::home(), QLineEdit::insert(), QString::isEmpty(), QLineEdit::keyPressEvent(), QString::length(), makeCompletion(), QLineEdit::paste(), QLineEdit::redo(), rotateText(), QLineEdit::selectedText(), setCompletedItems(), QLineEdit::setCursorPosition(), setUserSelection(), KStdAccel::shortcut(), substringCompletion(), QLineEdit::text(), textRotation(), QLineEdit::undo(), and QString::unicode().
.PP
Referenced by KListViewLineEdit::keyPressEvent().
.SS "void KLineEdit::mousePressEvent (\fBQMouseEvent\fP *)\fC [protected, virtual]\fP"
.PP
Re-implemented for internal reasons. 
.PP
API not affected.
.PP
See QLineEdit::mousePressEvent(). 
.PP
Definition at line 815 of file klineedit.cpp.
.PP
References QLineEdit::selectAll().
.SS "void KLineEdit::mouseDoubleClickEvent (\fBQMouseEvent\fP *)\fC [protected, virtual]\fP"
.PP
Re-implemented for internal reasons. 
.PP
API not affected.
.PP
See \fBQWidget::mouseDoubleClickEvent()\fP. 
.PP
Definition at line 804 of file klineedit.cpp.
.PP
References QTimer::singleShot().
.SS "void KLineEdit::contextMenuEvent (\fBQContextMenuEvent\fP *)\fC [protected, virtual]\fP"
.PP
Re-implemented for internal reasons. 
.PP
API not affected.
.PP
See QLineEdit::contextMenuEvent(). 
.PP
Definition at line 831 of file klineedit.cpp.
.SS "\fBQPopupMenu\fP * KLineEdit::createPopupMenu ()\fC [protected, virtual]\fP"
.PP
Re-implemented for internal reasons. 
.PP
API not affected.
.PP
See \fBQLineEdit::createPopupMenu()\fP. 
.PP
Reimplemented from \fBQLineEdit\fP.
.PP
Reimplemented in \fBKListViewSearchLine\fP.
.PP
Definition at line 837 of file klineedit.cpp.
.PP
References aboutToShowContextMenu(), QPopupMenu::changeItem(), KCompletionBase::completionMode(), KCompletionBase::compObj(), QLineEdit::createPopupMenu(), QPopupMenu::idAt(), QPopupMenu::insertItem(), QPopupMenu::insertSeparator(), QLineEdit::isReadOnly(), QPopupMenu::setAccel(), QPopupMenu::setItemChecked(), and QPopupMenu::text().
.PP
Referenced by KListViewSearchLine::createPopupMenu().
.SS "void KLineEdit::dropEvent (\fBQDropEvent\fP *)\fC [protected, virtual]\fP"
.PP
Re-implemented to handle URI drops. 
.PP
See QLineEdit::dropEvent(). 
.PP
Definition at line 942 of file klineedit.cpp.
.PP
References QValueList::begin(), KURLDrag::decode(), QValueList::end(), QString::isEmpty(), QString::length(), and QLineEdit::text().
.SS "void KLineEdit::setUserSelection (bool userSelection)\fC [protected]\fP"
.PP
Sets the widget in userSelection mode or in automatic completion selection mode. 
.PP
This changes the colors of selections. 
.PP
Definition at line 1247 of file klineedit.cpp.
.PP
References QPalette::color(), and QPalette::setColor().
.PP
Referenced by keyPressEvent(), makeCompletion(), and setCompletedItems().
.SS "void KLineEdit::create (WId = \fC0\fP, bool initializeWindow = \fCtrue\fP, bool destroyOldWindow = \fCtrue\fP)\fC [protected, virtual]\fP"
.PP
Reimplemented for internal reasons, the API is not affected. 
.PP
Definition at line 1241 of file klineedit.cpp.
.PP
References KCursor::setAutoHideCursor().
.SS "void KLineEdit::focusInEvent (\fBQFocusEvent\fP *)\fC [protected, virtual]\fP"
.PP
Re-implemented for internal reasons. 
.PP
API not affected.
.PP
See QLineEdit::focusInEvent(). 
.PP
Definition at line 1295 of file klineedit.cpp.
.PP
References QLineEdit::hasSelectedText(), and QLineEdit::inputMask().
.SS "bool KLineEdit::autoSuggest () const\fC [protected]\fP"
.PP
Whether in current state text should be auto-suggested 
.PP
\fBSince:\fP
.RS 4
3.4. 
.RE
.PP

.PP
Definition at line 1304 of file klineedit.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
