MainWindow::MainWindow() : StackedWindow(), m_serviceModel(new ServiceModel(this)), m_serviceAction(new ValueSelectorAction(this)), m_nowPlayingAction(new NowPlayingAction(this)), m_playFolderAction(new QAction(tr("Play folder"), this)), m_queueFolderAction(new QAction(tr("Queue folder"), this)), m_playUrlAction(new QAction(tr("Play URL"), this)), m_queueUrlAction(new QAction(tr("Queue URL"), this)), m_transfersAction(new QAction(tr("Transfers"), this)), m_settingsAction(new QAction(tr("Settings"), this)), m_aboutAction(new QAction(tr("About"), this)) { m_serviceAction->setText(tr("Service")); m_serviceAction->setModel(m_serviceModel); m_serviceAction->setValue(Settings::currentService()); menuBar()->addAction(m_serviceAction); menuBar()->addAction(m_playFolderAction); menuBar()->addAction(m_queueFolderAction); menuBar()->addAction(m_playUrlAction); menuBar()->addAction(m_queueUrlAction); menuBar()->addAction(m_transfersAction); menuBar()->addAction(m_settingsAction); menuBar()->addAction(m_aboutAction); menuBar()->addAction(m_nowPlayingAction); connect(m_serviceAction, SIGNAL(valueChanged(QVariant)), this, SLOT(setService(QVariant))); connect(m_playFolderAction, SIGNAL(triggered()), this, SLOT(playFolder())); connect(m_queueFolderAction, SIGNAL(triggered()), this, SLOT(queueFolder())); connect(m_playUrlAction, SIGNAL(triggered()), this, SLOT(playUrl())); connect(m_queueUrlAction, SIGNAL(triggered()), this, SLOT(queueUrl())); connect(m_transfersAction, SIGNAL(triggered()), this, SLOT(showTransfers())); connect(m_settingsAction, SIGNAL(triggered()), this, SLOT(showSettingsDialog())); connect(m_aboutAction, SIGNAL(triggered()), this, SLOT(showAboutDialog())); connect(AudioPlayer::instance(), SIGNAL(statusChanged(AudioPlayer::Status)), this, SLOT(onPlayerStatusChanged(AudioPlayer::Status))); connect(Transfers::instance(), SIGNAL(transferAdded(Transfer*)), this, SLOT(onTransferAdded(Transfer*))); setService(Settings::currentService()); }
bool SqsPurgeQueueRequest::isValid() const { return (!queueUrl().isEmpty()); }
bool SqsRemovePermissionRequest::isValid() const { return ((!queueUrl().isEmpty()) && (!label().isEmpty())); }