Rename model method to match the rust API

This commit is contained in:
Olivier Goffart 2020-09-15 14:07:41 +02:00
parent 37e550e540
commit 2ae4f1757b
2 changed files with 19 additions and 10 deletions

View file

@ -14,8 +14,8 @@ using InkData = std::tuple<sixtyfps::Color, float>;
struct InkLevelModel : sixtyfps::Model<InkData>
{
int count() const override { return m_data.size(); }
InkData get(int i) const override { return m_data[i]; }
int row_count() const override { return m_data.size(); }
InkData row_data(int i) const override { return m_data[i]; }
std::vector<InkData> m_data = { { sixtyfps::Color::from_rgb_uint8(255, 255, 0), 0.9 },
{ sixtyfps::Color::from_rgb_uint8(0, 255, 255), 0.5 },