19#ifndef JELLYFIN_VIEWMODEL_UTILS_H
20#define JELLYFIN_VIEWMODEL_UTILS_H
23#include <QSharedPointer>
41template<
typename W,
typename D>
43 return new W(QSharedPointer<D>::create(data), parent);
53template<
typename W,
typename D,
typename It>
56 for (It it = begin; it != end; it++) {
69template<
typename W,
typename D,
typename It>
72 for (It it = begin; it != end; it++) {
W * wrapQObject(D data, QObject *parent)
Wraps a data object in a QObject.
Definition utils.h:42
QObjectList wrapQObjectList(It begin, It end, QObject *parent)
Wraps a list of DTO items in a QObjectList.
Definition utils.h:70
QVariantList wrapQVariantList(It begin, It end, QObject *parent)
Wraps a list of DTO items in a QVariantList of QObject's.
Definition utils.h:54