Files
llink/src/particlelistmodel.h
T
2026-01-28 16:20:49 -08:00

27 lines
653 B
C++

#ifndef PARTICLELISTMODEL_H
#define PARTICLELISTMODEL_H
#include <QAbstractListModel>
#include "data.h"
class ParticleListModel : public QAbstractListModel
{
Q_OBJECT
public:
explicit ParticleListModel(Data *data, QObject *parent = nullptr);
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
void setStreamId(const QString &streamId);
int firstUnseenRow() const; // Returns -1 if none unseen
const Particle* particleAtRow(int row) const;
private:
Data *m_data;
QString m_currentStreamId;
};
#endif // PARTICLELISTMODEL_H