KCompletion
khistorycombobox.cpp
213 menu->addAction(QIcon::fromTheme(QStringLiteral("edit-clear-history")), KHistoryComboBox::tr("Clear &History", "@action:inmenu"), q, [this]() {
334 while (currentIndex < last && (currText == q->itemText(currentIndex) || q->itemText(currentIndex).isEmpty())) {
483 if ((q->insertPolicy() == q->NoInsert && q->findText(text, Qt::MatchFixedString | Qt::MatchCaseSensitive) == -1)) {
void append(const T &value)
void addToHistory(const QString &item)
Adds an item to the end of the history list and to the completion list.
Definition: khistorycombobox.cpp:222
void clearEditText()
currentText
KPixmapProvider * pixmapProvider() const
Definition: khistorycombobox.cpp:511
virtual void setItems(const QStringList &itemList)
Sets the list of items available for completion.
Definition: kcompletion.cpp:177
KHistoryComboBox(QWidget *parent=nullptr)
Constructs a "read-write" combobox.
Definition: khistorycombobox.cpp:120
virtual void keyPressEvent(QKeyEvent *e) override
QAbstractItemView * view() const const
QCA_EXPORT void init()
int count(const T &value) const const
QPoint angleDelta() const const
QIcon fromTheme(const QString &name)
void keyPressEvent(QKeyEvent *) override
Handling key-events, the shortcuts to rotate the items.
Definition: khistorycombobox.cpp:388
currentIndex
int y() const const
KIOFILEWIDGETS_EXPORT QStringList list(const QString &fileClass)
void setPixmapProvider(KPixmapProvider *provider)
Sets a pixmap provider, so that items in the combobox can have a pixmap.
Definition: khistorycombobox.cpp:421
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QString itemText(int index) const const
void reserve(int alloc)
void setEditText(const QString &text)
bool isVisible() const const
Qt::KeyboardModifiers modifiers() const const
KCompletion * compObj() const
Returns a pointer to the completion object.
Definition: kcompletionbase.cpp:246
~KHistoryComboBox() override
Destructs the combo, the completion-object and the pixmap-provider.
Definition: khistorycombobox.cpp:137
bool sendEvent(QObject *receiver, QEvent *event)
void insertItem(int index, const QString &text, const QVariant &userData)
void pop_front()
bool isEmpty() const const
void setIconProvider(std::function< QIcon(const QString &)> providerFunction)
Sets an icon provider, so that items in the combobox can have an icon.
Definition: khistorycombobox.cpp:442
QueuedConnection
count
NoInsert
void insertItems(const QStringList &items)
Inserts items into the combo, honoring pixmapProvider() Does not update the completionObject.
Definition: khistorycombobox.cpp:448
maxCount
void setHistoryItems(const QStringList &items)
Inserts items into the combobox.
Definition: khistorycombobox.cpp:145
height
iconSize
void clear()
KCompletion * completionObject(bool handleSignals=true)
Returns a pointer to the current completion object.
Definition: kcompletionbase.cpp:90
int count() const const
void setEnabled(bool)
int key() const const
duplicatesEnabled
void wheelEvent(QWheelEvent *ev) override
Handling wheel-events, to rotate the items.
Definition: khistorycombobox.cpp:402
void removeItem(const QString &item)
Removes an item from the list of available completions.
Definition: kcompletion.cpp:268
void removeItem(int index)
void addItem(const QString &item)
Adds an item to the list of available completions.
Definition: kcompletion.cpp:227
const QList< QKeySequence > & rotateUp()
void clear()
void addItem(const QString &text, const QVariant &userData)
const QList< QKeySequence > & rotateDown()
MatchFixedString
bool removeFromHistory(const QString &item)
Removes all items named item.
Definition: khistorycombobox.cpp:284
QString tr(const char *sourceText, const char *disambiguation, int n)
void activated(int index)
void setEditable(bool editable)
Reimplemented so that setEditable(true) creates a KLineEdit instead of QLineEdit.
Definition: kcombobox.cpp:364
Q_D(Todo)
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:64
void aboutToShowContextMenu(QMenu *contextMenu)
Emitted before the context menu is displayed.
void accept()
virtual void setOrder(CompOrder order)
KCompletion offers three different ways in which it offers its items:
Definition: kcompletion.cpp:152
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Jun 27 2022 04:07:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Jun 27 2022 04:07:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.