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");
84 d->timestamp = QDateTime::currentDateTime().toTime_t();
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 IGNORE_TYPE
'Null' Message object; ignore it.
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.
static const unsigned CUSTOM_ERROR
Programmer-defined error message.
static const unsigned CUSTOM_INFORMATION
Programmer-defined information message, not an error.
unsigned type() const
Message::Type.
QString contents() const
Customized displayable contents of this Message.