void PluginArtistWindow::showTracks() { if (!ResourcesPlugins::instance()->resourceTypeIsSupported(m_artist->service(), Resources::TRACK)) { QMaemo5InformationBox::information(this, tr("This artist does not have any tracks")); return; } PluginTracksWindow *window = new PluginTracksWindow(this); window->setWindowTitle(tr("%1's tracks").arg(m_artist->name())); window->list(m_artist->service(), m_artist->id()); window->show(); }
void PluginView::search(const QString &query, const QString &type, const QString &order) { if (type == Resources::PLAYLIST) { PluginPlaylistsWindow *window = new PluginPlaylistsWindow(StackedWindow::currentWindow()); window->setWindowTitle(QString("%1 ('%2')").arg(tr("Search")).arg(query)); window->search(m_model->service(), query, order); window->show(); } else if (type == Resources::ARTIST) { PluginArtistsWindow *window = new PluginArtistsWindow(StackedWindow::currentWindow()); window->setWindowTitle(QString("%1 ('%2')").arg(tr("Search")).arg(query)); window->search(m_model->service(), query, order); window->show(); } else { PluginTracksWindow *window = new PluginTracksWindow(StackedWindow::currentWindow()); window->setWindowTitle(QString("%1 ('%2')").arg(tr("Search")).arg(query)); window->search(m_model->service(), query, order); window->show(); } }
void PluginView::showTracks(const QString &name, const QString &id) { PluginTracksWindow *window = new PluginTracksWindow(StackedWindow::currentWindow()); window->setWindowTitle(name); window->list(m_model->service(), id); window->show(); }