KTextEditor::CodeCompletionInterfaceV2

Search for usage in LXR

KTextEditor::CodeCompletionInterfaceV2 Class Referenceabstract

#include <KTextEditor/CodeCompletionInterface>

Inheritance diagram for KTextEditor::CodeCompletionInterfaceV2:

Public Member Functions

virtual QList< CodeCompletionModel * > codeCompletionModels () const =0
 
virtual void startCompletion (const Range &word, CodeCompletionModel *model)=0
 
virtual void startCompletion (const Range &word, const QList< CodeCompletionModel * > &models=QList< CodeCompletionModel * >(), CodeCompletionModel::InvocationType invocationType=CodeCompletionModel::ManualInvocation)=0
 
- Public Member Functions inherited from KTextEditor::CodeCompletionInterface
virtual void abortCompletion ()=0
 
virtual void forceCompletion ()=0
 
virtual bool isAutomaticInvocationEnabled () const =0
 
virtual bool isCompletionActive () const =0
 
virtual void registerCompletionModel (CodeCompletionModel *model)=0
 
virtual void setAutomaticInvocationEnabled (bool enabled=true)=0
 
virtual void startCompletion (const Range &word, CodeCompletionModel *model)=0
 
virtual void unregisterCompletionModel (CodeCompletionModel *model)=0
 

Detailed Description

Code completion extension interface for the View, version 2.

Introduction

The CodeCompletionInterfaceV2 is an extended version of the CodeCompletionInterface. Refer to the base CodeCompletionInterface for a more detailed description.

Accessing the CodeCompletionInterfaceV2

The CodeCompletionInterfaceV2 is an extension interface for a View, i.e. the View inherits the interface provided that the used KTextEditor library implements the interface. Use qobject_cast to access the interface:

// view is of type KTextEditor::View*
auto iface = qobject_cast<KTextEditor::CodeCompletionInterfaceV2*>(view);
if (iface) {
// the implementation supports the interface
// do stuff
} else {
// the implementation does not support the interface
}
Since
5.74

Definition at line 174 of file codecompletioninterface.h.

Member Function Documentation

◆ codeCompletionModels()

virtual QList<CodeCompletionModel *> KTextEditor::CodeCompletionInterfaceV2::codeCompletionModels ( ) const
pure virtual

Obtain the list of registered code completion models.

Returns
a list of a models that are currently registered
See also
registerCompletionModel(CodeCompletionModel*)

◆ startCompletion() [1/2]

virtual void KTextEditor::CodeCompletionInterface::startCompletion

Invoke code completion over a given range, with a specific model.

◆ startCompletion() [2/2]

virtual void KTextEditor::CodeCompletionInterfaceV2::startCompletion ( const Range word,
const QList< CodeCompletionModel * > &  models = QListCodeCompletionModel * >(),
CodeCompletionModel::InvocationType  invocationType = CodeCompletionModel::ManualInvocation 
)
pure virtual

Invoke code completion over a given range, with specific models and invocation type.

Parameters
modelslist of models to start. If this is an empty list, all registered models are started.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Jun 27 2022 03:58:28 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.