Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
trinity/include/emotelistmodel.h
2022-08-15 21:53:56 -04:00

26 lines
505 B
C++

#pragma once
#include <QAbstractListModel>
#include <QDebug>
#include "emote.h"
class EmoteListModel : public QAbstractListModel {
Q_OBJECT
public:
int rowCount(const QModelIndex& parent) const override;
QVariant data(const QModelIndex& index, int role) const override;
void setList(QList<Emote*>* emotes) {
this->emotes = emotes;
emit layoutChanged();
}
void update() {
emit layoutChanged();
}
protected:
QList<Emote*>* emotes = nullptr;
};