class KTextEditor.CommandInterfaceabstract class |
|
|
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
See also KTextEditor.Editor, KTextEditor.Command,
KTextEditor.CommandExtension
Author Christoph Cullmann \ |
|
Get a list of available command line strings. Returns command line strings See also commands() |
|
Get a list of all registered commands. Returns list of all commands See also queryCommand(), commandList() |
|
Query for the command cmd. If the command cmd does not exist the return value is 0.
cmd - name of command to query for Returns the found command or 0 if no such command exists |
|
Register a the new command cmd. The command will be registered for all documents, i.e. every command is global.
cmd - command to register Returns true on success, otherwise false See also unregisterCommand() |
|
Unregister the command cmd. The command will be unregistered for all documents.
cmd - command to unregister Returns true on success, otherwise false See also registerCommand() |