class KTextEditor.CommandInterface


abstract class

Table of contents
Modules
ktexteditor Classes
All Classes
Module ktexteditor
Namespace ktexteditor
Class KTextEditor.CommandInterface
Inherits

Command extension interface for the Editor.

Introduction

The CommandInterface extends the Editor to support command line commands. An application or a Plugin can register new commands by using registerCommand(). To unregister a command call unregisterCommand(). To check, whether a command with a given name exists use queryCommand().

Accessing the CommandInterface

The CommandInterface is supposed to be an extension interface for the Editor, i.e. the Editor inherits the interface provided that the used KTextEditor library implements the interface. Use qobject_cast to access the interface:

// editor is of type KTextEditor.Editor*
KTextEditor.CommandInterface *iface =
qobject_cast( editor );

if( iface ) { // the implementation supports the interface // do stuff }

See also KTextEditor.Editor, KTextEditor.Command, KTextEditor.CommandExtension Author Christoph Cullmann \



methods