backend now uses the new classes and compiles some functions

might still need reworking
This commit is contained in:
Chris Cochrun 2023-01-20 07:05:51 -06:00
parent 9bee92a9e4
commit f503622287
9 changed files with 401 additions and 363 deletions

View file

@ -13,7 +13,7 @@ class ServiceItemModel : public QAbstractListModel {
Q_OBJECT
public:
explicit ServiceItemModel(QObject *parent = nullptr, SlideModel *slideModel = nullptr);
explicit ServiceItemModel(QObject *parent = nullptr);
enum Roles {
NameRole = Qt::UserRole,
@ -72,7 +72,7 @@ public:
const QString &backgroundType,
const QStringList &text, const QString &audio,
const QString &font, const int &fontSize,
const int &slideNumber);
const int &slideNumber, SlideModel &slideModel);
Q_INVOKABLE void insertItem(const int &index, const QString &name,
const QString &type);
Q_INVOKABLE void insertItem(const int &index, const QString &name,
@ -93,7 +93,8 @@ public:
const QString &type, const QString &background,
const QString &backgroundType, const QStringList &text,
const QString &audio, const QString &font,
const int &fontSize, const int &slideNumber);
const int &fontSize, const int &slideNumber,
SlideModel &slideModel);
Q_INVOKABLE void removeItem(int index);
Q_INVOKABLE bool moveRows(int sourceIndex, int destIndex, int count);
Q_INVOKABLE bool moveDown(int index);
@ -106,10 +107,11 @@ public:
Q_INVOKABLE void clearAll();
Q_INVOKABLE bool save(QUrl file);
Q_INVOKABLE bool load(QUrl file);
Q_INVOKABLE bool loadLastSaved();
Q_INVOKABLE bool load(QUrl file, SlideModel &slideModel);
Q_INVOKABLE bool loadLastSaved(SlideModel &slideModel);
private:
QList<ServiceItem *> m_items;
};