#ifndef FOODPLANMODEL_H #define FOODPLANMODEL_H #include #include #include "serverconn.h" class FoodPlanModel : public QAbstractListModel { Q_OBJECT public: explicit FoodPlanModel(QObject *parent = nullptr); ~FoodPlanModel(); enum DishRole { CookteamRole = Qt::DisplayRole, DateRole, MainDishRole, MainDishVegRole, GarnishRole, DessertRole }; Q_ENUM(DishRole) int rowCount(const QModelIndex & = QModelIndex()) const; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; QHash roleNames() const; Q_INVOKABLE QVariantMap get(int row) const; private: struct Dish { QString cookteam; QString date; QString mainDish; QString mainDishVeg; QString garnish; QString dessert; }; QList m_foodPlan; public slots: }; #endif // FOODPLANMODEL_H