void NowPlayingWidget::SetApplication(Application* app) { app_ = app; album_cover_choice_controller_->SetApplication(app_); connect(app_->current_art_loader(), SIGNAL(ArtLoaded(Song, QString, QImage)), SLOT(AlbumArtLoaded(Song, QString, QImage))); }
void OSD::ShowPreview(const Behaviour type, const QString& line1, const QString& line2, const Song& song) { behaviour_ = type; custom_text1_ = line1; custom_text2_ = line2; if (!use_custom_text_) use_custom_text_ = true; // We want to reload the settings, but we can't do this here because the cover art loading is asynch preview_mode_ = true; AlbumArtLoaded(song, QString(), QImage()); }
GlobalSearch::GlobalSearch(Application* app, QObject* parent) : QObject(parent), app_(app), next_id_(1), url_provider_(new UrlSearchProvider(app, this)) { cover_loader_options_.desired_height_ = SearchProvider::kArtHeight; cover_loader_options_.pad_output_image_ = true; cover_loader_options_.scale_output_image_ = true; connect(app_->album_cover_loader(), SIGNAL(ImageLoaded(quint64, QImage)), SLOT(AlbumArtLoaded(quint64, QImage))); connect(this, SIGNAL(SearchAsyncSig(int,QString)), this, SLOT(DoSearchAsync(int,QString))); ConnectProvider(url_provider_); }
void SoundCloudSearchProvider::Init(SoundCloudService* service) { service_ = service; SearchProvider::Init( "SoundCloud", "soundcloud", IconLoader::Load("soundcloud", IconLoader::Provider), WantsDelayedQueries | ArtIsProbablyRemote | CanShowConfig); connect(service_, SIGNAL(SimpleSearchResults(int, SongList)), SLOT(SearchDone(int, SongList))); cover_loader_options_.desired_height_ = kArtHeight; cover_loader_options_.pad_output_image_ = true; cover_loader_options_.scale_output_image_ = true; connect(app_->album_cover_loader(), SIGNAL(ImageLoaded(quint64, QImage)), SLOT(AlbumArtLoaded(quint64, QImage))); }
OSD::OSD(SystemTrayIcon* tray_icon, Application* app, QObject* parent) : QObject(parent), tray_icon_(tray_icon), app_(app), timeout_msec_(5000), behaviour_(Native), show_on_volume_change_(false), show_art_(true), show_on_play_mode_change_(true), use_custom_text_(false), custom_text1_(QString()), custom_text2_(QString()), preview_mode_(false), force_show_next_(false), ignore_next_stopped_(false), pretty_popup_(new OSDPretty(OSDPretty::Mode_Popup)) { connect(app_->current_art_loader(), SIGNAL(ThumbnailLoaded(Song,QString,QImage)), SLOT(AlbumArtLoaded(Song,QString,QImage))); ReloadSettings(); Init(); }
void OSD::ReshowCurrentSong() { force_show_next_ = true; AlbumArtLoaded(last_song_, last_image_uri_, last_image_); }