void Browser::showAlbumArtists(const QVariant &containerId, const QString &title) { #ifdef Q_WS_MAEMO_5 ArtistView *albumArtistView = new ArtistView(QDocumentGallery::AlbumArtist, gallery); connect(albumArtistView, SIGNAL(showAlbums(QVariant,QString)), this, SLOT(showAlbums(QVariant,QString))); connect(albumArtistView, SIGNAL(showSongs(QVariant,QString)), this, SLOT(showSongs(QVariant,QString))); #endif showView(albumArtistView, containerId, title); }
Browser::Browser(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, flags) , gallery(0) , stack(0) , artistView(0) , albumArtistView(0) , albumView(0) , songView(0) , photoView(0) { gallery = new QDocumentGallery; artistView = new ArtistView(QDocumentGallery::Artist, gallery); connect(artistView, SIGNAL(showAlbums(QVariant,QString)), this, SLOT(showAlbums(QVariant,QString))); connect(artistView, SIGNAL(showSongs(QVariant,QString)), this, SLOT(showSongs(QVariant,QString))); albumArtistView = new ArtistView(QDocumentGallery::AlbumArtist, gallery); connect(albumArtistView, SIGNAL(showAlbums(QVariant,QString)), this, SLOT(showAlbums(QVariant,QString))); connect(albumArtistView, SIGNAL(showSongs(QVariant,QString)), this, SLOT(showSongs(QVariant,QString))); albumView = new AlbumView(gallery); connect(albumView, SIGNAL(showSongs(QVariant,QString)), this, SLOT(showSongs(QVariant,QString))); songView = new SongView(gallery); photoView = new PhotoView(gallery); stack = new QStackedWidget; stack->addWidget(artistView); stack->addWidget(albumArtistView); stack->addWidget(albumView); stack->addWidget(songView); stack->addWidget(photoView); menuBar()->addAction(tr("Artists"), this, SLOT(showArtists())); menuBar()->addAction(tr("Album Artists"), this, SLOT(showAlbumArtists())); menuBar()->addAction(tr("Albums"), this, SLOT(showAlbums())); menuBar()->addAction(tr("Songs"), this, SLOT(showSongs())); menuBar()->addAction(tr("Photos"), this, SLOT(showPhotos())); setCentralWidget(stack); #ifdef Q_WS_MAEMO_5 setAttribute(Qt::WA_Maemo5StackedWindow); #endif }
VerticalMenuWidget::VerticalMenuWidget(QWidget *parent) : AbstractMenuWidget(parent), ui(new Ui::VerticalMenuWidget) { ui->setupUi(this); connect(ui->btnAbout,SIGNAL(clicked()),this,SIGNAL(showAbout())); connect(ui->btnExit,SIGNAL(clicked()),this,SIGNAL(exitClicked())); connect(ui->btnFiles,SIGNAL(clicked()),this,SIGNAL(showFiles())); connect(ui->btnArtists,SIGNAL(clicked()),this,SIGNAL(showArtists())); connect(ui->btnAlbums,SIGNAL(clicked()),this,SIGNAL(showAlbums())); connect(ui->btnConnect,SIGNAL(clicked()),this,SIGNAL(connectClicked())); connect(ui->btnCurrentSong,SIGNAL(clicked()),this,SIGNAL(showCurrentSong())); connect(ui->btnSettings,SIGNAL(clicked()),this,SIGNAL(showSettings())); connect(ui->btnPlaylists,SIGNAL(clicked()),this,SIGNAL(showPlaylist())); }