~aleteoryx/muditaos

ref: 196c02686ae5b344e6814800b7cb8aa2473f15ea muditaos/module-apps/application-messages/widgets/SMSTemplateModel.hpp -rw-r--r-- 714 bytes
196c0268 — Przemyslaw Brudny [EGD-2395] Added BottomTop orientation support for listView. Created SMSThreadViewWindow and SMSOutputWidget. MessagesStyle moved from global Style.hpp. Fixes in Text. ListView fixes, BoxLayout callback for requestedSize. Added smsInput into list. Drafts handling added. 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include "Interface/SMSTemplateRecord.hpp"

#include <DatabaseModel.hpp>
#include <Application.hpp>
#include <ListItemProvider.hpp>

class SMSTemplateModel : public app::DatabaseModel<SMSTemplateRecord>, public gui::ListItemProvider
{
  public:
    SMSTemplateModel() = delete;
    SMSTemplateModel(app::Application *app);
    virtual ~SMSTemplateModel() = default;

    unsigned int requestRecordsCount() override;
    bool updateRecords(std::unique_ptr<std::vector<SMSTemplateRecord>> records) override;
    void requestRecords(const uint32_t offset, const uint32_t limit) override;

    unsigned int getMinimalItemHeight() const override;
    gui::ListItem *getItem(gui::Order order) override;
};