KCompletion
khistorycombobox.cpp
201 menu->addAction(QIcon::fromTheme(QStringLiteral("edit-clear-history")), KHistoryComboBox::tr("Clear &History", "@action:inmenu"), q, [this]() {
318 while (currentIndex < last && (currText == q->itemText(currentIndex) || q->itemText(currentIndex).isEmpty())) {
441 if ((q->insertPolicy() == q->NoInsert && q->findText(text, Qt::MatchFixedString | Qt::MatchCaseSensitive) == -1)) {
void aboutToShowContextMenu(QMenu *contextMenu)
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:64
void returnPressed(const QString &text)
Emitted when the user presses the Return or Enter key.
void setEditable(bool editable)
Reimplemented so that setEditable(true) creates a KLineEdit instead of QLineEdit.
Definition kcombobox.cpp:329
KCompletion * compObj() const
Returns a pointer to the completion object.
Definition kcompletionbase.cpp:246
KCompletion * completionObject(bool handleSignals=true)
Returns a pointer to the current completion object.
Definition kcompletionbase.cpp:90
void removeItem(const QString &item)
Removes an item from the list of available completions.
Definition kcompletion.cpp:242
virtual void setOrder(CompOrder order)
KCompletion offers three different ways in which it offers its items:
Definition kcompletion.cpp:132
void addItem(const QString &item)
Adds an item to the list of available completions.
Definition kcompletion.cpp:201
virtual void setItems(const QStringList &itemList)
Sets the list of items available for completion.
Definition kcompletion.cpp:157
KHistoryComboBox(QWidget *parent=nullptr)
Constructs a "read-write" combobox.
Definition khistorycombobox.cpp:112
void addToHistory(const QString &item)
Adds an item to the end of the history list and to the completion list.
Definition khistorycombobox.cpp:210
~KHistoryComboBox() override
Destructs the combo and the completion-object.
Definition khistorycombobox.cpp:129
bool removeFromHistory(const QString &item)
Removes all items named item.
Definition khistorycombobox.cpp:268
void keyPressEvent(QKeyEvent *) override
Handling key-events, the shortcuts to rotate the items.
Definition khistorycombobox.cpp:372
void insertItems(const QStringList &items)
Inserts items into the combo, honoring setIconProvider() Does not update the completionObject.
Definition khistorycombobox.cpp:410
void setHistoryItems(const QStringList &items)
Inserts items into the combobox.
Definition khistorycombobox.cpp:133
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:404
void wheelEvent(QWheelEvent *ev) override
Handling wheel-events, to rotate the items.
Definition khistorycombobox.cpp:386
const QList< QKeySequence > & rotateDown()
const QList< QKeySequence > & rotateUp()
void setEnabled(bool)
NoInsert
void activated(int index)
void addItem(const QIcon &icon, const QString &text, const QVariant &userData)
void clear()
void clearEditText()
count
currentIndex
currentText
duplicatesEnabled
void insertItem(int index, const QIcon &icon, const QString &text, const QVariant &userData)
QString itemText(int index) const const
virtual void keyPressEvent(QKeyEvent *e) override
maxCount
void removeItem(int index)
void setEditText(const QString &text)
QAbstractItemView * view() const const
bool sendEvent(QObject *receiver, QEvent *event)
void accept()
QIcon fromTheme(const QString &name)
int key() const const
Qt::KeyboardModifiers modifiers() const const
void append(QList< T > &&value)
void clear()
qsizetype count() const const
void pop_front()
void reserve(qsizetype size)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QString tr(const char *sourceText, const char *disambiguation, int n)
int y() const const
bool isEmpty() const const
QueuedConnection
MatchFixedString
QPoint angleDelta() const const
bool isVisible() const const
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:12:50 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:12:50 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.