From 006d3cec6779ee85337bbabe02a6ff859d71f656 Mon Sep 17 00:00:00 2001 From: ConfuSomu Date: Tue, 27 Dec 2022 03:58:29 -0500 Subject: Store metadata of items that are in status list There is more control and customizability of elements added to the status list, which allows us to set the icon used and also to store additional information about the status that has been selected, useful when we have to display it with more detail. --- src/list_item.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/list_item.cpp (limited to 'src/list_item.cpp') diff --git a/src/list_item.cpp b/src/list_item.cpp new file mode 100644 index 0000000..6409169 --- /dev/null +++ b/src/list_item.cpp @@ -0,0 +1,12 @@ +#include "list_item.h" +#include "types.h" + +QIcon* choose_icon(StatusType status_type) { + return new QIcon(); // TODO: null icon for the moment +} + +ListItem::ListItem(const QString &text, StatusType status_type, QListWidget *parent, int index) : + QListWidgetItem(*choose_icon(status_type), text, parent, ArchiveListItemType), status_index(index) +{ + +} -- cgit v1.2.3-54-g00ecf