mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 09:33:25 -08:00
TabReport becomes a dashboard: selected-report identity header (display-size user, bold status, category/time/room subline), Description/Chat/Comments/Reported-user tabbed sections with tab memory, always-visible user context with empty cues, and bold reported users. ReportStatusDelegate paints palette-tinted status pills with paint-through selection, translated status strings, and font/elision handling. report_utils gains formatReportStatus plus an opt-out status-color flag so the delegate owns color in the mod queue while the user dialog keeps its colors. Async responses stay guarded; retranslation re-applies header and comment states.
39 lines
1.2 KiB
C++
39 lines
1.2 KiB
C++
#ifndef REPORT_UTILS_H
|
|
#define REPORT_UTILS_H
|
|
|
|
#include <QString>
|
|
#include <QtGlobal>
|
|
|
|
class QTableWidget;
|
|
class QTextEdit;
|
|
class ServerInfo_Report;
|
|
|
|
namespace report_utils
|
|
{
|
|
|
|
QString formatReportCategory(const QString &category);
|
|
QString formatReportTime(qint64 secondsSinceEpoch);
|
|
QString formatReportStatus(const QString &status);
|
|
|
|
void fillReportTableRow(QTableWidget *table,
|
|
int row,
|
|
const ServerInfo_Report &report,
|
|
int idColumn,
|
|
int timeColumn,
|
|
int reportedColumn,
|
|
int categoryColumn,
|
|
int gameIdColumn,
|
|
int statusColumn,
|
|
int assignedColumn,
|
|
bool colorizeStatus = true);
|
|
|
|
void renderReportDetails(QTextEdit *chatLogEdit,
|
|
QTextEdit *commentsEdit,
|
|
const ServerInfo_Report &report,
|
|
const QString &commentsEmptyText,
|
|
const QString &moderatorPrefix,
|
|
const QString &nonModeratorPrefix);
|
|
|
|
} // namespace report_utils
|
|
|
|
#endif // REPORT_UTILS_H
|