KDEUI
kcompletion.h
Go to the documentation of this file.
bool handleSignals() const
Returns true if the object handles the signals.
Definition kcompletionbase.cpp:157
void setDelegate(KCompletionBase *delegate)
Sets or removes the delegation object.
Definition kcompletionbase.cpp:78
KGlobalSettings::Completion completionMode() const
Returns the current completion mode.
Definition kcompletionbase.cpp:181
virtual void setCompletedItems(const QStringList &items, bool autoSuggest=true)=0
A pure virtual function that must be implemented by all inheriting classes.
virtual void setCompletedText(const QString &text)=0
A pure virtual function that must be implemented by all inheriting classes.
virtual void setHandleSignals(bool handle)
Enables this object to handle completion and rotation events internally.
Definition kcompletionbase.cpp:127
KCompletion * compObj() const
Returns a pointer to the completion object.
Definition kcompletionbase.cpp:220
virtual void virtual_hook(int id, void *data)
Virtual hook, used to add new "virtual" functions while maintaining binary compatibility.
Definition kcompletionbase.cpp:243
bool emitSignals() const
Returns true if the object emits the signals.
Definition kcompletionbase.cpp:162
virtual void setCompletionObject(KCompletion *compObj, bool hsig=true)
Sets up the completion object to be used.
Definition kcompletionbase.cpp:109
QMap< KeyBindingType, KShortcut > KeyBindingMap
Definition kcompletion.h:673
KCompletion * completionObject(bool hsig=true)
Returns a pointer to the current completion object.
Definition kcompletionbase.cpp:96
KShortcut getKeyBinding(KeyBindingType item) const
Returns the key-binding used for the specified item.
Definition kcompletionbase.cpp:201
void setAutoDeleteCompletionObject(bool autoDelete)
Sets the completion object when this widget's destructor is called.
Definition kcompletionbase.cpp:141
void setEnableSignals(bool enable)
Sets the widget's ability to emit text completion and rotation signals.
Definition kcompletionbase.cpp:149
bool isCompletionObjectAutoDeleted() const
Returns true if the completion object is deleted upon this widget's destruction.
Definition kcompletionbase.cpp:135
bool setKeyBinding(KeyBindingType item, const KShortcut &key)
Sets the key-binding to be used for manual text completion, text rotation in a history list as well a...
Definition kcompletionbase.cpp:186
void useGlobalKeyBindings()
Sets this object to use global values for key-bindings.
Definition kcompletionbase.cpp:206
virtual void setCompletionMode(KGlobalSettings::Completion mode)
Sets the type of completion to be used.
Definition kcompletionbase.cpp:167
KeyBindingType
Constants that represent the items whose short-cut key-binding is programmable.
Definition kcompletion.h:652
@ PrevCompletionMatch
Switch to previous completion (by default Ctrl-Up).
Definition kcompletion.h:660
This structure is returned by KCompletion::allWeightedMatches .
Definition kcompletion.h:579
QStringList list(bool sort=true) const
Returns the matches as a QStringList.
Definition kcompletion.cpp:886
bool sorting() const
If sorting() returns false, the matches aren't sorted by their weight, even if true is passed to list...
Definition kcompletion.cpp:897
KCompletionMatches & operator=(const KCompletionMatches &)
assignment operator.
Definition kcompletion.cpp:852
void slotPreviousMatch()
Searches the previous matching item and emits it via match().
Definition kcompletion.h:395
virtual void setItems(const QStringList &list)
Sets the list of items available for completion.
Definition kcompletion.cpp:99
QString nextMatch()
Returns the next item from the matching-items-list.
Definition kcompletion.cpp:404
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:229
virtual void setOrder(CompOrder order)
KCompletion offers three different ways in which it offers its items:
Definition kcompletion.cpp:78
CompOrder
Constants that represent the order in which KCompletion performs completion-lookups.
Definition kcompletion.h:143
virtual void setIgnoreCase(bool ignoreCase)
Setting this to true makes KCompletion behave case insensitively.
Definition kcompletion.cpp:89
QString previousMatch()
Returns the next item from the matching-items-list.
Definition kcompletion.cpp:442
void slotMakeCompletion(const QString &string)
Attempts to complete "string" and emits the completion via match().
Definition kcompletion.h:386
void slotNextMatch()
Searches the next matching item and emits it via match().
Definition kcompletion.h:404
bool hasMultipleMatches() const
Returns true when more than one match is found.
Definition kcompletion.cpp:395
virtual void postProcessMatch(QString *pMatch) const
This method is called after a completion is found and before the matching string is emitted.
Definition kcompletion.cpp:134
virtual void postProcessMatches(QStringList *pMatches) const
This method is called before a list of all available completions is emitted via matches.
Definition kcompletion.cpp:138
Completion
This enum describes the completion mode used for by the KCompletion class.
Definition kglobalsettings.h:179
void sort()
static void addItem(KServiceGroup::List &sorted, const KSycocaEntry::Ptr &p, bool &addSeparator)
Defines platform-independent classes for keyboard shortcut handling.
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.