Changeset View
Changeset View
Standalone View
Standalone View
src/models/datamodel.h
Show All 15 Lines | |||||
16 | */ | 16 | */ | ||
17 | 17 | | |||
18 | #ifndef DATAMODEL_H | 18 | #ifndef DATAMODEL_H | ||
19 | #define DATAMODEL_H | 19 | #define DATAMODEL_H | ||
20 | 20 | | |||
21 | #include "elisaLib_export.h" | 21 | #include "elisaLib_export.h" | ||
22 | 22 | | |||
23 | #include "elisautils.h" | 23 | #include "elisautils.h" | ||
24 | #include "databaseinterface.h" | 24 | #include "datatypes.h" | ||
25 | 25 | | |||
26 | #include <QAbstractListModel> | 26 | #include <QAbstractListModel> | ||
27 | #include <QVector> | 27 | #include <QVector> | ||
28 | #include <QHash> | 28 | #include <QHash> | ||
29 | #include <QString> | 29 | #include <QString> | ||
30 | 30 | | |||
31 | #include <memory> | 31 | #include <memory> | ||
32 | 32 | | |||
Show All 12 Lines | 38 | { | |||
45 | Q_PROPERTY(QString author | 45 | Q_PROPERTY(QString author | ||
46 | READ author | 46 | READ author | ||
47 | NOTIFY authorChanged) | 47 | NOTIFY authorChanged) | ||
48 | 48 | | |||
49 | Q_PROPERTY(bool isBusy READ isBusy NOTIFY isBusyChanged) | 49 | Q_PROPERTY(bool isBusy READ isBusy NOTIFY isBusyChanged) | ||
50 | 50 | | |||
51 | public: | 51 | public: | ||
52 | 52 | | |||
53 | using ListRadioDataType = DatabaseInterface::ListRadioDataType; | 53 | using ListRadioDataType = DataTypes::ListRadioDataType; | ||
54 | 54 | | |||
55 | using ListTrackDataType = DatabaseInterface::ListTrackDataType; | 55 | using ListTrackDataType = DataTypes::ListTrackDataType; | ||
56 | 56 | | |||
57 | using TrackDataType = DatabaseInterface::TrackDataType; | 57 | using TrackDataType = DataTypes::TrackDataType; | ||
58 | 58 | | |||
59 | using ListAlbumDataType = DatabaseInterface::ListAlbumDataType; | 59 | using ListAlbumDataType = DataTypes::ListAlbumDataType; | ||
60 | 60 | | |||
61 | using AlbumDataType = DatabaseInterface::AlbumDataType; | 61 | using AlbumDataType = DataTypes::AlbumDataType; | ||
62 | 62 | | |||
63 | using ListArtistDataType = DatabaseInterface::ListArtistDataType; | 63 | using ListArtistDataType = DataTypes::ListArtistDataType; | ||
64 | 64 | | |||
65 | using ArtistDataType = DatabaseInterface::ArtistDataType; | 65 | using ArtistDataType = DataTypes::ArtistDataType; | ||
66 | 66 | | |||
67 | using ListGenreDataType = DatabaseInterface::ListGenreDataType; | 67 | using ListGenreDataType = DataTypes::ListGenreDataType; | ||
68 | 68 | | |||
69 | using GenreDataType = DatabaseInterface::GenreDataType; | 69 | using GenreDataType = DataTypes::GenreDataType; | ||
70 | 70 | | |||
71 | using FilterType = ElisaUtils::FilterType; | 71 | using FilterType = ElisaUtils::FilterType; | ||
72 | 72 | | |||
73 | explicit DataModel(QObject *parent = nullptr); | 73 | explicit DataModel(QObject *parent = nullptr); | ||
74 | 74 | | |||
75 | ~DataModel() override; | 75 | ~DataModel() override; | ||
76 | 76 | | |||
77 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; | 77 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; | ||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |