2
kircmessageredirector.h - IRC Client
4
Copyright (c) 2004-2007 by Michel Hermier <michel.hermier@gmail.com>
6
Kopete (c) 2004-2007 by the Kopete developers <kopete-devel@kde.org>
8
*************************************************************************
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
15
*************************************************************************
18
#ifndef KIRC_COMMAND_H
19
#define KIRC_COMMAND_H
21
#include "kircmessage.h"
33
// Q_PROPERTY(int min READ min WRITE setMin)
34
// Q_PROPERTY(int max READ max WRITE setMax)
35
// Q_PROPERTY(QString help READ help WRITE setHelp)
38
static QString expand(QString command, QString args);
47
CHECK_CONNECTED = 0x01
50
typdef QFlags<CheckFlag> CheckFlags;
52
explicit Command(QObject *parent = 0);
55
public: // READ properties accessors.
60
public slots: // WRITE properties accessors.
63
void setHelp(const QString &help);
66
// void setMinMax(int minMax);
67
// void setMinMax(int min, int max);
70
* Attempt to send the message.
72
virtual void handleMessage(KIrc::Message msg);
75
void redirect(KIrc::Message);
79
* Check that the given message can be send.
80
* @return true if the message can be send.
82
bool checkValidity(const Message &msg);
85
Q_DISABLE_COPY(Command)