Add source to songs and playlist_items
This commit is contained in:
@@ -27,8 +27,10 @@
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
#include <QIcon>
|
||||
|
||||
#include "core/song.h"
|
||||
#include "core/iconloader.h"
|
||||
#include "playlist/playlistitem.h"
|
||||
#include "settings/settingsdialog.h"
|
||||
|
||||
@@ -40,14 +42,15 @@ class InternetService : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
InternetService(const QString &name, Application *app, InternetModel *model, QObject *parent = nullptr);
|
||||
InternetService(Song::Source source, const QString &name, Application *app, InternetModel *model, QObject *parent = nullptr);
|
||||
virtual ~InternetService() {}
|
||||
Song::Source source() const { return source_; }
|
||||
QString name() const { return name_; }
|
||||
InternetModel *model() const { return model_; }
|
||||
virtual bool has_initial_load_settings() const { return false; }
|
||||
virtual void InitialLoadSettings() {}
|
||||
virtual void ReloadSettings() {}
|
||||
virtual QString Icon() { return QString(); }
|
||||
virtual QIcon Icon() { return Song::IconForSource(source_); }
|
||||
|
||||
public slots:
|
||||
virtual void ShowConfig() {}
|
||||
@@ -56,6 +59,7 @@ class InternetService : public QObject {
|
||||
Application *app_;
|
||||
private:
|
||||
InternetModel *model_;
|
||||
Song::Source source_;
|
||||
QString name_;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user