Laying out main page and adding songlistmodel

This commit is contained in:
Chris Cochrun 2022-02-10 08:44:51 -06:00
parent f2a10ebfcc
commit 3bd74d1ca6
24 changed files with 816 additions and 454 deletions

33
src/serviceitem.h Normal file
View file

@ -0,0 +1,33 @@
#ifndef SERVICEITEM_H
#define SERVICEITEM_H
#include <QAbstractListModel>
class ServiceItem : public QAbstractListModel
{
Q_OBJECT
public:
explicit ServiceItem(QObject *parent = nullptr);
// Basic functionality:
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
// Editable:
bool setData(const QModelIndex &index, const QVariant &value,
int role = Qt::EditRole) override;
Qt::ItemFlags flags(const QModelIndex& index) const override;
// Add data:
bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
// Remove data:
bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
private:
};
#endif // SERVICEITEM_H