15 #ifndef IRCCOMMANDPARSER_H
16 #define IRCCOMMANDPARSER_H
20 #include <QtCore/qobject.h>
21 #include <QtCore/qmetatype.h>
22 #include <QtCore/qstringlist.h>
26 class IrcCommandParserPrivate;
31 Q_PROPERTY(
QStringList commands READ commands NOTIFY commandsChanged)
32 Q_PROPERTY(
QStringList triggers READ triggers WRITE setTriggers NOTIFY triggersChanged)
33 Q_PROPERTY(
QStringList channels READ channels WRITE setChannels NOTIFY channelsChanged)
34 Q_PROPERTY(
QString target READ target WRITE setTarget NOTIFY targetChanged)
35 Q_PROPERTY(
bool tolerant READ isTolerant WRITE setTolerant NOTIFY tolerancyChanged)
52 Visual = NoTarget | NoPrefix | NoEllipsis
54 Q_DECLARE_FLAGS(Details, Detail)
56 Q_INVOKABLE
QString syntax(const
QString& command, Details details = Visual) const;
63 QString target() const;
66 bool isTolerant() const;
67 void setTolerant(
bool tolerant);
69 Q_INVOKABLE
IrcCommand* parse(const QString& input) const;
77 void setTarget(const QString& target);
83 void targetChanged(const QString& target);
84 void tolerancyChanged(
bool tolerant);
92 Q_DECLARE_OPERATORS_FOR_FLAGS(IrcCommandParser::Details)
96 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(IrcCommandParser*))
98 #endif // IRCCOMMANDPARSER_H
Provides the most common commands.
Definition: irccommand.h:29
Detail
Definition: irccommandparser.h:44
Parses commands from user input.
Definition: irccommandparser.h:28