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
bool isValid() const
void setLineEdit(QLineEdit *edit)
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 setEditable(bool editable)
"Re-implemented" so that setEditable(true) creates a KLineEdit instead of QLineEdit.
Definition: kcombobox.cpp:386
void create(WId window, bool initializeWindow, bool destroyOldWindow)
int width() const
KCompletionBase * delegate() const
Returns the delegation object.
Definition: kcompletionbase.cpp:91
A helper widget for "completion-widgets" (KLineEdit, KComboBox))
Definition: kcompletionbox.h:43
QObject * sender() const
int & rwidth()
virtual const QMetaObject * metaObject() const
void setEditText(const QString &text)
QString itemText(int index) const
virtual void wheelEvent(QWheelEvent *e)
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
bool isEditable() const
void setItemText(int index, const QString &text)
void insertItem(int index, const QString &text, const QVariant &userData)
int & rheight()
bool isNull() const
void aboutToShowContextMenu(QMenu *p)
Emitted before the context menu is displayed.
void setEditUrl(const KUrl &url)
Sets url into the edit field of the combobox.
Definition: kcombobox.cpp:204
void addItem(const QString &text, const QVariant &userData)
virtual void setLineEdit(QLineEdit *)
Re-implemented for internal reasons.
Definition: kcombobox.cpp:282
QSize size() const
void setUrlDropsEnabled(bool enable)
Enables/Disables handling of URL drops.
Definition: kcombobox.cpp:138
int count() const
virtual QSize minimumSizeHint() const
const KShortcut & insert()
Toggle insert/overwrite (with visual feedback, e.g.
Definition: kstandardguiitem.cpp:264
void setCurrentItem(const QString &item, bool insert=false, int index=-1)
Selects the first item that matches item.
Definition: kcombobox.cpp:347
bool isEmpty() const
virtual void setCompletionMode(KGlobalSettings::Completion mode)
Sets the type of completion to be used.
Definition: kcompletionbase.cpp:167
void activated(int index)
Text is automatically filled in whenever possible.
Definition: kglobalsettings.h:187
virtual bool eventFilter(QObject *watched, QEvent *event)
static void setAutoHideCursor(QWidget *w, bool enable, bool customEventFilter=false)
Sets auto-hiding the cursor for widget w.
Definition: kcursor.cpp:202
void setContextMenuPolicy(Qt::ContextMenuPolicy policy)
const char * className() const
void setTrapReturnKey(bool trap)
By default, KComboBox recognizes Key_Return and Key_Enter and emits the returnPressed() signals...
Definition: kcombobox.cpp:188
An abstract base class for adding a completion feature into widgets.
Definition: kcompletion.h:645
virtual void setAutoCompletion(bool autocomplete)
Re-implemented from QComboBox.
Definition: kcombobox.cpp:107
void changeUrl(int index, const KUrl &url)
Replaces the item at position index with url.
Definition: kcombobox.cpp:229
QLineEdit * lineEdit() const
void completionModeChanged(KGlobalSettings::Completion)
Emitted whenever the completion mode is changed by the user through the context menu.
void setItemIcon(int index, const QIcon &icon)
int height() const
KAction * create(StandardAction id, const QObject *recvr, const char *slot, QObject *parent)
Creates an action corresponding to one of the KStandardAction::StandardAction actions, which is connected to the given object and slot, and is owned by parent.
Definition: kstandardaction.cpp:82
void setCurrentIndex(int index)
Completion
This enum describes the completion mode used for by the KCompletion class.
Definition: kglobalsettings.h:179
KeyBindingType
Constants that represent the items whose short-cut key-binding is programmable.
Definition: kcompletion.h:653
bool urlDropsEnabled() const
Returns true when decoded URL drops are enabled.
virtual void keyboardSearch(const QString &search)
void insertUrl(int index, const KUrl &url)
Inserts url at position index into the combobox.
Definition: kcombobox.cpp:219
void setAutoCompletion(bool enable)
virtual void setCompletedText(const QString &)
Sets the completed text in the line-edit appropriately.
Definition: kcombobox.cpp:156
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
void rotateText(KCompletionBase::KeyBindingType type)
Iterates through all possible matches of the completed text or the history list.
Definition: kcombobox.cpp:176
void textRotation(KCompletionBase::KeyBindingType)
Emitted when the text rotation key-bindings are pressed.
void substringCompletion(const QString &)
Emitted when the shortcut for substring completion is pressed.
KCompletionBox * completionBox(bool create=true)
Definition: kcombobox.cpp:246
void setCompletedItems(const QStringList &items, bool autosubject=true)
Sets items into the completion-box if completionMode() is CompletionPopup.
Definition: kcombobox.cpp:240
static Completion completionMode()
Returns the preferred completion mode setting.
Definition: kglobalsettings.cpp:267
cursorPosition
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
bool trapReturnKey() const
virtual bool eventFilter(QObject *, QEvent *)
Re-implemented for internal reasons.
Definition: kcombobox.cpp:183
QString prettyUrl(AdjustPathOption trailing=LeaveTrailingSlash) const
void destroyed(QObject *obj)
void setDelegate(KCompletionBase *delegate)
Sets or removes the delegation object.
Definition: kcompletionbase.cpp:78
virtual void setContextMenuEnabled(bool showMenu)
Enables or disable the popup (context) menu.
Definition: kcombobox.cpp:130
KGlobalSettings::Completion completionMode() const
Returns the current completion mode.
Definition: kcompletionbase.cpp:181
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 makeCompletion(const QString &)
Completes text according to the completion mode.
Definition: kcombobox.cpp:162
QAbstractItemView * view() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.