kopete/libkopete
#include <kopetecommand.h>
Public Types | |
enum | Type { Normal = 0, System = 1 << 1, Alias = 1 << 2 } |
typedef enum Kopete::Command::Type | Type |
Signals | |
void | handleCommand (const QString &args, Kopete::ChatSession *manager) |
Public Member Functions | |
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()) | |
~Command () | |
const QString & | command () const |
const QString & | help () const |
void | processCommand (const QString &args, ChatSession *manager, bool gui=false) |
CommandHandler::CommandType | type () const |
Detailed Description
Definition at line 32 of file kopetecommand.h.
Member Typedef Documentation
typedef enum Kopete::Command::Type Kopete::Command::Type |
an enum defining the type of a command
Member Enumeration Documentation
an enum defining the type of a command
Enumerator | |
---|---|
Normal | |
System | |
Alias |
Definition at line 41 of file kopetecommand.h.
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
|
inline |
Returns the command this object handles.
Definition at line 81 of file kopetecommand.h.
|
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)
|
inline |
Returns the help string for this command.
Definition at line 86 of file kopetecommand.h.
void Kopete::Command::processCommand | ( | const QString & | args, |
Kopete::ChatSession * | manager, | ||
bool | gui = false |
||
) |
Process this command.
Definition at line 99 of file kopetecommand.cpp.
|
inline |
Returns the type of the command.
Definition at line 91 of file kopetecommand.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.