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.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/list_item.h (limited to 'src/list_item.h') diff --git a/src/list_item.h b/src/list_item.h new file mode 100644 index 0000000..e2b3c3f --- /dev/null +++ b/src/list_item.h @@ -0,0 +1,18 @@ +#pragma once + +#include +#include "types.h" + +class ListItem : QListWidgetItem { +public: + enum ItemType { + ArchiveListItemType = QListWidgetItem::UserType + }; + + ListItem(const QString &text, StatusType status_type, QListWidget *parent = nullptr, int index = 0); + +private: + int status_index; + StatusType status_type; + bool has_attachement; +}; -- cgit v1.2.3-54-g00ecf