KCompletion
kcompletion.cpp
287 d->matches.findAllCompletions(d->m_treeRoot.get(), string, d->ignoreCase, d->hasMultipleMatches);
298 d->matches.findAllCompletions(d->m_treeRoot.get(), string, d->ignoreCase, d->hasMultipleMatches);
456 d->matches.findAllCompletions(d->m_treeRoot.get(), d->lastString, d->ignoreCase, d->hasMultipleMatches);
QString previousMatch()
Returns the next item from the list of matching items.
Definition: kcompletion.cpp:487
CompletionMode completionMode() const
Returns the current completion mode.
Definition: kcompletion.cpp:354
@ CompletionPopup
Lists all possible matches in a popup list box to choose from.
Definition: kcompletion.h:151
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:193
virtual void setItems(const QStringList &itemList)
Sets the list of items available for completion.
Definition: kcompletion.cpp:161
CaseSensitive
Q_EMITQ_EMIT
QStringRef midRef(int position, int n) const const
virtual void setSoundsEnabled(bool enable)
Enables/disables emitting a sound when.
Definition: kcompletion.cpp:428
QStringView mid(qsizetype start) const const
void setSorterFunction(SorterFunction sortFunc)
Sets a custom function to be used to sort the matches.
Definition: kcompletion.cpp:372
void setShouldAutoSuggest(bool shouldAutosuggest)
Deriving classes may set this property and control whether the auto-suggestion should be displayed fo...
Definition: kcompletion.cpp:360
int lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const const
CompletionMode
This enum describes the completion mode used for by the KCompletion class.
Definition: kcompletion.h:131
CompOrder
Constants that represent the order in which KCompletion performs completion lookups.
Definition: kcompletion.h:163
void insertItems(const QStringList &items)
Inserts items into the list of possible completions.
Definition: kcompletion.cpp:167
List for keeping matches returned from KCompletion.
Definition: kcompletionmatches.h:42
QStringList substringCompletion(const QString &string) const
Returns a list of all completion items that contain the given string.
Definition: kcompletion.cpp:323
void matches(const QStringList &matchlist)
This signal is emitted by makeCompletion() in shell-completion mode when the same string is passed to...
KCompletion::CompletionMode completionMode() const
Returns the current completion mode.
Definition: kcompletionbase.cpp:201
QString nextMatch()
Returns the next item from the list of matching items.
Definition: kcompletion.cpp:449
bool isEmpty() const const
int length() const const
bool isEmpty() const
Returns true if the completion object contains no entries.
Definition: kcompletion.cpp:187
bool isEmpty() const const
count
@ CompletionShell
Completes text much in the same way as a typical *nix shell would.
Definition: kcompletion.h:147
virtual void setIgnoreCase(bool ignoreCase)
Setting this to true makes KCompletion behave case insensitively.
Definition: kcompletion.cpp:149
virtual void setCompletionMode(CompletionMode mode)
Sets the completion mode.
Definition: kcompletion.cpp:348
QStringList allMatches()
Returns a list of all items matching the last completed string.
Definition: kcompletion.cpp:378
@ CompletionPopupAuto
Lists all possible matches in a popup list box to choose from, and automatically fills the result whe...
Definition: kcompletion.h:156
virtual QString makeCompletion(const QString &string)
Attempts to find an item in the list of available completions that begins with string.
Definition: kcompletion.cpp:266
uint toUInt(bool *ok, int base) const const
bool hasMultipleMatches() const
Returns true when more than one match is found.
Definition: kcompletion.cpp:440
void multipleMatches()
This signal is emitted when calling makeCompletion() and more than one matching item is found.
QList::iterator erase(QList::iterator pos)
QString left(int n) const const
virtual void postProcessMatches(QStringList *matchList) const
This method is called before a list of all available completions is emitted via matches().
Definition: kcompletion.cpp:197
void removeItem(const QString &item)
Removes an item from the list of available completions.
Definition: kcompletion.cpp:246
bool shouldAutoSuggest() const
Informs the caller if they should display the auto-suggestion for the last completion operation perfo...
Definition: kcompletion.cpp:366
void addItem(const QString &item)
Adds an item to the list of available completions.
Definition: kcompletion.cpp:205
const QChar at(int position) const const
QList::iterator begin()
KGuiItem ok()
std::function< void(QStringList &)> SorterFunction
The sorter function signature.
Definition: kcompletion.h:176
KCompletionMatches allWeightedMatches()
Returns a list of all items matching the last completed string.
Definition: kcompletion.cpp:392
bool soundsEnabled() const
Tells you whether KCompletion will emit sounds on certain occasions.
Definition: kcompletion.cpp:434
QList::iterator end()
void setCaseSensitivity(Qt::CaseSensitivity sensitivity)
Q_D(Todo)
virtual void setOrder(CompOrder order)
KCompletion offers three different ways in which it offers its items:
Definition: kcompletion.cpp:136
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Dec 7 2023 03:58:04 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Dec 7 2023 03:58:04 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.