.TH "KComboBox" 3 "28 Jan 2004" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KComboBox \- A combined button, line-edit and a popup list widget. An enhanced combo box.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kcombobox.h>\fP
.PP
Inherits \fBQComboBox\fP, and \fBKCompletionBase\fP.
.PP
Inherited by \fBKFontCombo\fP, \fBKHistoryCombo\fP, and \fBKURLComboBox\fP.
.PP
.SS "Public Slots"

.in +1c
.ti -1c
.RI "void \fBrotateText\fP (\fBKCompletionBase::KeyBindingType\fP)"
.br
.RI "\fIIterates through all possible matches of the completed text or the history list. \fP"
.ti -1c
.RI "virtual void \fBsetCompletedText\fP (const  \fBQString\fP &)"
.br
.RI "\fISets the completed text in the line-edit appropriately. \fP"
.ti -1c
.RI "void \fBsetCompletedItems\fP (const  \fBQStringList\fP &items)"
.br
.RI "\fISets \fCitems\fP into the completion-box if \fBcompletionMode\fP() is CompletionPopup. \fP"
.ti -1c
.RI "void \fBsetCurrentItem\fP (const  \fBQString\fP &item, bool insert=false, int index=-1)"
.br
.RI "\fISelects the first item that matches \fCitem\fP. \fP"
.ti -1c
.RI "void \fBsetCurrentItem\fP (int index)"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBreturnPressed\fP ()"
.br
.RI "\fIEmitted when the user presses the Enter key. \fP"
.ti -1c
.RI "void \fBreturnPressed\fP (const  \fBQString\fP &)"
.br
.RI "\fIEmitted when the user presses the Enter key. \fP"
.ti -1c
.RI "void \fBcompletion\fP (const  \fBQString\fP &)"
.br
.RI "\fIThis signal is emitted when the completion key is pressed. \fP"
.ti -1c
.RI "void \fBsubstringCompletion\fP (const  \fBQString\fP &)"
.br
.RI "\fIEmitted when the shortcut for substring completion is pressed. \fP"
.ti -1c
.RI "void \fBtextRotation\fP (\fBKCompletionBase::KeyBindingType\fP)"
.br
.RI "\fIEmitted when the text rotation key-bindings are pressed. \fP"
.ti -1c
.RI "void \fBcompletionModeChanged\fP (\fBKGlobalSettings::Completion\fP)"
.br
.RI "\fIEmitted when the user changed the completion mode by using the popupmenu. \fP"
.ti -1c
.RI "void \fBaboutToShowContextMenu\fP (\fBQPopupMenu\fP *)"
.br
.RI "\fIEmitted before the context menu is displayed. \fP"
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKComboBox\fP (\fBQWidget\fP *parent=0, const  char *name=0)"
.br
.RI "\fIConstructs a read-only or rather select-only combo box with a parent object and a name. \fP"
.ti -1c
.RI "\fBKComboBox\fP (bool rw, \fBQWidget\fP *parent=0, const  char *name=0)"
.br
.RI "\fIConstructs a 'read-write' or 'read-only' combo box depending on the value of the first argument( \fCrw\fP ) with a parent, a name. \fP"
.ti -1c
.RI "virtual \fB~KComboBox\fP ()"
.br
.RI "\fIDestructor. \fP"
.ti -1c
.RI "void \fBsetEditURL\fP (const  \fBKURL\fP &url)"
.br
.RI "\fISets \fCurl\fP into the edit field of the combobox. \fP"
.ti -1c
.RI "void \fBinsertURL\fP (const  \fBKURL\fP &url, int index=-1)"
.br
.RI "\fIInserts \fCurl\fP at position \fCindex\fP into the combobox. \fP"
.ti -1c
.RI "void \fBinsertURL\fP (const  \fBQPixmap\fP &\fBpixmap\fP, const  \fBKURL\fP &url, int index=-1)"
.br
.RI "\fIInserts \fCurl\fP with the pixmap &p pixmap at position \fCindex\fP into the combobox. \fP"
.ti -1c
.RI "void \fBchangeURL\fP (const  \fBKURL\fP &url, int index)"
.br
.RI "\fIReplaces the item at position \fCindex\fP with \fCurl\fP. \fP"
.ti -1c
.RI "void \fBchangeURL\fP (const  \fBQPixmap\fP &\fBpixmap\fP, const  \fBKURL\fP &url, int index)"
.br
.RI "\fIReplaces the item at position \fCindex\fP with \fCurl\fP and pixmap \fCpixmap\fP. \fP"
.ti -1c
.RI "int \fBcursorPosition\fP () const "
.br
.RI "\fIReturns the current cursor position. \fP"
.ti -1c
.RI "virtual void \fBsetAutoCompletion\fP (bool autocomplete)"
.br
.RI "\fIRe-implemented from \fBQComboBox\fP. \fP"
.ti -1c
.RI "bool \fBautoCompletion\fP () const "
.br
.RI "\fIRe-implemented from \fBQComboBox\fP. \fP"
.ti -1c
.RI "virtual void \fBsetContextMenuEnabled\fP (bool showMenu)"
.br
.RI "\fIEnables or disable the popup (context) menu. \fP"
.ti -1c
.RI "bool \fBisContextMenuEnabled\fP () const "
.br
.RI "\fIReturns \fCtrue\fP when the context menu is enabled. \fP"
.ti -1c
.RI "void \fBsetURLDropsEnabled\fP (bool enable)"
.br
.RI "\fIEnables/Disables handling of URL drops. \fP"
.ti -1c
.RI "bool \fBisURLDropsEnabled\fP () const "
.br
.RI "\fIReturns \fCtrue\fP when decoded URL drops are enabled. \fP"
.ti -1c
.RI "bool \fBcontains\fP (const  \fBQString\fP &\fBtext\fP) const "
.br
.RI "\fIConvenience method which iterates over all items and checks if any of them is equal to \fCtext\fP. \fP"
.ti -1c
.RI "void \fBsetTrapReturnKey\fP (bool trap)"
.br
.RI "\fIBy default, KComboBox recognizes Key_Return and Key_Enter and emits the \fBreturnPressed\fP() signals, but it also lets the event pass, for example causing a dialog's default-button to be called. \fP"
.ti -1c
.RI "bool \fBtrapReturnKey\fP () const "
.br
.ti -1c
.RI "virtual bool \fBeventFilter\fP (\fBQObject\fP *, \fBQEvent\fP *)"
.br
.RI "\fIRe-implemented for internal reasons. \fP"
.ti -1c
.RI "\fBKCompletionBox\fP * \fBcompletionBox\fP (bool create=true)"
.br
.ti -1c
.RI "virtual void \fBsetLineEdit\fP (\fBQLineEdit\fP *)"
.br
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "virtual void \fBitemSelected\fP (\fBQListBoxItem\fP *)"
.br
.RI "\fI\fBThis class or method is obsolete, it is provided for compatibility only.\fP. \fP"
.ti -1c
.RI "virtual void \fBmakeCompletion\fP (const  \fBQString\fP &)"
.br
.RI "\fICompletes text according to the completion mode. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBsetCompletedText\fP (const  \fBQString\fP &, bool)"
.br
.ti -1c
.RI "virtual void \fBcreate\fP (WId=0, bool initializeWindow=true, bool destroyOldWindow=true)"
.br
.RI "\fIReimplemented for internal reasons, the API is not affected. \fP"
.ti -1c
.RI "virtual void \fBwheelEvent\fP (\fBQWheelEvent\fP *ev)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
A combined button, line-edit and a popup list widget. An enhanced combo box. 

\fB Detail\fP
.PP
\fB This widget inherits from \fBQComboBox\fP and implements the following additional functionalities: a completion object that provides both automatic and manual text completion as well as text rotation features, configurable key-bindings to activate these features, and a popup-menu item that can be used to allow the user to change the text completion mode on the fly.\fP
.PP
\fB To support these new features KComboBox emits a few additional signals such as \fBcompletion\fP( const \fBQString\fP& ) and \fBtextRotation\fP( KeyBindgingType ). The completion signal can be connected to a slot that will assist the user in filling out the remaining text while the rotation signal can be used to traverse through all possible matches whenever text completion results in multiple matches. Additionally, a \fBreturnPressed\fP() and a \fBreturnPressed\fP( const \fBQString\fP& ) signals are emitted when the user presses the Enter/Return key.\fP
.PP
\fB KCombobox by default creates a completion object when you invoke the \fBcompletionObject\fP( bool ) member function for the first time or explicitly use \fBsetCompletionObject\fP( KCompletion*, bool ) to assign your own completion object. Additionally, to make this widget more functional, KComboBox will by default handle text rotation and completion events internally whenever a completion object is created through either one of the methods mentioned above. If you do not need this functionality, simply use \fBKCompletionBase::setHandleSignals\fP(bool) or alternatively set the boolean parameter in the \fCsetCompletionObject\fP call to FALSE.\fP
.PP
\fB The default key-bindings for completion and rotation is determined from the global settings in \fBKStdAccel\fP. These values, however, can be overriden locally by invoking \fBKCompletionBase::setKeyBinding\fP(). The values can easily be reverted back to the default setting, by simply calling \fBuseGlobalSettings\fP(). An alternate method would be to default individual key-bindings by usning \fBsetKeyBinding\fP() with the default second argument.\fP
.PP
\fB In non-editable (select-only) mode only one completion mode, \fCCompletionAuto\fP, is available. All the other modes are simply ignored. Moreover, the CompletionAuto mode, unlike in the read-write mode, works by matching any typed key with the first letter of entries in the combobox.\fP
.PP
\fB \fP
.PP
\fB\fB Usage\fP\fP
.PP
\fB\fB To enable the basic completion feature:\fP\fP
.PP
\fB\fB 
.PP
.nf

 KComboBox *combo = new KComboBox( true, this, 'mywidget' );
 \fBKCompletion\fP *comp = combo->\fBcompletionObject()\fP;
 // Connect to the return pressed signal - optional
 connect(combo,SIGNAL(\fBreturnPressed(const QString&)\fP),comp,SLOT(addItem(const QString&));
.PP
\fP\fP
.PP
\fB\fB
.PP
.nf
 // Provide the to be completed strings. Note that those are separate from the combo's
 // contents.
 comp->insertItems( someQStringList );
 
.PP
\fP\fP
.PP
\fB\fB To use your own completion object:\fP\fP
.PP
\fB\fB 
.PP
.nf

 KComboBox *combo = new KComboBox( this,'mywidget' );
 \fBKURLCompletion\fP *comp = new KURLCompletion();
 combo->setCompletionObject( comp );
 // Connect to the return pressed signal - optional
 connect(combo,SIGNAL(\fBreturnPressed(const QString&)\fP),comp,SLOT(addItem(const QString&));
 
.PP
\fP\fP
.PP
\fB\fB Note that you have to either delete the allocated completion object when you don't need it anymore, or call setAutoDeleteCompletionObject( true );\fP\fP
.PP
\fB\fB Miscellaneous function calls:\fP\fP
.PP
\fB\fB 
.PP
.nf

 // Tell the widget not to handle completion and rotation
 combo->setHandleSignals( false );
 // Set your own completion key for manual completions.
 combo->setKeyBinding( KCompletionBase::TextCompletion, Qt::End );
 // Hide the context (popup) menu
 combo->setContextMenuEnabled( false );
 
.PP
\fP\fP
.PP
\fB\fB\fP\fP
.PP
\fB\fB
.PP
\fBAuthor:\fP
.RS 4
Dawit Alemayehu <adawit@kde.org> 
.RE
.PP
\fP\fP
.PP
Definition at line 121 of file kcombobox.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KComboBox::KComboBox (\fBQWidget\fP * parent = 0, const char * name = 0)"
.PP
Constructs a read-only or rather select-only combo box with a parent object and a name. \fBParameters:\fP
.RS 4
\fIparent\fP The parent object of this widget 
.br
\fIname\fP The name of this widget 
.RE
.PP
Definition at line 60 of file kcombobox.cpp.
.PP
References KStdAccel::name().
.SS "KComboBox::KComboBox (bool rw, \fBQWidget\fP * parent = 0, const char * name = 0)"
.PP
Constructs a 'read-write' or 'read-only' combo box depending on the value of the first argument( \fCrw\fP ) with a parent, a name. \fBParameters:\fP
.RS 4
\fIrw\fP When \fCtrue\fP, widget will be editable. 
.br
\fIparent\fP The parent object of this widget. 
.br
\fIname\fP The name of this widget. 
.RE
.PP
Definition at line 66 of file kcombobox.cpp.
.PP
References KStdAccel::name(), and QComboBox::setLineEdit().
.SS "KComboBox::~\fBKComboBox\fP ()\fC [virtual]\fP"
.PP
Destructor. Definition at line 78 of file kcombobox.cpp.
.SH "Member Function Documentation"
.PP 
.SS "void KComboBox::setEditURL (const \fBKURL\fP & url)"
.PP
Sets \fCurl\fP into the edit field of the combobox. It uses \fBKURL::prettyURL\fP() so that the url is properly decoded for displaying. Definition at line 207 of file kcombobox.cpp.
.PP
References KURL::prettyURL(), and QComboBox::setEditText().
.SS "void KComboBox::insertURL (const \fBKURL\fP & url, int index = -1)"
.PP
Inserts \fCurl\fP at position \fCindex\fP into the combobox. The item will be appended if \fCindex\fP is negative. \fBKURL::prettyURL\fP() is used so that the url is properly decoded for displaying. Definition at line 212 of file kcombobox.cpp.
.PP
References QComboBox::insertItem(), and KURL::prettyURL().
.SS "void KComboBox::insertURL (const \fBQPixmap\fP & pixmap, const \fBKURL\fP & url, int index = -1)"
.PP
Inserts \fCurl\fP with the pixmap &p pixmap at position \fCindex\fP into the combobox. The item will be appended if \fCindex\fP is negative. \fBKURL::prettyURL\fP() is used so that the url is properly decoded for displaying. Definition at line 217 of file kcombobox.cpp.
.PP
References QComboBox::insertItem(), and KURL::prettyURL().
.SS "void KComboBox::changeURL (const \fBKURL\fP & url, int index)"
.PP
Replaces the item at position \fCindex\fP with \fCurl\fP. \fBKURL::prettyURL\fP() is used so that the url is properly decoded for displaying. Definition at line 222 of file kcombobox.cpp.
.PP
References QComboBox::changeItem(), and KURL::prettyURL().
.SS "void KComboBox::changeURL (const \fBQPixmap\fP & pixmap, const \fBKURL\fP & url, int index)"
.PP
Replaces the item at position \fCindex\fP with \fCurl\fP and pixmap \fCpixmap\fP. \fBKURL::prettyURL\fP() is used so that the url is properly decoded for displaying. Definition at line 227 of file kcombobox.cpp.
.PP
References QComboBox::changeItem(), and KURL::prettyURL().
.SS "int KComboBox::cursorPosition () const\fC [inline]\fP"
.PP
Returns the current cursor position. This method always returns a -1 if the combo-box is \fInot\fP editable (read-write).
.PP
\fBReturns:\fP
.RS 4
Current cursor position. 
.RE
.PP
Definition at line 199 of file kcombobox.h.
.PP
References QComboBox::lineEdit().
.SS "void KComboBox::setAutoCompletion (bool autocomplete)\fC [virtual]\fP"
.PP
Re-implemented from \fBQComboBox\fP. If \fCtrue\fP, the completion mode will be set to automatic. Otherwise, it is defaulted to the global setting. This method has been replaced by the more comprehensive \fBsetCompletionMode\fP().
.PP
\fBParameters:\fP
.RS 4
\fIautocomplete\fP Flag to enable/disable automatic completion mode. 
.RE
.PP
Reimplemented from \fBQComboBox\fP.
.PP
Definition at line 117 of file kcombobox.cpp.
.PP
References KGlobalSettings::CompletionAuto, KGlobalSettings::completionMode(), and KCompletionBase::setCompletionMode().
.SS "bool KComboBox::autoCompletion () const\fC [inline]\fP"
.PP
Re-implemented from \fBQComboBox\fP. Returns \fCtrue\fP if the current completion mode is set to automatic. See its more comprehensive replacement \fBcompletionMode\fP().
.PP
\fBReturns:\fP
.RS 4
\fCtrue\fP when completion mode is automatic. 
.RE
.PP
Reimplemented from \fBQComboBox\fP.
.PP
Definition at line 222 of file kcombobox.h.
.PP
References KGlobalSettings::CompletionAuto, and KCompletionBase::completionMode().
.SS "void KComboBox::setContextMenuEnabled (bool showMenu)\fC [virtual]\fP"
.PP
Enables or disable the popup (context) menu. This method only works if this widget is editable, i.e. read-write and allows you to enable/disable the context menu. It does nothing if invoked for a none-editable combo-box. Note that by default the mode changer item is made visiable whenever the context menu is enabled. Use \fBhideModechanger\fP() if you want to hide this item. Also by default, the context menu is created if this widget is editable. Call this function with the argument set to false to disable the popup menu.
.PP
\fBParameters:\fP
.RS 4
\fIshowMenu\fP If \fCtrue\fP, show the context menu. 
.br
\fIshowMode\fP If \fCtrue\fP, show the mode changer. 
.RE
.PP
Definition at line 134 of file kcombobox.cpp.
.SS "bool KComboBox::isContextMenuEnabled () const\fC [inline]\fP"
.PP
Returns \fCtrue\fP when the context menu is enabled. Definition at line 247 of file kcombobox.h.
.SS "void KComboBox::setURLDropsEnabled (bool enable)"
.PP
Enables/Disables handling of URL drops. If enabled and the user drops an URL, the decoded URL will be inserted. Otherwise the default behaviour of \fBQComboBox\fP is used, which inserts the encoded URL.
.PP
\fBParameters:\fP
.RS 4
\fIenable\fP If \fCtrue\fP, insert decoded URLs 
.RE
.PP
Definition at line 141 of file kcombobox.cpp.
.SS "bool KComboBox::isURLDropsEnabled () const"
.PP
Returns \fCtrue\fP when decoded URL drops are enabled. Definition at line 147 of file kcombobox.cpp.
.SS "bool KComboBox::contains (const \fBQString\fP & text) const"
.PP
Convenience method which iterates over all items and checks if any of them is equal to \fCtext\fP. If \fCtext\fP is an empty string, \fCfalse\fP is returned.
.PP
\fBReturns:\fP
.RS 4
\fCtrue\fP if an item with the string \fCtext\fP is in the combobox. 
.RE
.PP
Definition at line 104 of file kcombobox.cpp.
.PP
References QComboBox::count(), QString::isEmpty(), and QComboBox::text().
.PP
Referenced by KHistoryCombo::addToHistory().
.SS "void KComboBox::setTrapReturnKey (bool trap)"
.PP
By default, KComboBox recognizes Key_Return and Key_Enter and emits the \fBreturnPressed\fP() signals, but it also lets the event pass, for example causing a dialog's default-button to be called. Call this method with \fCtrap\fP equal to true to make KComboBox stop these events. The signals will still be emitted of course.
.PP
Only affects read-writable comboboxes.
.PP
\fBSee also:\fP
.RS 4
\fBsetTrapReturnKey()\fP 
.RE
.PP
Definition at line 193 of file kcombobox.cpp.
.SS "bool KComboBox::trapReturnKey () const"
.PP
\fBReturns:\fP
.RS 4
\fCtrue\fP if keyevents of Key_Return or Key_Enter will be stopped or if they will be propagated.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetTrapReturnKey\fP () 
.RE
.PP
Definition at line 201 of file kcombobox.cpp.
.SS "bool KComboBox::eventFilter (\fBQObject\fP *, \fBQEvent\fP *)\fC [virtual]\fP"
.PP
Re-implemented for internal reasons. API not affected. Definition at line 188 of file kcombobox.cpp.
.SS "\fBKCompletionBox\fP * KComboBox::completionBox (bool create = true)"
.PP
\fBReturns:\fP
.RS 4
the completion-box, that is used in completion mode \fBKGlobalSettings::CompletionPopup\fP and \fBKGlobalSettings::CompletionPopupAuto\fP. This method will create a completion-box by calling \fBKLineEdit::completionBox\fP, 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
Definition at line 238 of file kcombobox.cpp.
.PP
References KStdAction::create().
.SS "void KComboBox::returnPressed ()\fC [signal]\fP"
.PP
Emitted when the user presses the Enter key. Note that this signal is only emitted if this widget is editable. 
.SS "void KComboBox::returnPressed (const \fBQString\fP &)\fC [signal]\fP"
.PP
Emitted when the user presses the Enter key. The argument is the current text being edited. This signal is just like \fBreturnPressed\fP() except it contains the current text as its argument.
.PP
Note that this signal is only emitted if this widget is editable. 
.SS "void KComboBox::completion (const \fBQString\fP &)\fC [signal]\fP"
.PP
This signal is emitted when the completion key is pressed. The argument is the current text being edited.
.PP
Note that this signal is \fInot\fP available if this widget is non-editable or the completion mode is set to \fC\fBKGlobalSettings::CompletionNone\fP\fP. 
.SS "void KComboBox::substringCompletion (const \fBQString\fP &)\fC [signal]\fP"
.PP
Emitted when the shortcut for substring completion is pressed. 
.SS "void KComboBox::textRotation (\fBKCompletionBase::KeyBindingType\fP)\fC [signal]\fP"
.PP
Emitted when the text rotation key-bindings are pressed. The argument indicates which key-binding was pressed. In this case this can be either one of four values: \fCPrevCompletionMatch\fP, \fCNextCompletionMatch\fP, \fCRotateUp\fP or \fCRotateDown\fP. See \fBKCompletionBase::setKeyBinding\fP() for details.
.PP
Note that this signal is \fINOT\fP emitted if the completion mode is set to CompletionNone. 
.SS "void KComboBox::completionModeChanged (\fBKGlobalSettings::Completion\fP)\fC [signal]\fP"
.PP
Emitted when the user changed the completion mode by using the popupmenu. 
.SS "void KComboBox::aboutToShowContextMenu (\fBQPopupMenu\fP *)\fC [signal]\fP"
.PP
Emitted before the context menu is displayed. 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
\fIthe\fP context menu about to be displayed 
.RE
.PP

.SS "void KComboBox::rotateText (\fBKCompletionBase::KeyBindingType\fP)\fC [slot]\fP"
.PP
Iterates through all possible matches of the completed text or the history list. Depending on the value of the argument, this function either iterates through the history list of this widget or the all possible matches in whenever multiple matches result from a text completion request. Note that the all-possible-match iteration will not work if there are no previous matches, i.e. no text has been completed and the *nix shell history list rotation is only available if the insertion policy for this widget is set either \fCQComobBox::AtTop\fP or \fCQComboBox::AtBottom\fP. For other insertion modes whatever has been typed by the user when the rotation event was initiated will be lost.
.PP
\fBParameters:\fP
.RS 4
\fItype\fP The key-binding invoked. 
.RE
.PP
Definition at line 181 of file kcombobox.cpp.
.SS "void KComboBox::setCompletedText (const \fBQString\fP &)\fC [virtual, slot]\fP"
.PP
Sets the completed text in the line-edit appropriately. This function is an implementation for \fBKCompletionBase::setCompletedText\fP. Implements \fBKCompletionBase\fP.
.PP
Definition at line 159 of file kcombobox.cpp.
.SS "void KComboBox::setCompletedItems (const \fBQStringList\fP & items)\fC [virtual, slot]\fP"
.PP
Sets \fCitems\fP into the completion-box if \fBcompletionMode\fP() is CompletionPopup. The popup will be shown immediately. Implements \fBKCompletionBase\fP.
.PP
Definition at line 232 of file kcombobox.cpp.
.SS "void KComboBox::setCurrentItem (const \fBQString\fP & item, bool insert = false, int index = -1)\fC [slot]\fP"
.PP
Selects the first item that matches \fCitem\fP. If there is no such item, it is inserted at position \fCindex\fP if \fCinsert\fP is true. Otherwise, no item is selected. Definition at line 315 of file kcombobox.cpp.
.PP
References QComboBox::count(), KStdAccel::insert(), QComboBox::insertItem(), and QComboBox::text().
.PP
Referenced by KHistoryCombo::addToHistory(), makeCompletion(), and KFontCombo::setCurrentFont().
.SS "virtual void KComboBox::itemSelected (\fBQListBoxItem\fP *)\fC [inline, protected, virtual, slot]\fP"
.PP
\fBThis class or method is obsolete, it is provided for compatibility only.\fP. Definition at line 441 of file kcombobox.h.
.SS "void KComboBox::makeCompletion (const \fBQString\fP &)\fC [protected, virtual, slot]\fP"
.PP
Completes text according to the completion mode. Note: this method is \fCnot\fP invoked if the completion mode is set to CompletionNone. Also if the mode is set to \fCCompletionShell\fP and multiple matches are found, this method will complete the text to the first match with a beep to inidicate that there are more matches. Then any successive completion key event iterates through the remaining matches. This way the rotation functionality is left to iterate through the list as usual. Definition at line 165 of file kcombobox.cpp.
.PP
References QString::isNull(), QComboBox::listBox(), and setCurrentItem().
.SS "void KComboBox::create (WId = 0, bool initializeWindow = true, bool destroyOldWindow = true)\fC [protected, virtual]\fP"
.PP
Reimplemented for internal reasons, the API is not affected. Definition at line 246 of file kcombobox.cpp.
.PP
References QComboBox::lineEdit(), and KCursor::setAutoHideCursor().

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