aboutsummaryrefslogtreecommitdiffstats
path: root/src/list_item.h
blob: d7305518aa039e11240ca4b5c57106d3f40d1caf (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/base_archive.h"
#include "types.h"

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

    StatusListItem(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();
    const QString get_info_html(int text_zone_width, QLocale* locale);

private:
    int status_index;
    StatusType status_type;
    bool has_attachement = false;
    Archive* data_archive;
};