Hide Application classes behind pimpl.
This should also fix the build on windows where gcc gets confused as libmygpo declares DELETE as part of an enum and mingw #defines DELETE in winnt.h
This commit is contained in:
parent
b3d5cabdc1
commit
20bfade965
@ -22,8 +22,35 @@
|
|||||||
|
|
||||||
#include "application.h"
|
#include "application.h"
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "core/appearance.h"
|
||||||
|
#include "core/database.h"
|
||||||
|
#include "core/lazy.h"
|
||||||
|
#include "core/player.h"
|
||||||
|
#include "core/tagreaderclient.h"
|
||||||
|
#include "core/taskmanager.h"
|
||||||
|
#include "covers/albumcoverloader.h"
|
||||||
#include "covers/amazoncoverprovider.h"
|
#include "covers/amazoncoverprovider.h"
|
||||||
|
#include "covers/coverproviders.h"
|
||||||
|
#include "covers/currentartloader.h"
|
||||||
#include "covers/musicbrainzcoverprovider.h"
|
#include "covers/musicbrainzcoverprovider.h"
|
||||||
|
#include "devices/devicemanager.h"
|
||||||
|
#include "globalsearch/globalsearch.h"
|
||||||
|
#include "internet/core/internetmodel.h"
|
||||||
|
#include "internet/core/scrobbler.h"
|
||||||
|
#include "internet/podcasts/gpoddersync.h"
|
||||||
|
#include "internet/podcasts/podcastbackend.h"
|
||||||
|
#include "internet/podcasts/podcastdeleter.h"
|
||||||
|
#include "internet/podcasts/podcastdownloader.h"
|
||||||
|
#include "internet/podcasts/podcastupdater.h"
|
||||||
|
#include "library/librarybackend.h"
|
||||||
|
#include "library/library.h"
|
||||||
|
#include "moodbar/moodbarcontroller.h"
|
||||||
|
#include "moodbar/moodbarloader.h"
|
||||||
|
#include "networkremote/networkremote.h"
|
||||||
|
#include "networkremote/networkremotehelper.h"
|
||||||
|
#include "playlist/playlistbackend.h"
|
||||||
|
#include "playlist/playlistmanager.h"
|
||||||
|
|
||||||
#ifdef HAVE_LIBLASTFM
|
#ifdef HAVE_LIBLASTFM
|
||||||
#include "covers/lastfmcoverprovider.h"
|
#include "covers/lastfmcoverprovider.h"
|
||||||
@ -37,110 +64,137 @@
|
|||||||
|
|
||||||
bool Application::kIsPortable = false;
|
bool Application::kIsPortable = false;
|
||||||
|
|
||||||
Application::Application(QObject* parent)
|
class ApplicationImpl {
|
||||||
: QObject(parent),
|
public:
|
||||||
tag_reader_client_([&](){
|
ApplicationImpl(Application* app)
|
||||||
TagReaderClient* client = new TagReaderClient(this);
|
: tag_reader_client_([=]() {
|
||||||
MoveToNewThread(client);
|
TagReaderClient* client = new TagReaderClient(app);
|
||||||
client->Start();
|
app->MoveToNewThread(client);
|
||||||
return client;
|
client->Start();
|
||||||
}),
|
return client;
|
||||||
database_([&]() {
|
}),
|
||||||
Database* db = new Database(this, this);
|
database_([=]() {
|
||||||
MoveToNewThread(db);
|
Database* db = new Database(app, app);
|
||||||
DoInAMinuteOrSo(db, SLOT(DoBackup()));
|
app->MoveToNewThread(db);
|
||||||
return db;
|
DoInAMinuteOrSo(db, SLOT(DoBackup()));
|
||||||
}),
|
return db;
|
||||||
album_cover_loader_([&]() {
|
}),
|
||||||
AlbumCoverLoader* loader = new AlbumCoverLoader(this);
|
album_cover_loader_([=]() {
|
||||||
MoveToNewThread(loader);
|
AlbumCoverLoader* loader = new AlbumCoverLoader(app);
|
||||||
return loader;
|
app->MoveToNewThread(loader);
|
||||||
}),
|
return loader;
|
||||||
playlist_backend_([&]() {
|
}),
|
||||||
PlaylistBackend* backend = new PlaylistBackend(this, this);
|
playlist_backend_([=]() {
|
||||||
MoveToThread(backend, database_->thread());
|
PlaylistBackend* backend = new PlaylistBackend(app, app);
|
||||||
return backend;
|
app->MoveToThread(backend, database_->thread());
|
||||||
}),
|
return backend;
|
||||||
podcast_backend_([&]() {
|
}),
|
||||||
PodcastBackend* backend = new PodcastBackend(this, this);
|
podcast_backend_([=]() {
|
||||||
MoveToThread(backend, database_->thread());
|
PodcastBackend* backend = new PodcastBackend(app, app);
|
||||||
return backend;
|
app->MoveToThread(backend, database_->thread());
|
||||||
}),
|
return backend;
|
||||||
appearance_([=]() { return new Appearance(this); }),
|
}),
|
||||||
cover_providers_([=]() {
|
appearance_([=]() { return new Appearance(app); }),
|
||||||
CoverProviders* cover_providers = new CoverProviders(this);
|
cover_providers_([=]() {
|
||||||
// Initialize the repository of cover providers.
|
CoverProviders* cover_providers = new CoverProviders(app);
|
||||||
cover_providers->AddProvider(new AmazonCoverProvider);
|
// Initialize the repository of cover providers.
|
||||||
cover_providers->AddProvider(new MusicbrainzCoverProvider);
|
cover_providers->AddProvider(new AmazonCoverProvider);
|
||||||
|
cover_providers->AddProvider(new MusicbrainzCoverProvider);
|
||||||
#ifdef HAVE_LIBLASTFM
|
#ifdef HAVE_LIBLASTFM
|
||||||
cover_providers->AddProvider(new LastFmCoverProvider(this));
|
cover_providers->AddProvider(new LastFmCoverProvider(app));
|
||||||
#endif
|
#endif
|
||||||
return cover_providers;
|
return cover_providers;
|
||||||
}),
|
}),
|
||||||
task_manager_([=]() { return new TaskManager(this); }),
|
task_manager_([=]() { return new TaskManager(app); }),
|
||||||
player_([=]() { return new Player(this, this); }),
|
player_([=]() { return new Player(app, app); }),
|
||||||
playlist_manager_([=]() { return new PlaylistManager(this); }),
|
playlist_manager_([=]() { return new PlaylistManager(app); }),
|
||||||
current_art_loader_([=]() { return new CurrentArtLoader(this, this); }),
|
current_art_loader_([=]() { return new CurrentArtLoader(app, app); }),
|
||||||
global_search_([=]() { return new GlobalSearch(this, this); }),
|
global_search_([=]() { return new GlobalSearch(app, app); }),
|
||||||
internet_model_([=]() { return new InternetModel(this, this); }),
|
internet_model_([=]() { return new InternetModel(app, app); }),
|
||||||
library_([=]() { return new Library(this, this); }),
|
library_([=]() { return new Library(app, app); }),
|
||||||
device_manager_([=]() { return new DeviceManager(this, this); }),
|
device_manager_([=]() { return new DeviceManager(app, app); }),
|
||||||
podcast_updater_([=]() { return new PodcastUpdater(this, this); }),
|
podcast_updater_([=]() { return new PodcastUpdater(app, app); }),
|
||||||
podcast_deleter_([=]() {
|
podcast_deleter_([=]() {
|
||||||
PodcastDeleter* deleter = new PodcastDeleter(this, this);
|
PodcastDeleter* deleter = new PodcastDeleter(app, app);
|
||||||
MoveToNewThread(deleter);
|
app->MoveToNewThread(deleter);
|
||||||
return deleter;
|
return deleter;
|
||||||
}),
|
}),
|
||||||
podcast_downloader_([=]() {
|
podcast_downloader_([=]() { return new PodcastDownloader(app, app); }),
|
||||||
return new PodcastDownloader(this, this);
|
gpodder_sync_([=]() { return new GPodderSync(app, app); }),
|
||||||
}),
|
moodbar_loader_([=]() {
|
||||||
gpodder_sync_([=]() { return new GPodderSync(this, this); }),
|
|
||||||
moodbar_loader_([=]() {
|
|
||||||
#ifdef HAVE_MOODBAR
|
#ifdef HAVE_MOODBAR
|
||||||
return new MoodbarLoader(this, this);
|
return new MoodbarLoader(app, app);
|
||||||
#else
|
#else
|
||||||
return nullptr;
|
return nullptr;
|
||||||
#endif
|
#endif
|
||||||
}),
|
}),
|
||||||
moodbar_controller_([=]() {
|
moodbar_controller_([=]() {
|
||||||
#ifdef HAVE_MOODBAR
|
#ifdef HAVE_MOODBAR
|
||||||
return new MoodbarController(this, this);
|
return new MoodbarController(app, app);
|
||||||
#else
|
#else
|
||||||
return nullptr;
|
return nullptr;
|
||||||
#endif
|
#endif
|
||||||
}),
|
}),
|
||||||
network_remote_([=]() {
|
network_remote_([=]() {
|
||||||
NetworkRemote* remote = new NetworkRemote(this);
|
NetworkRemote* remote = new NetworkRemote(app);
|
||||||
MoveToNewThread(remote);
|
app->MoveToNewThread(remote);
|
||||||
return remote;
|
return remote;
|
||||||
}),
|
}),
|
||||||
network_remote_helper_([=]() {
|
network_remote_helper_([=]() { return new NetworkRemoteHelper(app); }),
|
||||||
return new NetworkRemoteHelper(this);
|
scrobbler_([=]() {
|
||||||
}),
|
|
||||||
scrobbler_([=]() {
|
|
||||||
#ifdef HAVE_LIBLASTFM
|
#ifdef HAVE_LIBLASTFM
|
||||||
return new LastFMService(this, this);
|
return new LastFMService(app, app);
|
||||||
#else
|
#else
|
||||||
return nullptr;
|
return nullptr;
|
||||||
#endif
|
#endif
|
||||||
}) {
|
}) {
|
||||||
|
}
|
||||||
|
|
||||||
|
Lazy<TagReaderClient> tag_reader_client_;
|
||||||
|
Lazy<Database> database_;
|
||||||
|
Lazy<AlbumCoverLoader> album_cover_loader_;
|
||||||
|
Lazy<PlaylistBackend> playlist_backend_;
|
||||||
|
Lazy<PodcastBackend> podcast_backend_;
|
||||||
|
Lazy<Appearance> appearance_;
|
||||||
|
Lazy<CoverProviders> cover_providers_;
|
||||||
|
Lazy<TaskManager> task_manager_;
|
||||||
|
Lazy<Player> player_;
|
||||||
|
Lazy<PlaylistManager> playlist_manager_;
|
||||||
|
Lazy<CurrentArtLoader> current_art_loader_;
|
||||||
|
Lazy<GlobalSearch> global_search_;
|
||||||
|
Lazy<InternetModel> internet_model_;
|
||||||
|
Lazy<Library> library_;
|
||||||
|
Lazy<DeviceManager> device_manager_;
|
||||||
|
Lazy<PodcastUpdater> podcast_updater_;
|
||||||
|
Lazy<PodcastDeleter> podcast_deleter_;
|
||||||
|
Lazy<PodcastDownloader> podcast_downloader_;
|
||||||
|
Lazy<GPodderSync> gpodder_sync_;
|
||||||
|
Lazy<MoodbarLoader> moodbar_loader_;
|
||||||
|
Lazy<MoodbarController> moodbar_controller_;
|
||||||
|
Lazy<NetworkRemote> network_remote_;
|
||||||
|
Lazy<NetworkRemoteHelper> network_remote_helper_;
|
||||||
|
Lazy<Scrobbler> scrobbler_;
|
||||||
|
};
|
||||||
|
|
||||||
|
Application::Application(QObject* parent)
|
||||||
|
: QObject(parent), p_(new ApplicationImpl(this)) {
|
||||||
// This must be before library_->Init();
|
// This must be before library_->Init();
|
||||||
// In the constructor the helper waits for the signal
|
// In the constructor the helper waits for the signal
|
||||||
// PlaylistManagerInitialized
|
// PlaylistManagerInitialized
|
||||||
// to start the remote. Without the playlist manager clementine can
|
// to start the remote. Without the playlist manager clementine can
|
||||||
// crash when a client connects before the manager is initialized!
|
// crash when a client connects before the manager is initialized!
|
||||||
network_remote_helper_.get();
|
network_remote_helper();
|
||||||
library_->Init();
|
library()->Init();
|
||||||
|
|
||||||
// TODO(John Maguire): Make this not a weird singleton.
|
// TODO(John Maguire): Make this not a weird singleton.
|
||||||
tag_reader_client_.get();
|
tag_reader_client();
|
||||||
}
|
}
|
||||||
|
|
||||||
Application::~Application() {
|
Application::~Application() {
|
||||||
// It's important that the device manager is deleted before the database.
|
// It's important that the device manager is deleted before the database.
|
||||||
// Deleting the database deletes all objects that have been created in its
|
// Deleting the database deletes all objects that have been created in its
|
||||||
// thread, including some device library backends.
|
// thread, including some device library backends.
|
||||||
device_manager_.reset();
|
p_->device_manager_.reset();
|
||||||
|
|
||||||
for (QThread* thread : threads_) {
|
for (QThread* thread : threads_) {
|
||||||
thread->quit();
|
thread->quit();
|
||||||
@ -175,14 +229,100 @@ QString Application::language_without_region() const {
|
|||||||
return language_name_;
|
return language_name_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Application::ReloadSettings() { emit SettingsChanged(); }
|
||||||
|
|
||||||
|
void Application::OpenSettingsDialogAtPage(SettingsDialog::Page page) {
|
||||||
|
emit SettingsDialogRequested(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
AlbumCoverLoader* Application::album_cover_loader() const {
|
||||||
|
return p_->album_cover_loader_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
Appearance* Application::appearance() const { return p_->appearance_.get(); }
|
||||||
|
|
||||||
|
CoverProviders* Application::cover_providers() const {
|
||||||
|
return p_->cover_providers_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
CurrentArtLoader* Application::current_art_loader() const {
|
||||||
|
return p_->current_art_loader_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
Database* Application::database() const { return p_->database_.get(); }
|
||||||
|
|
||||||
|
DeviceManager* Application::device_manager() const {
|
||||||
|
return p_->device_manager_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
GlobalSearch* Application::global_search() const {
|
||||||
|
return p_->global_search_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
GPodderSync* Application::gpodder_sync() const {
|
||||||
|
return p_->gpodder_sync_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
InternetModel* Application::internet_model() const {
|
||||||
|
return p_->internet_model_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
Library* Application::library() const { return p_->library_.get(); }
|
||||||
|
|
||||||
LibraryBackend* Application::library_backend() const {
|
LibraryBackend* Application::library_backend() const {
|
||||||
return library()->backend();
|
return library()->backend();
|
||||||
}
|
}
|
||||||
|
|
||||||
LibraryModel* Application::library_model() const { return library()->model(); }
|
LibraryModel* Application::library_model() const { return library()->model(); }
|
||||||
|
|
||||||
void Application::ReloadSettings() { emit SettingsChanged(); }
|
MoodbarController* Application::moodbar_controller() const {
|
||||||
|
return p_->moodbar_controller_.get();
|
||||||
void Application::OpenSettingsDialogAtPage(SettingsDialog::Page page) {
|
}
|
||||||
emit SettingsDialogRequested(page);
|
|
||||||
|
MoodbarLoader* Application::moodbar_loader() const {
|
||||||
|
return p_->moodbar_loader_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
NetworkRemoteHelper* Application::network_remote_helper() const {
|
||||||
|
return p_->network_remote_helper_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
NetworkRemote* Application::network_remote() const {
|
||||||
|
return p_->network_remote_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
Player* Application::player() const { return p_->player_.get(); }
|
||||||
|
|
||||||
|
PlaylistBackend* Application::playlist_backend() const {
|
||||||
|
return p_->playlist_backend_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
PlaylistManager* Application::playlist_manager() const {
|
||||||
|
return p_->playlist_manager_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
PodcastBackend* Application::podcast_backend() const {
|
||||||
|
return p_->podcast_backend_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
PodcastDeleter* Application::podcast_deleter() const {
|
||||||
|
return p_->podcast_deleter_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
PodcastDownloader* Application::podcast_downloader() const {
|
||||||
|
return p_->podcast_downloader_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
PodcastUpdater* Application::podcast_updater() const {
|
||||||
|
return p_->podcast_updater_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
Scrobbler* Application::scrobbler() const { return p_->scrobbler_.get(); }
|
||||||
|
|
||||||
|
TagReaderClient* Application::tag_reader_client() const {
|
||||||
|
return p_->tag_reader_client_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
TaskManager* Application::task_manager() const {
|
||||||
|
return p_->task_manager_.get();
|
||||||
}
|
}
|
||||||
|
@ -22,36 +22,37 @@
|
|||||||
#ifndef CORE_APPLICATION_H_
|
#ifndef CORE_APPLICATION_H_
|
||||||
#define CORE_APPLICATION_H_
|
#define CORE_APPLICATION_H_
|
||||||
|
|
||||||
#include "config.h"
|
#include <QObject>
|
||||||
#include "core/appearance.h"
|
|
||||||
#include "core/database.h"
|
|
||||||
#include "core/lazy.h"
|
|
||||||
#include "core/player.h"
|
|
||||||
#include "covers/albumcoverloader.h"
|
|
||||||
#include "covers/coverproviders.h"
|
|
||||||
#include "covers/currentartloader.h"
|
|
||||||
#include "devices/devicemanager.h"
|
|
||||||
#include "globalsearch/globalsearch.h"
|
|
||||||
#include "internet/core/internetmodel.h"
|
|
||||||
#include "internet/core/scrobbler.h"
|
|
||||||
#include "internet/podcasts/gpoddersync.h"
|
|
||||||
#include "internet/podcasts/podcastbackend.h"
|
|
||||||
#include "internet/podcasts/podcastdeleter.h"
|
|
||||||
#include "internet/podcasts/podcastdownloader.h"
|
|
||||||
#include "internet/podcasts/podcastupdater.h"
|
|
||||||
#include "library/librarybackend.h"
|
|
||||||
#include "library/library.h"
|
|
||||||
#include "moodbar/moodbarcontroller.h"
|
|
||||||
#include "moodbar/moodbarloader.h"
|
|
||||||
#include "networkremote/networkremote.h"
|
|
||||||
#include "networkremote/networkremotehelper.h"
|
|
||||||
#include "playlist/playlistbackend.h"
|
|
||||||
#include "playlist/playlistmanager.h"
|
|
||||||
#include "tagreaderclient.h"
|
|
||||||
#include "taskmanager.h"
|
|
||||||
#include "ui/settingsdialog.h"
|
#include "ui/settingsdialog.h"
|
||||||
|
|
||||||
#include <QObject>
|
class AlbumCoverLoader;
|
||||||
|
class Appearance;
|
||||||
|
class ApplicationImpl;
|
||||||
|
class CoverProviders;
|
||||||
|
class CurrentArtLoader;
|
||||||
|
class Database;
|
||||||
|
class DeviceManager;
|
||||||
|
class GlobalSearch;
|
||||||
|
class GPodderSync;
|
||||||
|
class InternetModel;
|
||||||
|
class Library;
|
||||||
|
class LibraryBackend;
|
||||||
|
class LibraryModel;
|
||||||
|
class MoodbarController;
|
||||||
|
class MoodbarLoader;
|
||||||
|
class NetworkRemote;
|
||||||
|
class NetworkRemoteHelper;
|
||||||
|
class Player;
|
||||||
|
class PlaylistBackend;
|
||||||
|
class PlaylistManager;
|
||||||
|
class PodcastBackend;
|
||||||
|
class PodcastDeleter;
|
||||||
|
class PodcastDownloader;
|
||||||
|
class PodcastUpdater;
|
||||||
|
class Scrobbler;
|
||||||
|
class TagReaderClient;
|
||||||
|
class TaskManager;
|
||||||
|
|
||||||
class Application : public QObject {
|
class Application : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -68,45 +69,32 @@ class Application : public QObject {
|
|||||||
QString language_without_region() const;
|
QString language_without_region() const;
|
||||||
void set_language_name(const QString& name) { language_name_ = name; }
|
void set_language_name(const QString& name) { language_name_ = name; }
|
||||||
|
|
||||||
TagReaderClient* tag_reader_client() const {
|
AlbumCoverLoader* album_cover_loader() const;
|
||||||
return tag_reader_client_.get();
|
Appearance* appearance() const;
|
||||||
}
|
CoverProviders* cover_providers() const;
|
||||||
Database* database() const { return database_.get(); }
|
CurrentArtLoader* current_art_loader() const;
|
||||||
AlbumCoverLoader* album_cover_loader() const {
|
Database* database() const;
|
||||||
return album_cover_loader_.get();
|
DeviceManager* device_manager() const;
|
||||||
}
|
GlobalSearch* global_search() const;
|
||||||
PlaylistBackend* playlist_backend() const { return playlist_backend_.get(); }
|
GPodderSync* gpodder_sync() const;
|
||||||
PodcastBackend* podcast_backend() const { return podcast_backend_.get(); }
|
InternetModel* internet_model() const;
|
||||||
Appearance* appearance() const { return appearance_.get(); }
|
Library* library() const;
|
||||||
CoverProviders* cover_providers() const { return cover_providers_.get(); }
|
|
||||||
TaskManager* task_manager() const { return task_manager_.get(); }
|
|
||||||
Player* player() const { return player_.get(); }
|
|
||||||
PlaylistManager* playlist_manager() const { return playlist_manager_.get(); }
|
|
||||||
CurrentArtLoader* current_art_loader() const {
|
|
||||||
return current_art_loader_.get();
|
|
||||||
}
|
|
||||||
GlobalSearch* global_search() const { return global_search_.get(); }
|
|
||||||
InternetModel* internet_model() const { return internet_model_.get(); }
|
|
||||||
Library* library() const { return library_.get(); }
|
|
||||||
DeviceManager* device_manager() const { return device_manager_.get(); }
|
|
||||||
PodcastUpdater* podcast_updater() const { return podcast_updater_.get(); }
|
|
||||||
PodcastDeleter* podcast_deleter() const { return podcast_deleter_.get(); }
|
|
||||||
PodcastDownloader* podcast_downloader() const {
|
|
||||||
return podcast_downloader_.get();
|
|
||||||
}
|
|
||||||
GPodderSync* gpodder_sync() const { return gpodder_sync_.get(); }
|
|
||||||
MoodbarLoader* moodbar_loader() const { return moodbar_loader_.get(); }
|
|
||||||
MoodbarController* moodbar_controller() const {
|
|
||||||
return moodbar_controller_.get();
|
|
||||||
}
|
|
||||||
NetworkRemote* network_remote() const { return network_remote_.get(); }
|
|
||||||
NetworkRemoteHelper* network_remote_helper() const {
|
|
||||||
return network_remote_helper_.get();
|
|
||||||
}
|
|
||||||
Scrobbler* scrobbler() const { return scrobbler_.get(); }
|
|
||||||
|
|
||||||
LibraryBackend* library_backend() const;
|
LibraryBackend* library_backend() const;
|
||||||
LibraryModel* library_model() const;
|
LibraryModel* library_model() const;
|
||||||
|
MoodbarController* moodbar_controller() const;
|
||||||
|
MoodbarLoader* moodbar_loader() const;
|
||||||
|
NetworkRemoteHelper* network_remote_helper() const;
|
||||||
|
NetworkRemote* network_remote() const;
|
||||||
|
Player* player() const;
|
||||||
|
PlaylistBackend* playlist_backend() const;
|
||||||
|
PlaylistManager* playlist_manager() const;
|
||||||
|
PodcastBackend* podcast_backend() const;
|
||||||
|
PodcastDeleter* podcast_deleter() const;
|
||||||
|
PodcastDownloader* podcast_downloader() const;
|
||||||
|
PodcastUpdater* podcast_updater() const;
|
||||||
|
Scrobbler* scrobbler() const;
|
||||||
|
TagReaderClient* tag_reader_client() const;
|
||||||
|
TaskManager* task_manager() const;
|
||||||
|
|
||||||
void MoveToNewThread(QObject* object);
|
void MoveToNewThread(QObject* object);
|
||||||
void MoveToThread(QObject* object, QThread* thread);
|
void MoveToThread(QObject* object, QThread* thread);
|
||||||
@ -123,32 +111,7 @@ signals:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QString language_name_;
|
QString language_name_;
|
||||||
|
ApplicationImpl* p_;
|
||||||
Lazy<TagReaderClient> tag_reader_client_;
|
|
||||||
Lazy<Database> database_;
|
|
||||||
Lazy<AlbumCoverLoader> album_cover_loader_;
|
|
||||||
Lazy<PlaylistBackend> playlist_backend_;
|
|
||||||
Lazy<PodcastBackend> podcast_backend_;
|
|
||||||
Lazy<Appearance> appearance_;
|
|
||||||
Lazy<CoverProviders> cover_providers_;
|
|
||||||
Lazy<TaskManager> task_manager_;
|
|
||||||
Lazy<Player> player_;
|
|
||||||
Lazy<PlaylistManager> playlist_manager_;
|
|
||||||
Lazy<CurrentArtLoader> current_art_loader_;
|
|
||||||
Lazy<GlobalSearch> global_search_;
|
|
||||||
Lazy<InternetModel> internet_model_;
|
|
||||||
Lazy<Library> library_;
|
|
||||||
Lazy<DeviceManager> device_manager_;
|
|
||||||
Lazy<PodcastUpdater> podcast_updater_;
|
|
||||||
Lazy<PodcastDeleter> podcast_deleter_;
|
|
||||||
Lazy<PodcastDownloader> podcast_downloader_;
|
|
||||||
Lazy<GPodderSync> gpodder_sync_;
|
|
||||||
Lazy<MoodbarLoader> moodbar_loader_;
|
|
||||||
Lazy<MoodbarController> moodbar_controller_;
|
|
||||||
Lazy<NetworkRemote> network_remote_;
|
|
||||||
Lazy<NetworkRemoteHelper> network_remote_helper_;
|
|
||||||
Lazy<Scrobbler> scrobbler_;
|
|
||||||
|
|
||||||
QList<QThread*> threads_;
|
QList<QThread*> threads_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "core/application.h"
|
#include "core/application.h"
|
||||||
#include "core/logging.h"
|
#include "core/logging.h"
|
||||||
#include "networkremote/networkremote.h"
|
#include "networkremote/networkremote.h"
|
||||||
|
#include "playlist/playlistmanager.h"
|
||||||
|
|
||||||
NetworkRemoteHelper* NetworkRemoteHelper::sInstance = nullptr;
|
NetworkRemoteHelper* NetworkRemoteHelper::sInstance = nullptr;
|
||||||
|
|
||||||
|
@ -15,17 +15,7 @@
|
|||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "fullscreenhypnotoad.h"
|
|
||||||
#include "nowplayingwidget.h"
|
#include "nowplayingwidget.h"
|
||||||
#include "core/application.h"
|
|
||||||
#include "covers/albumcoverloader.h"
|
|
||||||
#include "covers/coverproviders.h"
|
|
||||||
#include "covers/currentartloader.h"
|
|
||||||
#include "covers/kittenloader.h"
|
|
||||||
#include "library/librarybackend.h"
|
|
||||||
#include "networkremote/networkremote.h"
|
|
||||||
#include "ui/albumcoverchoicecontroller.h"
|
|
||||||
#include "ui/iconloader.h"
|
|
||||||
|
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
@ -38,6 +28,18 @@
|
|||||||
#include <QTimeLine>
|
#include <QTimeLine>
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
|
||||||
|
#include "fullscreenhypnotoad.h"
|
||||||
|
#include "core/application.h"
|
||||||
|
#include "core/logging.h"
|
||||||
|
#include "covers/albumcoverloader.h"
|
||||||
|
#include "covers/coverproviders.h"
|
||||||
|
#include "covers/currentartloader.h"
|
||||||
|
#include "covers/kittenloader.h"
|
||||||
|
#include "library/librarybackend.h"
|
||||||
|
#include "networkremote/networkremote.h"
|
||||||
|
#include "ui/albumcoverchoicecontroller.h"
|
||||||
|
#include "ui/iconloader.h"
|
||||||
|
|
||||||
const char* NowPlayingWidget::kSettingsGroup = "NowPlayingWidget";
|
const char* NowPlayingWidget::kSettingsGroup = "NowPlayingWidget";
|
||||||
|
|
||||||
const char* NowPlayingWidget::kHypnotoadPath = ":/hypnotoad.gif";
|
const char* NowPlayingWidget::kHypnotoadPath = ":/hypnotoad.gif";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user