aboutsummaryrefslogtreecommitdiffstats
path: root/src/list_item.cpp
diff options
context:
space:
mode:
authorConfuSomu2022-12-27 03:58:29 -0500
committerConfuSomu2022-12-27 03:58:29 -0500
commit006d3cec6779ee85337bbabe02a6ff859d71f656 (patch)
treed6e95bfcb0af314cdaf0f20a59f3d8545c6d9d5f /src/list_item.cpp
parent941bd57371360eb01a28899aa62ee6c9dcca33c8 (diff)
downloadActorViewer-006d3cec6779ee85337bbabe02a6ff859d71f656.tar
ActorViewer-006d3cec6779ee85337bbabe02a6ff859d71f656.tar.gz
ActorViewer-006d3cec6779ee85337bbabe02a6ff859d71f656.zip
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.
Diffstat (limited to 'src/list_item.cpp')
-rw-r--r--src/list_item.cpp12
1 files changed, 12 insertions, 0 deletions
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)
+{
+
+}