#ifndef TRAYLISTVIEWITEMMODEL_H
#define TRAYLISTVIEWITEMMODEL_H

#include <QIcon>
#include <QAbstractItemModel>

class TrayListViewItemModel : public QAbstractItemModel
{
public:
    TrayListViewItemModel(QObject* parent = nullptr);

    void addDevice(const QString& iconPath, const QVariantList& list);
    void removeDevice(const QString& portName, const QString& devName);

    virtual QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override;
    virtual QModelIndex parent(const QModelIndex&) const override;
    virtual int rowCount(const QModelIndex& parent = QModelIndex()) const override;
    virtual int columnCount(const QModelIndex& parent = QModelIndex()) const override;
    virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;

private:
    std::vector<std::pair<QIcon, QVariantList>> devices;
};


#endif // TRAYLISTVIEWITEMMODEL_H
