mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-07-25 15:28:27 -04:00
46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "BaseThreadItem.hpp"
|
|
#include "../models/ThreadModel.hpp"
|
|
|
|
namespace gui
|
|
{
|
|
|
|
class ThreadItem : public BaseThreadItem
|
|
{
|
|
ThreadModel *model = nullptr;
|
|
std::shared_ptr<ThreadRecord> thread = nullptr;
|
|
|
|
void setPreview();
|
|
|
|
public:
|
|
ThreadItem(ThreadModel *model);
|
|
void setThreadItem(std::shared_ptr<ThreadRecord> thread);
|
|
std::shared_ptr<ThreadRecord> getThreadItem()
|
|
{
|
|
return thread;
|
|
}
|
|
|
|
static ThreadItem *makeThreadItem(ThreadModel *model, std::shared_ptr<ThreadRecord> thread);
|
|
};
|
|
|
|
class ThreadItemWithIndicator : public ThreadItem
|
|
{
|
|
gui::Image *indicator = nullptr;
|
|
|
|
void onDimensionChangedBottom(const BoundingBox &oldDim, const BoundingBox &newDim) override;
|
|
|
|
public:
|
|
ThreadItemWithIndicator(ThreadModel *model, const UTF8 &indicatorName);
|
|
};
|
|
|
|
class ThreadItemNotRead : public ThreadItemWithIndicator
|
|
{
|
|
static const inline UTF8 indicatorName = "dot_12px_hard_alpha_W_M";
|
|
|
|
public:
|
|
ThreadItemNotRead(ThreadModel *model);
|
|
};
|
|
|
|
} /*namespace gui*/
|