KTextEditor
#include <commandinterface.h>
Public Member Functions | |
virtual | ~CommandInterface () |
virtual QStringList | commandList () const =0 |
virtual QList< Command * > | commands () const =0 |
virtual Command * | queryCommand (const QString &cmd) const =0 |
virtual bool | registerCommand (Command *cmd)=0 |
virtual bool | unregisterCommand (Command *cmd)=0 |
Detailed Description
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:
Definition at line 233 of file commandinterface.h.
Constructor & Destructor Documentation
|
inlinevirtual |
Virtual destructor.
Definition at line 239 of file commandinterface.h.
Member Function Documentation
|
pure virtual |
Get a list of all registered commands.
- Returns
- list of all commands
- See also
- queryCommand(), commandList()
|
pure virtual |
Query for the command cmd
.
If the command cmd
does not exist the return value is NULL.
- Parameters
-
cmd name of command to query for
- Returns
- the found command or NULL 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.
- Parameters
-
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.
- Parameters
-
cmd command to unregister
- Returns
- true on success, otherwise false
- See also
- registerCommand()
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.