• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kopete/libkopete

Kopete::Command

Kopete::Command Class Reference

#include <kopetecommand.h>

Inheritance diagram for Kopete::Command:

Inheritance graph
[legend]

List of all members.


Detailed Description

Definition at line 32 of file 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 ()
void processCommand (const QString &args, ChatSession *manager, bool gui=false)
const QString & command () const
const QString & help () const
const CommandHandler::CommandType type () const

Member Typedef Documentation

typedef enum Kopete::Command::Type Kopete::Command::Type


Member Enumeration Documentation

enum Kopete::Command::Type

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

void Kopete::Command::processCommand ( const QString &  args,
Kopete::ChatSession *  manager,
bool  gui = false 
)

Process this command.

Definition at line 99 of file kopetecommand.cpp.

const QString& Kopete::Command::command (  )  const [inline]

Returns the command this object handles.

Definition at line 81 of file kopetecommand.h.

const QString& Kopete::Command::help (  )  const [inline]

Returns the help string for this command.

Definition at line 86 of file kopetecommand.h.

const CommandHandler::CommandType Kopete::Command::type (  )  const [inline]

Returns the type of the command.

Definition at line 91 of file kopetecommand.h.

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)


The documentation for this class was generated from the following files:
  • kopetecommand.h
  • kopetecommand.cpp

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal