mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-07-04 05:06:58 -04:00
* WiP on thread view. * Missing db code. * Fixes in sericeDB, working on listView in threads window. * Changes in thread Db message. * Missing responseTo value bug tracking. * Fixed threads DB getter. * Show threads list. * Added missing code in service-db. * Small fixes. * WiP listView swich page. * Code clean-up. * Code formatted. * PR sugestions applied.
43 lines
993 B
C++
43 lines
993 B
C++
/*
|
|
* ThreadeModel.hpp
|
|
*
|
|
* Created on: 13 lis 2019
|
|
* Author: kuba
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <vector>
|
|
#include <stdint.h>
|
|
|
|
#include "DatabaseModel.hpp"
|
|
#include "Application.hpp"
|
|
#include "ListItemProvider.hpp"
|
|
#include "Interface/ThreadRecord.hpp"
|
|
|
|
class ThreadModel: public app::DatabaseModel<ThreadRecord>,
|
|
public gui::ListItemProvider {
|
|
public:
|
|
ThreadModel() = delete;
|
|
ThreadModel(app::Application *app);
|
|
virtual ~ThreadModel() = default;
|
|
|
|
void requestRecordsCount() override;
|
|
bool updateRecords(std::unique_ptr<std::vector<ThreadRecord>> records,
|
|
const uint32_t offset, const uint32_t limit, uint32_t count)
|
|
override;
|
|
void requestRecords(const uint32_t offset, const uint32_t limit) override;
|
|
|
|
gui::ListItem* getItem(int index, int firstElement, int prevElement,
|
|
uint32_t limit, int remaining, bool topDown) override;
|
|
int getItemCount() const override {
|
|
return recordsCount;
|
|
}
|
|
;
|
|
app::Application* getApplication(void) {
|
|
return application;
|
|
}
|
|
;
|
|
};
|
|
|