void Browser::showAlbums(const QVariant &containerId, const QString &title) { #ifdef Q_WS_MAEMO_5 AlbumView *albumView = new AlbumView(gallery); connect(albumView, SIGNAL(showSongs(QVariant,QString)), this, SLOT(showSongs(QVariant,QString))); #endif showView(albumView, containerId, title); }
ActionDialog::ActionDialog(QWidget *parent) : Dialog(parent) , mpdConfigured(false) , currentDev(0) , songDialog(0) { iCount++; setButtons(Ok|Cancel); setDefaultButton(Cancel); setAttribute(Qt::WA_DeleteOnClose); QWidget *mainWidet = new QWidget(this); setupUi(mainWidet); setMainWidget(mainWidet); errorIcon->setPixmap(QIcon::fromTheme("dialog-error").pixmap(64, 64)); skipIcon->setPixmap(QIcon::fromTheme("dialog-warning").pixmap(64, 64)); configureSourceButton->setIcon(Icons::self()->configureIcon); configureDestButton->setIcon(Icons::self()->configureIcon); connect(configureSourceButton, SIGNAL(clicked()), SLOT(configureSource())); connect(configureDestButton, SIGNAL(clicked()), SLOT(configureDest())); connect(this, SIGNAL(update()), MPDConnection::self(), SLOT(update())); connect(songCount, SIGNAL(leftClickedUrl()), SLOT(showSongs())); #ifdef QT_QTDBUS_FOUND unityMessage=QDBusMessage::createSignal("/Cantata", "com.canonical.Unity.LauncherEntry", "Update"); #endif }
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 }