void PluginArtistWindow::showWindow(const QModelIndex &index) {
    if (isBusy()) {
        return;
    }
    
    switch (index.row()) {
    case 0:
        showTracks();
        break;
    case 1:
        showPlaylists();
        break;
    default:
        break;
    }
}
Exemple #2
0
void PluginView::onItemActivated(const QModelIndex &index) {
    const QVariantMap type = index.data(PluginNavModel::ValueRole).toMap();
    
    if (type.isEmpty()) {
        showSearchDialog();
    }
    else if (type.value("type") == Resources::CATEGORY) {
        showCategories(index.data(PluginNavModel::NameRole).toString(), type.value("id").toString());
    }
    else if (type.value("type") == Resources::PLAYLIST) {
        showPlaylists(index.data(PluginNavModel::NameRole).toString(), type.value("id").toString());
    }
    else if (type.value("type") == Resources::ARTIST) {
        showArtists(index.data(PluginNavModel::NameRole).toString(), type.value("id").toString());
    }
    else {
        showTracks(index.data(PluginNavModel::NameRole).toString(), type.value("id").toString());
    }
}
void SoundCloudView::onItemActivated(const QModelIndex &index) {
    switch (index.row()) {
    case 0:
        showAccounts();
        break;
    case 1:
        showSearchDialog();
        break;
    case 2:
        showTracks();
        break;
    case 3:
        showFavourites();
        break;
    case 4:
        showPlaylists();
        break;
    case 5:
        showFollowings();
        break;
    default:
        break;
    }
}