29#ifndef IRCCOMMANDPARSER_H
30#define IRCCOMMANDPARSER_H
34#include <QtCore/qobject.h>
35#include <QtCore/qmetatype.h>
36#include <QtCore/qstringlist.h>
40class IrcCommandParserPrivate;
45 Q_PROPERTY(QStringList commands READ commands NOTIFY commandsChanged)
46 Q_PROPERTY(QStringList triggers READ triggers WRITE setTriggers NOTIFY triggersChanged)
47 Q_PROPERTY(QStringList channels READ channels WRITE setChannels NOTIFY channelsChanged)
48 Q_PROPERTY(QString target READ target WRITE setTarget NOTIFY targetChanged)
49 Q_PROPERTY(
bool tolerant READ isTolerant WRITE setTolerant NOTIFY tolerancyChanged)
56 QStringList commands()
const;
66 Visual = NoTarget | NoPrefix | NoEllipsis
68 Q_DECLARE_FLAGS(Details, Detail)
70 Q_INVOKABLE QString syntax(
const QString& command, Details details = Visual)
const;
73 Q_INVOKABLE
void removeCommand(
IrcCommand::Type type,
const QString& syntax = QString());
75 QStringList triggers()
const;
77 QString target()
const;
78 QStringList channels()
const;
80 bool isTolerant()
const;
81 void setTolerant(
bool tolerant);
83 Q_INVOKABLE
IrcCommand* parse(
const QString& input)
const;
89 void setTriggers(
const QStringList& triggers);
90 void setChannels(
const QStringList& channels);
91 void setTarget(
const QString& target);
94 void commandsChanged(
const QStringList& commands);
95 void triggersChanged(
const QStringList& triggers);
96 void channelsChanged(
const QStringList& channels);
97 void targetChanged(
const QString& target);
98 void tolerancyChanged(
bool tolerant);
101 QScopedPointer<IrcCommandParserPrivate> d_ptr;
106Q_DECLARE_OPERATORS_FOR_FLAGS(IrcCommandParser::Details)
Parses commands from user input.
Definition: irccommandparser.h:43
Detail
Definition: irccommandparser.h:58
Provides the most common commands.
Definition: irccommand.h:45
Type
Definition: irccommand.h:55