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

kopete/libkopete

  • Kopete
  • Command
Public Types | Signals | Public Member Functions | List of all members
Kopete::Command Class Reference

#include <kopetecommand.h>

Inheritance diagram for Kopete::Command:
Inheritance graph
[legend]

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

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
parentThe plugin who owns this command
commandThe command we want to handle, not including the '/'
handlerSlotThe 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.
helpAn optional help string to be shown when the user uses /help command
typeIf this command is an alias, and what type
formatStringThe formatString of the alias if any
minArgsMinimum number of arguments
maxArgsMaximum number of arguments
cutThe shortcut for the command
pixThe 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

Returns the command this object handles.

Definition at line 81 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)

const QString& Kopete::Command::help ( ) const
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.

CommandHandler::CommandType Kopete::Command::type ( ) const
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:
  • kopetecommand.h
  • kopetecommand.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/libkopete

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

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal