aboutsummaryrefslogtreecommitdiffstats
path: root/src/list_item.h
blob: 80a57ead140ea3ed02ff6f0aa43f3e74b06a858b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include <QListWidgetItem>
#include "src/archive_parser.h"
#include "types.h"

class ListItem : public QListWidgetItem {
public:
    enum ItemType {
        ArchiveListItemType = QListWidgetItem::UserType
    };

    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;
};