Exemplo n.º 1
0
void Albums::showAlbumFromObjectMenu()
{
    // Since we are dealing with a slot triggered by 
    // an objectmenu action, then find the res string
    // by looking in the parent of the sender
    QString res = sender()->parent()->objectName();

    AppWindow *window = AppWindow::instance();
    window->showAlbum(res);    
}
void DynamicAlbumList::onClick(const QModelIndex &index)
{
    AppWindow *window = AppWindow::instance();
    MPListItem *item = static_cast<MPListItem *>(itemModel()->data(index, Qt::DisplayRole).value<void *>());
    window->showAlbum(item->urn);
}