-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsongshopmodel.h
More file actions
34 lines (23 loc) · 813 Bytes
/
songshopmodel.h
File metadata and controls
34 lines (23 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef SONGSHOPMODEL_H
#define SONGSHOPMODEL_H
#include <QAbstractTableModel>
#include "songshop.h"
class SongShopModel : public QAbstractTableModel
{
Q_OBJECT
public:
explicit SongShopModel(SongShop *songShop, QObject *parent = 0);
// Header:
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
SongShop *getShop() { return shop; }
private:
SongShop *shop;
ShopSongs songs;
private slots:
void songShopUpdating();
void songShopUpdated();
};
#endif // SONGSHOPMODEL_H