KCompletion
kcompletion.cpp
283 d->matches.findAllCompletions(d->m_treeRoot.get(), string, d->ignoreCase, d->hasMultipleMatches);
This structure is returned by KCompletion::allWeightedMatches().
Definition kcompletionmatches.h:42
QString nextMatch()
Returns the next item from the list of matching items.
Definition kcompletion.cpp:445
void insertItems(const QStringList &items)
Inserts items into the list of possible completions.
Definition kcompletion.cpp:163
void removeItem(const QString &item)
Removes an item from the list of available completions.
Definition kcompletion.cpp:242
void multipleMatches()
This signal is emitted when calling makeCompletion() and more than one matching item is found.
virtual QString makeCompletion(const QString &string)
Attempts to find an item in the list of available completions that begins with string.
Definition kcompletion.cpp:262
bool soundsEnabled() const
Tells you whether KCompletion will emit sounds on certain occasions.
Definition kcompletion.cpp:430
virtual void postProcessMatches(QStringList *matchList) const
This method is called before a list of all available completions is emitted via matches().
Definition kcompletion.cpp:193
bool isEmpty() const
Returns true if the completion object contains no entries.
Definition kcompletion.cpp:183
void matches(const QStringList &matchlist)
This signal is emitted by makeCompletion() in shell-completion mode when the same string is passed to...
QStringList allMatches()
Returns a list of all items matching the last completed string.
Definition kcompletion.cpp:374
virtual void setOrder(CompOrder order)
KCompletion offers three different ways in which it offers its items:
Definition kcompletion.cpp:132
virtual void setCompletionMode(CompletionMode mode)
Sets the completion mode.
Definition kcompletion.cpp:344
virtual void setSoundsEnabled(bool enable)
Enables/disables emitting a sound when.
Definition kcompletion.cpp:424
CompOrder
Constants that represent the order in which KCompletion performs completion lookups.
Definition kcompletion.h:163
QStringList substringCompletion(const QString &string) const
Returns a list of all completion items that contain the given string.
Definition kcompletion.cpp:319
CompletionMode
This enum describes the completion mode used for by the KCompletion class.
Definition kcompletion.h:131
@ CompletionPopupAuto
Lists all possible matches in a popup list box to choose from, and automatically fills the result whe...
Definition kcompletion.h:156
@ CompletionShell
Completes text much in the same way as a typical *nix shell would.
Definition kcompletion.h:147
@ CompletionPopup
Lists all possible matches in a popup list box to choose from.
Definition kcompletion.h:151
virtual void setIgnoreCase(bool ignoreCase)
Setting this to true makes KCompletion behave case insensitively.
Definition kcompletion.cpp:145
QString previousMatch()
Returns the next item from the list of matching items.
Definition kcompletion.cpp:483
std::function< void(QStringList &)> SorterFunction
The sorter function signature.
Definition kcompletion.h:176
virtual void postProcessMatch(QString *match) const
This method is called after a completion is found and before the matching string is emitted.
Definition kcompletion.cpp:189
CompletionMode completionMode() const
Returns the current completion mode.
Definition kcompletion.cpp:350
void setSorterFunction(SorterFunction sortFunc)
Sets a custom function to be used to sort the matches.
Definition kcompletion.cpp:368
void setShouldAutoSuggest(bool shouldAutosuggest)
Deriving classes may set this property and control whether the auto-suggestion should be displayed fo...
Definition kcompletion.cpp:356
void addItem(const QString &item)
Adds an item to the list of available completions.
Definition kcompletion.cpp:201
bool shouldAutoSuggest() const
Informs the caller if they should display the auto-suggestion for the last completion operation perfo...
Definition kcompletion.cpp:362
bool hasMultipleMatches() const
Returns true when more than one match is found.
Definition kcompletion.cpp:436
KCompletionMatches allWeightedMatches()
Returns a list of all items matching the last completed string.
Definition kcompletion.cpp:388
virtual void setItems(const QStringList &itemList)
Sets the list of items available for completion.
Definition kcompletion.cpp:157
KGuiItem ok()
const QList< QKeySequence > & completion()
void setCaseSensitivity(Qt::CaseSensitivity cs)
iterator begin()
iterator end()
iterator erase(const_iterator begin, const_iterator end)
bool isEmpty() const const
Q_EMITQ_EMIT
const QChar at(qsizetype position) const const
bool isEmpty() const const
qsizetype lastIndexOf(QChar ch, Qt::CaseSensitivity cs) const const
QString left(qsizetype n) const const
qsizetype length() const const
QStringView mid(qsizetype start, qsizetype length) const const
uint toUInt(bool *ok, int base) const const
CaseSensitive
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:20:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:20:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.