KCompletion
kcompletion.cpp
366 for (QStringList::ConstIterator it = list.constBegin(), total = list.constEnd(); it != total; ++it) {
485 d->matches.findAllCompletions(d->treeRoot, d->lastString, d->ignoreCase, d->hasMultipleMatches);
523 d->matches.findAllCompletions(d->treeRoot, d->lastString, d->ignoreCase, d->hasMultipleMatches);
662 void KCompletionMatchesWrapper::findAllCompletions(const KCompTreeNode *treeRoot, const QString &string, bool ignoreCase, bool &hasMultipleMatches)
717 void KCompletionMatchesWrapper::extractStringsFromNode(const KCompTreeNode *node, const QString &beginning, bool addWeight)
QString previousMatch()
Returns the next item from the list of matching items.
Definition: kcompletion.cpp:516
CompletionMode completionMode() const
Returns the current completion mode.
Definition: kcompletion.cpp:383
@ 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:215
virtual void setItems(const QStringList &itemList)
Sets the list of items available for completion.
Definition: kcompletion.cpp:177
QChar toLower() const const
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:457
QStringView mid(qsizetype start) const const
QChar toUpper() const const
QList::const_iterator constBegin() const const
void setSorterFunction(SorterFunction sortFunc)
Sets a custom function to be used to sort the matches.
Definition: kcompletion.cpp:401
void setShouldAutoSuggest(bool shouldAutosuggest)
Deriving classes may set this property and control whether the auto-suggestion should be displayed fo...
Definition: kcompletion.cpp:389
bool isLetter() const const
KIOFILEWIDGETS_EXPORT QStringList list(const QString &fileClass)
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:183
void prepend(const T &value)
List for keeping matches returned from KCompletion.
Definition: kcompletionmatches.h:42
QString & setNum(short n, int base)
QStringList substringCompletion(const QString &string) const
Returns a list of all completion items that contain the given string.
Definition: kcompletion.cpp:346
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:478
bool isEmpty() const const
int length() const const
bool isEmpty() const
Returns true if the completion object contains no entries.
Definition: kcompletion.cpp:209
QWidget * find(WId id)
bool isEmpty() const const
count
@ CompletionShell
Completes text much in the same way as a typical *nix shell would.
Definition: kcompletion.h:147
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const const
virtual void setIgnoreCase(bool ignoreCase)
Setting this to true makes KCompletion behave case insensitively.
Definition: kcompletion.cpp:165
virtual void setCompletionMode(CompletionMode mode)
Sets the completion mode.
Definition: kcompletion.cpp:377
QStringList allMatches()
Returns a list of all items matching the last completed string.
Definition: kcompletion.cpp:407
@ CompletionPopupAuto
Lists all possible matches in a popup list box to choose from, and automatically fills the result whe...
Definition: kcompletion.h:156
KGuiItem ok()
virtual QString makeCompletion(const QString &string)
Attempts to find an item in the list of available completions that begins with string.
Definition: kcompletion.cpp:289
uint toUInt(bool *ok, int base) const const
typedef ConstIterator
bool hasMultipleMatches() const
Returns true when more than one match is found.
Definition: kcompletion.cpp:469
void multipleMatches()
This signal is emitted when calling makeCompletion() and more than one matching item is found.
QList::const_iterator constEnd() const const
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:219
void removeItem(const QString &item)
Removes an item from the list of available completions.
Definition: kcompletion.cpp:268
bool shouldAutoSuggest() const
Informs the caller if they should display the auto-suggestion for the last completion operation perfo...
Definition: kcompletion.cpp:395
void addItem(const QString &item)
Adds an item to the list of available completions.
Definition: kcompletion.cpp:227
const QChar at(int position) const const
QList::iterator begin()
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:421
bool soundsEnabled() const
Tells you whether KCompletion will emit sounds on certain occasions.
Definition: kcompletion.cpp:463
QList::iterator end()
QString mid(int position, int n) const const
void setCaseSensitivity(Qt::CaseSensitivity sensitivity)
QObject * parent() const const
QString & append(QChar ch)
Q_D(Todo)
void sort(Qt::CaseSensitivity cs)
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.