SavedRadioSearchProvider::SavedRadioSearchProvider(SavedRadio* service, Application* app, QObject* parent) : SimpleSearchProvider(app, parent), service_(service) { Init(tr("Your radio streams"), "savedradio", IconLoader::Load("document-open-remote"), MimeDataContainsUrlsOnly); set_max_suggestion_count(3); connect(service_, SIGNAL(StreamsChanged()), SLOT(MaybeRecreateItems())); RecreateItems(); }
IntergalacticFMSearchProvider::IntergalacticFMSearchProvider( IntergalacticFMServiceBase* service, Application* app, QObject* parent) : SimpleSearchProvider(app, parent), service_(service) { Init(service->name(), service->url_scheme(), service->icon(), CanGiveSuggestions); set_result_limit(3); set_max_suggestion_count(3); icon_ = ScaleAndPad( service->icon().pixmap(service->icon().availableSizes()[0]).toImage()); connect(service, SIGNAL(StreamsChanged()), SLOT(MaybeRecreateItems())); // Load the stream list on startup only if it doesn't involve going to update // info from the server. if (!service_->IsStreamListStale()) RecreateItems(); }
LastFMSearchProvider::LastFMSearchProvider(LastFMService* service, Application* app, QObject* parent) : SimpleSearchProvider(app, parent), service_(service) { Init("Last.fm", "lastfm", QIcon(":last.fm/as.png"), CanShowConfig | CanGiveSuggestions); icon_ = ScaleAndPad(QImage(":last.fm/as.png")); set_safe_words(QStringList() << "lastfm" << "last.fm"); connect(service, SIGNAL(SavedItemsChanged()), SLOT(MaybeRecreateItems())); // Load the friends list on startup only if it doesn't involve going to update // info from the server. if (!service_->IsFriendsListStale()) RecreateItems(); }
DigitallyImportedSearchProvider::DigitallyImportedSearchProvider( DigitallyImportedServiceBase* service, QObject* parent) : SimpleSearchProvider(parent), service_(service) { Init(service_->name(), service->api_service_name(), service_->icon(), ArtIsInSongMetadata | CanGiveSuggestions | CanShowConfig); set_safe_words(QStringList() << "sky.fm" << "skyfm" << "di.fm" << "difm" << "digitallyimported"); connect(service_, SIGNAL(StreamsChanged()), SLOT(MaybeRecreateItems())); // Load the channel list on startup only if it doesn't involve going to update // info from the server. if (!service_->IsChannelListStale()) RecreateItems(); }