1 /*
2     SPDX-FileCopyrightText: 2007 Nicolas Ternisien <nicolas.ternisien@gmail.com>
3 
4     SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <QDateTime>
10 #include <QString>
11 
12 class LogViewWidgetItem;
13 class LogLine;
14 
15 class LogModeItemBuilder
16 {
17 public:
18     LogModeItemBuilder();
19 
20     virtual ~LogModeItemBuilder();
21 
22     virtual void prepareItem(LogViewWidgetItem *item) const;
23 
24     virtual QString createFormattedText(LogLine *line) const;
25     virtual QString createToolTipText(LogLine *line) const;
26 
27 protected:
28     QString labelMessageFormat(const QString &label, const QString &value) const;
29     QString messageFormat(const QString &message) const;
30 
31     virtual QString formatDate(const QDateTime &dateTime) const;
32 };
33 
34