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

#include <QListWidgetItem>
#include "src/activitypub/apactivity.h"
#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();
    APActivity* get_activity();
    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;
};