From 75a48db1459d4c386b867ae6536ff481adf34f1f Mon Sep 17 00:00:00 2001 From: ConfuSomu Date: Thu, 6 Apr 2023 15:57:55 -0400 Subject: Move call to get status HTML info into ListItem This makes the code less of a mess and will allow moving more of the code that renders HTML status info into the ListItem class. --- src/list_item.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/list_item.h') diff --git a/src/list_item.h b/src/list_item.h index c722a72..80a57ea 100644 --- a/src/list_item.h +++ b/src/list_item.h @@ -1,6 +1,7 @@ #pragma once #include +#include "src/archive_parser.h" #include "types.h" class ListItem : public QListWidgetItem { @@ -9,12 +10,14 @@ public: ArchiveListItemType = QListWidgetItem::UserType }; - ListItem(const QString &text, StatusType status_type, bool has_attachement, QListWidget *parent = nullptr, int index = 0); + ListItem(const QString &text, StatusType status_type, bool has_attachement, Archive* data_archive, QListWidget *parent = nullptr, int index = 0); int get_status_index(); StatusType get_status_type(); + QString get_info_html(int text_zone_width, QLocale* locale); private: int status_index; StatusType status_type; bool has_attachement = false; + Archive* data_archive; }; -- cgit v1.2.3-54-g00ecf