Wavelength
Privacy-focused, cross-platform, and open-source communication application
Loading...
Searching...
No Matches
message_formatter.h
Go to the documentation of this file.
1
#ifndef MESSAGE_FORMATTER_H
2
#define MESSAGE_FORMATTER_H
3
4
#include <QString>
5
6
class
QJsonObject;
7
15
class
MessageFormatter
{
16
public
:
34
static
QString
FormatMessage
(
const
QJsonObject &message_object,
const
QString &frequency);
35
44
static
QString
FormatFileSize
(qint64 size_in_bytes);
45
54
static
QString
FormatSystemMessage
(
const
QString &message);
55
};
56
57
#endif
// MESSAGE_FORMATTER_H
MessageFormatter
Provides static utility functions for formatting messages into HTML strings.
Definition
message_formatter.h:15
MessageFormatter::FormatSystemMessage
static QString FormatSystemMessage(const QString &message)
Formats a simple string as a system message.
Definition
message_formatter.cpp:151
MessageFormatter::FormatFileSize
static QString FormatFileSize(qint64 size_in_bytes)
Formats a file size in bytes into a human-readable string (e.g., "1.2 MB").
Definition
message_formatter.cpp:141
MessageFormatter::FormatMessage
static QString FormatMessage(const QJsonObject &message_object, const QString &frequency)
Formats a message represented by a JSON object into an HTML string.
Definition
message_formatter.cpp:7
src
chat
messages
formatter
message_formatter.h
Generated by
1.13.2