Ejemplo n.º 1
0
void SoundCloudView::showResource(const QString &type, const QString &id) {
    if (type == Resources::PLAYLIST) {
        SoundCloudPlaylistWindow *window = new SoundCloudPlaylistWindow(id, StackedWindow::currentWindow());
        window->show();
    }
    else if (type == Resources::ARTIST) {
        SoundCloudArtistWindow *window = new SoundCloudArtistWindow(id, StackedWindow::currentWindow());
        window->show();
    }
    else {
        SoundCloudTrackWindow *window = new SoundCloudTrackWindow(id, StackedWindow::currentWindow());
        window->show();
    }
}
Ejemplo n.º 2
0
void SoundCloudPlaylistWindow::showResource(const QUrl &url) {
    QVariantMap resource = Resources::getResourceFromUrl(url.toString());
    
    if (resource.value("service") != Resources::SOUNDCLOUD) {
        QDesktopServices::openUrl(url);
        return;
    }
    
    if (resource.value("type") == Resources::PLAYLIST) {
        SoundCloudPlaylistWindow *window = new SoundCloudPlaylistWindow(resource.value("id").toString(), this);
        window->show();
    }
    else if (resource.value("type") == Resources::ARTIST) {
        SoundCloudArtistWindow *window = new SoundCloudArtistWindow(resource.value("id").toString(), this);
        window->show();
    }
    else {
        SoundCloudTrackWindow *window = new SoundCloudTrackWindow(resource.value("id").toString(), this);
        window->show();
    }
}
Ejemplo n.º 3
0
void SoundCloudPlaylistWindow::showArtist() {
    SoundCloudArtistWindow *window = new SoundCloudArtistWindow(m_artist, this);
    window->show();
}