KDEUI
kcombobox.cpp
Go to the documentation of this file.
379 const KCompletionBase *base = static_cast<const KCompletionBase*>( static_cast<const KLineEdit*>( sender() ));
391 // If a style needs this, then we'll need to call QComboBox::setEditable and then setLineEdit again
void substringCompletion(const QString &)
Emitted when the shortcut for substring completion is pressed.
virtual bool eventFilter(QObject *, QEvent *)
Re-implemented for internal reasons.
Definition: kcombobox.cpp:183
KComboBox(QWidget *parent=0)
Constructs a read-only or rather select-only combo box with a parent object and a name.
Definition: kcombobox.cpp:57
virtual void setCompletedText(const QString &)
Sets the completed text in the line-edit appropriately.
Definition: kcombobox.cpp:156
void changeUrl(int index, const KUrl &url)
Replaces the item at position index with url.
Definition: kcombobox.cpp:229
void aboutToShowContextMenu(QMenu *p)
Emitted before the context menu is displayed.
bool contains(const QString &text) const
Convenience method which iterates over all items and checks if any of them is equal to text.
Definition: kcombobox.cpp:88
void setCompletedItems(const QStringList &items, bool autosubject=true)
Sets items into the completion-box if completionMode() is CompletionPopup.
Definition: kcombobox.cpp:240
virtual void makeCompletion(const QString &)
Completes text according to the completion mode.
Definition: kcombobox.cpp:162
void setEditUrl(const KUrl &url)
Sets url into the edit field of the combobox.
Definition: kcombobox.cpp:204
virtual void setContextMenuEnabled(bool showMenu)
Enables or disable the popup (context) menu.
Definition: kcombobox.cpp:130
void setCurrentItem(const QString &item, bool insert=false, int index=-1)
Selects the first item that matches item.
Definition: kcombobox.cpp:347
void textRotation(KCompletionBase::KeyBindingType)
Emitted when the text rotation key-bindings are pressed.
void setTrapReturnKey(bool trap)
By default, KComboBox recognizes Key_Return and Key_Enter and emits the returnPressed() signals,...
Definition: kcombobox.cpp:188
void setEditable(bool editable)
"Re-implemented" so that setEditable(true) creates a KLineEdit instead of QLineEdit.
Definition: kcombobox.cpp:386
void completionModeChanged(KGlobalSettings::Completion)
Emitted whenever the completion mode is changed by the user through the context menu.
virtual void create(WId=0, bool initializeWindow=true, bool destroyOldWindow=true)
Reimplemented for internal reasons, the API is not affected.
Definition: kcombobox.cpp:254
void setUrlDropsEnabled(bool enable)
Enables/Disables handling of URL drops.
Definition: kcombobox.cpp:138
KCompletionBox * completionBox(bool create=true)
Definition: kcombobox.cpp:246
void insertUrl(int index, const KUrl &url)
Inserts url at position index into the combobox.
Definition: kcombobox.cpp:219
virtual void setAutoCompletion(bool autocomplete)
Re-implemented from QComboBox.
Definition: kcombobox.cpp:107
void rotateText(KCompletionBase::KeyBindingType type)
Iterates through all possible matches of the completed text or the history list.
Definition: kcombobox.cpp:176
virtual void setLineEdit(QLineEdit *)
Re-implemented for internal reasons.
Definition: kcombobox.cpp:282
An abstract base class for adding a completion feature into widgets.
Definition: kcompletion.h:646
void setDelegate(KCompletionBase *delegate)
Sets or removes the delegation object.
Definition: kcompletionbase.cpp:78
KGlobalSettings::Completion completionMode() const
Returns the current completion mode.
Definition: kcompletionbase.cpp:181
virtual void setCompletionMode(KGlobalSettings::Completion mode)
Sets the type of completion to be used.
Definition: kcompletionbase.cpp:167
KeyBindingType
Constants that represent the items whose short-cut key-binding is programmable.
Definition: kcompletion.h:653
A helper widget for "completion-widgets" (KLineEdit, KComboBox))
Definition: kcompletionbox.h:44
static void setAutoHideCursor(QWidget *w, bool enable, bool customEventFilter=false)
Sets auto-hiding the cursor for widget w.
Definition: kcursor.cpp:202
static Completion completionMode()
Returns the preferred completion mode setting.
Definition: kglobalsettings.cpp:267
Completion
This enum describes the completion mode used for by the KCompletion class.
Definition: kglobalsettings.h:179
void setClearButtonShown(bool show)
This makes the line edit display an icon on one side of the line edit which, when clicked,...
Definition: klineedit.cpp:284
QString prettyUrl(AdjustPathOption trailing=LeaveTrailingSlash) const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.