• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KTextEditor

  • interfaces
  • ktexteditor
codecompletioninterface.h
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2 Copyright (C) 2005-2006 Hamish Rodda <rodda@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17*/
18
19#ifndef KDELIBS_KTEXTEDITOR_CODECOMPLETIONINTERFACE_H
20#define KDELIBS_KTEXTEDITOR_CODECOMPLETIONINTERFACE_H
21
22#include <ktexteditor/ktexteditor_export.h>
23#include <QtCore/QObject>
24#include <ktexteditor/range.h>
25
26namespace KTextEditor {
27
28class CodeCompletionModel;
29
92class KTEXTEDITOR_EXPORT CodeCompletionInterface
93{
94 public:
95 virtual ~CodeCompletionInterface();
96
100 virtual bool isCompletionActive() const = 0;
101
105 virtual void startCompletion(const Range& word, CodeCompletionModel* model) = 0;
106
113 virtual void abortCompletion() = 0;
114
119 virtual void forceCompletion() = 0;
120
126 virtual void registerCompletionModel(CodeCompletionModel* model) = 0;
127
133 virtual void unregisterCompletionModel(CodeCompletionModel* model) = 0;
134
138 virtual bool isAutomaticInvocationEnabled() const = 0;
139
143 virtual void setAutomaticInvocationEnabled(bool enabled = true) = 0;
144
145 //signals:
146 //void completionExecuted(KTextEditor::View* view, const KTextEditor::Cursor& position, KTextEditor::CodeCompletionModel* model, int row);
147 //void completionAborted(KTextEditor::View* view);
148};
149
150}
151
152Q_DECLARE_INTERFACE(KTextEditor::CodeCompletionInterface, "org.kde.KTextEditor.CodeCompletionInterface")
153
154#endif // KDELIBS_KTEXTEDITOR_CODECOMPLETIONINTERFACE_H
KTextEditor::CodeCompletionInterface
Code completion extension interface for the View.
Definition: codecompletioninterface.h:93
KTextEditor::CodeCompletionInterface::forceCompletion
virtual void forceCompletion()=0
Force execution of the currently selected completion, and hide the code completion box.
KTextEditor::CodeCompletionInterface::isAutomaticInvocationEnabled
virtual bool isAutomaticInvocationEnabled() const =0
Determine the status of automatic code completion invocation.
KTextEditor::CodeCompletionInterface::registerCompletionModel
virtual void registerCompletionModel(CodeCompletionModel *model)=0
Register a new code completion model.
KTextEditor::CodeCompletionInterface::isCompletionActive
virtual bool isCompletionActive() const =0
Query whether the code completion box is currently displayed.
KTextEditor::CodeCompletionInterface::setAutomaticInvocationEnabled
virtual void setAutomaticInvocationEnabled(bool enabled=true)=0
Enable or disable automatic code completion invocation.
KTextEditor::CodeCompletionInterface::abortCompletion
virtual void abortCompletion()=0
Abort the currently displayed code completion without executing any currently selected completion.
KTextEditor::CodeCompletionInterface::unregisterCompletionModel
virtual void unregisterCompletionModel(CodeCompletionModel *model)=0
Unregister a code completion model.
KTextEditor::CodeCompletionInterface::startCompletion
virtual void startCompletion(const Range &word, CodeCompletionModel *model)=0
Invoke code completion over a given range, with a specific model.
KTextEditor::CodeCompletionModel
An item model for providing code completion, and meta information for enhanced presentation.
Definition: codecompletionmodel.h:78
KTextEditor::Range
An object representing a section of text, from one Cursor to another.
Definition: range.h:55
ktexteditor_export.h
KTextEditor
Namespace for the KDE Text Editor Interfaces.
Definition: annotationinterface.h:31
range.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KTextEditor

Skip menu "KTextEditor"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal