QtCraft API C++ classes QML types Handbook

QcMsg::ChatMessage Struct

struct QcMsg::ChatMessage

Server -> client: chat line or command feedback. More...

Header: #include <common/protocol/QcSessionMessages.h>

Public Variables

QStringList arguments
QStringList contentKeys
QString key
QString text

Static Public Members

const quint32 maxArguments
const qsizetype maxContentKey

Detailed Description

text is the English line; a non-empty key with its arguments lets the client show it translated (QcChatText, decision E-094).

Member Variable Documentation

QStringList ChatMessage::arguments

The arguments of the key's text.

QStringList ChatMessage::contentKeys

Per argument the content translation key it stands for (decision E-873; the kind of the creature that killed a player): the client shows the key's text in its content language and the argument (English) where it knows none. Empty, or as long as arguments (empty entries for plain arguments). An entry with QcChatText::messageKeyPrefix names a server message instead, which the client translates (decision E-911).

QString ChatMessage::key

The translation key; may be empty.

const quint32 ChatMessage::maxArguments

The most arguments, and content keys; the decoder refuses more.

const qsizetype ChatMessage::maxContentKey

The longest content key; the decoder refuses a longer one.

QString ChatMessage::text

The English line.