Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
ModelTreeDownloadLogs.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_UI_PANELS_EDITOR_MODELTREEDOWNLOADLOGS_HPP_
2#define IV_SRC_UI_PANELS_EDITOR_MODELTREEDOWNLOADLOGS_HPP_
3
4#include "core/color.hpp"
8
9#include <memory>
10#include <optional>
11
12namespace iv::panels::editor
13{
14
16{
17public:
18 explicit ModelTreeDownloadLogs(
19 const std::shared_ptr<std::vector<std::shared_ptr<iv::logs::DownloadLoggerInfo>>> &downloadLogs,
20 const std::shared_ptr<std::mutex> &mutex);
21
22 [[nodiscard]] uint64_t numRows() const override;
23 [[nodiscard]] std::shared_ptr<CDataList> getDataCell(uint64_t indRow, uint64_t indColumn) const override;
24 [[nodiscard]] uint64_t getParentRow(uint64_t indRow) const override;
25 void addColumns(CTree *tree) override;
26
27 bool hasBackground(uint64_t indRow, uint64_t indColumn, iv::types::color *rgbBackground) const override;
28
29private:
30 std::weak_ptr<iv::logs::DownloadLogs> getLog(uint64_t indRow) const;
31
32 std::weak_ptr<std::vector<std::shared_ptr<iv::logs::DownloadLoggerInfo>>> m_downloadLogsRef;
33 std::shared_ptr<std::mutex> m_mutex;
34
35 mutable std::vector<std::vector<std::weak_ptr<iv::logs::DownloadLogs>>> m_flattenedLogs;
36};
37
38}// namespace iv::panels::editor
39
40#endif//IV_SRC_UI_PANELS_EDITOR_MODELTREEDOWNLOADLOGS_HPP_
Definition CTree.hpp:10
Definition IModelTree.hpp:14
Definition ModelTreeDownloadLogs.hpp:16
ModelTreeDownloadLogs(const std::shared_ptr< std::vector< std::shared_ptr< iv::logs::DownloadLoggerInfo > > > &downloadLogs, const std::shared_ptr< std::mutex > &mutex)
Definition ModelTreeDownloadLogs.cpp:12
std::vector< std::vector< std::weak_ptr< iv::logs::DownloadLogs > > > m_flattenedLogs
Definition ModelTreeDownloadLogs.hpp:35
std::shared_ptr< CDataList > getDataCell(uint64_t indRow, uint64_t indColumn) const override
Definition ModelTreeDownloadLogs.cpp:40
uint64_t getParentRow(uint64_t indRow) const override
Definition ModelTreeDownloadLogs.cpp:75
void addColumns(CTree *tree) override
Definition ModelTreeDownloadLogs.cpp:116
bool hasBackground(uint64_t indRow, uint64_t indColumn, iv::types::color *rgbBackground) const override
Definition ModelTreeDownloadLogs.cpp:134
std::shared_ptr< std::mutex > m_mutex
Definition ModelTreeDownloadLogs.hpp:33
std::weak_ptr< iv::logs::DownloadLogs > getLog(uint64_t indRow) const
Definition ModelTreeDownloadLogs.cpp:161
uint64_t numRows() const override
Definition ModelTreeDownloadLogs.cpp:20
std::weak_ptr< std::vector< std::shared_ptr< iv::logs::DownloadLoggerInfo > > > m_downloadLogsRef
Definition ModelTreeDownloadLogs.hpp:32
Definition ModelTreeLogicComponents.cpp:32
uint32_t color
Definition types.hpp:12