30 return tr(
"You have been banned from master server.");
32 return QString(
"%1 IS NOT A VALID ERROR MESSAGE! FIX THIS!").arg(messageType);
49 d->type = Type::IGNORE_TYPE;
80 void Message::construct()
82 qRegisterMetaType<Message>(
"Message");
83 d->type = Type::IGNORE_TYPE;
84 d->timestamp = QDateTime::currentDateTime().toTime_t();
101 return type() == Type::CUSTOM_ERROR || type() == Type::CUSTOM_INFORMATION;
106 return type() >= Type::CUSTOM_ERROR;
111 return type() == Type::IGNORE_TYPE;
116 return (type() >= Type::CUSTOM_INFORMATION) && (type() < Type::CUSTOM_ERROR);
Message()
'Null' message object, returns true on isIgnore().
Message object used to pass messages throughout the Doomseeker's system.
bool isInformation() const
True if type() is equal to or greater than CUSTOM_INFORMATION, and lesser than CUSTOM_ERROR.
bool isError() const
True if type() is equal to or greater than CUSTOM_ERROR.
bool isIgnore() const
True for 'Null' messages.
unsigned timestamp() const
Generation time in seconds since UTC epoch.
static const unsigned BANNED_FROM_MASTERSERVER
Information indicating that current player is banned from given server.
bool isCustom() const
True if type() equals to CUSTOM_INFORMATION or CUSTOM_ERROR.
static QString getMessage(unsigned messageType)
Gets static string for a Message::Type.
unsigned type() const
Message::Type.
QString contents() const
Customized displayable contents of this Message.