Exemplo n.º 1
0
void ConformerList::on_energyTable_itemSelectionChanged()
{
   QList<QTableWidgetItem*> selection = m_conformerListConfigurator.energyTable->selectedItems();
   on_playButton_clicked(false); 
   if (selection.isEmpty()) return;
   Layer::Conformer* conformer = QVariantPointer<Layer::Conformer>::toPointer(
      selection.first()->data(Qt::UserRole));
   if (conformer) m_conformerList->setActiveConformer(*conformer);
}
Exemplo n.º 2
0
void MainBottomWidget::setNetWorkMode(bool isTrue)
{
	if (isTrue)
	{
		disconnect(m_playButton, SIGNAL(clicked()), this, SLOT(on_playButton_clicked()));
		disconnect(m_postionWidget, SIGNAL(changeTo(qreal)), this, SLOT(postionChanged(qreal)));
		connect(m_playButton, SIGNAL(clicked()), this, SIGNAL(play()));
		connect(m_postionWidget, SIGNAL(changeTo(qreal)), this, SIGNAL(setPosTo(qreal)));
	}
}
Exemplo n.º 3
0
void MainBottomWidget::initConnect()
{
	connect(m_playButton, SIGNAL(clicked()), this, SLOT(on_playButton_clicked()));
	connect(m_playFrontButton, SIGNAL(clicked()), this, SIGNAL(playFront()));
	connect(m_playNextButton, SIGNAL(clicked()), this, SIGNAL(playNext()));

	//		进度条
	connect(m_voiceWidget, SIGNAL(changeTo(qreal)), this, SLOT(voiceChanged(qreal)));
	connect(m_postionWidget, SIGNAL(changeTo(qreal)), this, SLOT(postionChanged(qreal)));
}
Exemplo n.º 4
0
void SurfaceAnimatorDialog::on_calculateButton_clicked(bool)
{
    if (m_animator) {
        on_playButton_clicked(false);
        delete m_animator;
        m_animator = 0;
    }

    QListWidget* fileList(m_dialog.fileList);

    if (fileList->count() == 1) {
        computeIsovalueAnimation();
    } else {
        computeMultiGridAnimation();
    }
}
Exemplo n.º 5
0
void SurfaceAnimatorDialog::animationStopped()
{
    on_playButton_clicked(false);
}
Exemplo n.º 6
0
void MainWindow::connectSignals()
{
    connect(controller->captureThread, SIGNAL(videoFinished()), this, SLOT(on_playButton_clicked()));
    connect(ui->videoLabel, SIGNAL(roiSelected(QRect, QPoint)), controller->processingThread, SLOT(setTarget(QRect, QPoint)));
}
Exemplo n.º 7
0
void NPlayer::connectSignals()
{
	connect(m_playbackEngine, SIGNAL(mediaChanged(const QString &)), this, SLOT(on_playbackEngine_mediaChanged(const QString &)));
	connect(m_playbackEngine, SIGNAL(mediaChanged(const QString &)), m_waveformSlider, SLOT(setMedia(const QString &)));
	connect(m_playbackEngine, SIGNAL(stateChanged(N::PlaybackState)), this, SLOT(on_playbackEngine_stateChanged(N::PlaybackState)));
	connect(m_playbackEngine, SIGNAL(aboutToFinish()), m_playlistWidget, SLOT(currentFinished()), Qt::BlockingQueuedConnection);
	connect(m_playbackEngine, SIGNAL(positionChanged(qreal)), m_waveformSlider, SLOT(setValue(qreal)));
	connect(m_playbackEngine, SIGNAL(tick(qint64)), m_trackInfoWidget, SLOT(tick(qint64)));
	connect(m_playbackEngine, SIGNAL(finished()), m_playlistWidget, SLOT(currentFinished()));
	connect(m_playbackEngine, SIGNAL(failed()), this, SLOT(on_playbackEngine_failed()));
	connect(m_playbackEngine, SIGNAL(message(QMessageBox::Icon, const QString &, const QString &)), m_logDialog, SLOT(showMessage(QMessageBox::Icon, const QString &, const QString &)));

	connect(m_mainWindow, SIGNAL(closed()), this, SLOT(on_mainWindow_closed()));

	connect(m_preferencesDialog, SIGNAL(settingsChanged()), this, SLOT(on_preferencesDialog_settingsChanged()));

	if (m_coverWidget)
		connect(m_playbackEngine, SIGNAL(mediaChanged(const QString &)), m_coverWidget, SLOT(setSource(const QString &)));

	if (QAbstractButton *playButton = qFindChild<QAbstractButton *>(m_mainWindow, "playButton"))
		connect(playButton, SIGNAL(clicked()), this, SLOT(on_playButton_clicked()));

	if (QAbstractButton *stopButton = qFindChild<QAbstractButton *>(m_mainWindow, "stopButton"))
		connect(stopButton, SIGNAL(clicked()), m_playbackEngine, SLOT(stop()));

	if (QAbstractButton *prevButton = qFindChild<QAbstractButton *>(m_mainWindow, "prevButton"))
		connect(prevButton, SIGNAL(clicked()), m_playlistWidget, SLOT(playPrevItem()));

	if (QAbstractButton *nextButton = qFindChild<QAbstractButton *>(m_mainWindow, "nextButton"))
		connect(nextButton, SIGNAL(clicked()), m_playlistWidget, SLOT(playNextItem()));

	if (QAbstractButton *closeButton = qFindChild<QAbstractButton *>(m_mainWindow, "closeButton"))
		connect(closeButton, SIGNAL(clicked()), m_mainWindow, SLOT(close()));

	if (QAbstractButton *minimizeButton = qFindChild<QAbstractButton *>(m_mainWindow, "minimizeButton"))
		connect(minimizeButton, SIGNAL(clicked()), m_mainWindow, SLOT(showMinimized()));

	if (m_volumeSlider) {
		connect(m_volumeSlider, SIGNAL(sliderMoved(qreal)), m_playbackEngine, SLOT(setVolume(qreal)));
		connect(m_playbackEngine, SIGNAL(volumeChanged(qreal)), m_volumeSlider, SLOT(setValue(qreal)));
		connect(m_mainWindow, SIGNAL(scrolled(int)), this, SLOT(on_mainWindow_scrolled(int)));
	}

	if (QAbstractButton *repeatButton = qFindChild<QAbstractButton *>(m_mainWindow, "repeatButton")) {
		connect(repeatButton, SIGNAL(clicked(bool)), m_playlistWidget, SLOT(setRepeatMode(bool)));
		connect(m_playlistWidget, SIGNAL(repeatModeChanged(bool)), repeatButton, SLOT(setChecked(bool)));
	}

	if (QAbstractButton *shuffleButton = qFindChild<QAbstractButton *>(m_mainWindow, "shuffleButton")) {
		connect(shuffleButton, SIGNAL(clicked(bool)), m_playlistWidget, SLOT(setShuffleMode(bool)));
		connect(m_playlistWidget, SIGNAL(shuffleModeChanged(bool)), shuffleButton, SLOT(setChecked(bool)));
	}

	connect(m_playlistWidget, SIGNAL(setMedia(const QString &)), m_playbackEngine, SLOT(setMedia(const QString &)));
	connect(m_playlistWidget, SIGNAL(currentActivated()), m_playbackEngine, SLOT(play()));
	connect(m_playlistWidget, SIGNAL(shuffleModeChanged(bool)), m_shufflePlaylistAction, SLOT(setChecked(bool)));
	connect(m_playlistWidget, SIGNAL(repeatModeChanged(bool)), m_repeatPlaylistAction, SLOT(setChecked(bool)));

	connect(m_waveformSlider, SIGNAL(filesDropped(const QStringList &)), m_playlistWidget, SLOT(playFiles(const QStringList &)));
	connect(m_waveformSlider, SIGNAL(sliderMoved(qreal)), m_playbackEngine, SLOT(setPosition(qreal)));

	connect(m_showHideAction, SIGNAL(triggered()), this, SLOT(toggleWindowVisibility()));
	connect(m_playAction, SIGNAL(triggered()), m_playbackEngine, SLOT(play()));
	connect(m_stopAction, SIGNAL(triggered()), m_playbackEngine, SLOT(stop()));
	connect(m_prevAction, SIGNAL(triggered()), m_playlistWidget, SLOT(playPrevItem()));
	connect(m_nextAction, SIGNAL(triggered()), m_playlistWidget, SLOT(playNextItem()));
	connect(m_preferencesAction, SIGNAL(triggered()), m_preferencesDialog, SLOT(exec()));
	connect(m_exitAction, SIGNAL(triggered()), this, SLOT(quit()));
	connect(m_addFilesAction, SIGNAL(triggered()), this, SLOT(showOpenFileDialog()));
	connect(m_playlistWidget, SIGNAL(activateEmptyFail()), m_addFilesAction, SLOT(trigger()));
	connect(m_addDirAction, SIGNAL(triggered()), this, SLOT(showOpenDirDialog()));
	connect(m_savePlaylistAction, SIGNAL(triggered()), this, SLOT(showSavePlaylistDialog()));
	connect(m_showCoverAction, SIGNAL(toggled(bool)), this, SLOT(on_showCoverAction_toggled(bool)));
	connect(m_aboutAction, SIGNAL(triggered()), this, SLOT(showAboutMessageBox()));
	connect(m_playingOnTopAction, SIGNAL(toggled(bool)), this, SLOT(on_whilePlayingOnTopAction_toggled(bool)));
	connect(m_alwaysOnTopAction, SIGNAL(toggled(bool)), this, SLOT(on_alwaysOnTopAction_toggled(bool)));
	connect(m_fullScreenAction, SIGNAL(triggered()), m_mainWindow, SLOT(toggleFullScreen()));
	connect(m_shufflePlaylistAction, SIGNAL(triggered(bool)), m_playlistWidget, SLOT(setShuffleMode(bool)));
	connect(m_repeatPlaylistAction, SIGNAL(triggered(bool)), m_playlistWidget, SLOT(setRepeatMode(bool)));
	connect(m_loopPlaylistAction, SIGNAL(triggered()), this, SLOT(on_playlistAction_triggered()));
	connect(m_nextFileEnableAction, SIGNAL(triggered()), this, SLOT(on_playlistAction_triggered()));
	connect(m_nextFileByNameAscdAction, SIGNAL(triggered()), this, SLOT(on_playlistAction_triggered()));
	connect(m_nextFileByNameDescAction, SIGNAL(triggered()), this, SLOT(on_playlistAction_triggered()));
	connect(m_nextFileByDateAscd, SIGNAL(triggered()), this, SLOT(on_playlistAction_triggered()));
	connect(m_nextFileByDateDesc, SIGNAL(triggered()), this, SLOT(on_playlistAction_triggered()));

	foreach (NAction *action, findChildren<NAction *>()) {
		if (action->objectName().startsWith("Jump"))
			connect(action, SIGNAL(triggered()), this, SLOT(on_jumpAction_triggered()));
	}

	connect(m_mainWindow, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenu(QPoint)));
	connect(m_systemTray, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(on_trayIcon_activated(QSystemTrayIcon::ActivationReason)));
	connect(m_trayClickTimer, SIGNAL(timeout()), this, SLOT(on_trayClickTimer_timeout()));
}
Exemplo n.º 8
0
void ConformerList::closeEvent(QCloseEvent* e)
{
   m_conformerList->setDefaultConformer();
   on_playButton_clicked(false); 
   Base::closeEvent(e);
}