kopete/libkopete
Kopete::Command Class Reference
#include <kopetecommand.h>
Inheritance diagram for Kopete::Command:

Detailed Description
Definition at line 32 of file kopetecommand.h.
Public Types | |
| typedef enum Kopete::Command::Type | Type |
| enum | Type { Normal = 0, System = 1 << 1, Alias = 1 << 2 } |
Signals | |
| void | handleCommand (const QString &args, Kopete::ChatSession *manager) |
Public Member Functions | |
| const QString & | command () const |
| Command (QObject *parent, const QString &command, const char *handlerSlot, const QString &help=QString(), CommandHandler::CommandType type=CommandHandler::Normal, const QString &formatString=QString(), uint minArgs=0, int maxArgs=-1, const KShortcut &cut=KShortcut(), const QString &pix=QString()) | |
| const QString & | help () const |
| void | processCommand (const QString &args, ChatSession *manager, bool gui=false) |
| const CommandHandler::CommandType | type () const |
| ~Command () | |
Member Typedef Documentation
| typedef enum Kopete::Command::Type Kopete::Command::Type |
Member Enumeration Documentation
Constructor & Destructor Documentation
| Kopete::Command::Command | ( | QObject * | parent, | |
| const QString & | command, | |||
| const char * | handlerSlot, | |||
| const QString & | help = QString(), |
|||
| CommandHandler::CommandType | type = CommandHandler::Normal, |
|||
| const QString & | formatString = QString(), |
|||
| uint | minArgs = 0, |
|||
| int | maxArgs = -1, |
|||
| const KShortcut & | cut = KShortcut(), |
|||
| const QString & | pix = QString() | |||
| ) |
Creates a Kopete::Command object.
- Parameters:
-
parent The plugin who owns this command command The command we want to handle, not including the '/' handlerSlot The slot used to handle the command. This slot must accept two parameters, a QString of arguments, and a Kopete::ChatSession pointer to the Manager under which the command was sent. help An optional help string to be shown when the user uses /help command type If this command is an alias, and what type formatString The formatString of the alias if any minArgs Minimum number of arguments maxArgs Maximum number of arguments cut The shortcut for the command pix The icon to use for the command
Definition at line 47 of file kopetecommand.cpp.
| Kopete::Command::~Command | ( | ) |
Definition at line 61 of file kopetecommand.cpp.
Member Function Documentation
| const QString& Kopete::Command::command | ( | ) | const [inline] |
| void Kopete::Command::handleCommand | ( | const QString & | args, | |
| Kopete::ChatSession * | manager | |||
| ) | [signal] |
Emitted whenever a command is handled by this object.
When a command has been handled, all processing on it stops by the command handler (a command cannot be handled twice)
| const QString& Kopete::Command::help | ( | ) | const [inline] |
| void Kopete::Command::processCommand | ( | const QString & | args, | |
| Kopete::ChatSession * | manager, | |||
| bool | gui = false | |||
| ) |
| const CommandHandler::CommandType Kopete::Command::type | ( | ) | const [inline] |
The documentation for this class was generated from the following files:
KDE 4.2 API Reference