10#include <QAbstractListModel>
16 explicit TipOfTheDay(QString _title, QString _content, QString _imagePath, QDate _date);
51 explicit TipsOfTheDay(QString xmlPath, QObject *parent =
nullptr);
54 [[nodiscard]]
int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
55 [[nodiscard]] QVariant
data(
const QModelIndex &index,
int role)
const override;
Definition tip_of_the_day.h:14
QString getTitle() const
Definition tip_of_the_day.h:17
QString getContent() const
Definition tip_of_the_day.h:21
QDate getDate() const
Definition tip_of_the_day.h:29
QString content
Definition tip_of_the_day.h:35
QDate date
Definition tip_of_the_day.h:36
QString getImagePath() const
Definition tip_of_the_day.h:25
QString imagePath
Definition tip_of_the_day.h:35
QString title
Definition tip_of_the_day.h:35
TipOfTheDay(QString _title, QString _content, QString _imagePath, QDate _date)
Definition tip_of_the_day.cpp:12
TipOfTheDay getTip(int tipId)
Definition tip_of_the_day.cpp:94
~TipsOfTheDay() override
Definition tip_of_the_day.cpp:69
Columns
Definition tip_of_the_day.h:44
@ ContentColumn
Definition tip_of_the_day.h:46
@ TitleColumn
Definition tip_of_the_day.h:45
@ ImagePathColumn
Definition tip_of_the_day.h:47
@ DateColumn
Definition tip_of_the_day.h:48
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Definition tip_of_the_day.cpp:99
QList< TipOfTheDay > * tipList
Definition tip_of_the_day.h:58
TipsOfTheDay(QString xmlPath, QObject *parent=nullptr)
Definition tip_of_the_day.cpp:17
QVariant data(const QModelIndex &index, int role) const override
Definition tip_of_the_day.cpp:74