void PlaybackController::startVideoExport(VideoExporter *exporter)
{
	Q_ASSERT(!m_exporter);
	Q_ASSERT(exporter);
	m_exporter = exporter;
	m_exporter->setParent(this);

	m_exporterReady = false;
	m_waitedForExporter = false;

	connect(m_exporter, &VideoExporter::exporterReady, this, &PlaybackController::exporterReady, Qt::QueuedConnection);
	connect(m_exporter, SIGNAL(exporterError(QString)), this, SLOT(exporterError(QString)), Qt::QueuedConnection);
	connect(m_exporter, SIGNAL(exporterFinished()), this, SLOT(exporterFinished()), Qt::QueuedConnection);

	m_exporter->start();
	emit exportStarted();
}
Exemple #2
0
void WidgetMain::createConnections()
{
    connect(ui->actionConfigSave, SIGNAL(triggered()), this, SLOT(saveConfig()), Qt::DirectConnection);
    connect(ui->actionConfigSaveAs, SIGNAL(triggered()), this, SLOT(saveConfigAs()), Qt::DirectConnection);
    connect(ui->actionConfigOpen, SIGNAL(triggered()), this, SLOT(openConfig()), Qt::DirectConnection);
    connect(ui->actionQuit, SIGNAL(triggered()), this, SLOT(close()), Qt::DirectConnection);

    connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(showAbout()), Qt::DirectConnection);
    connect(ui->actionAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt()), Qt::DirectConnection);

    connect(d_hponic.data(), SIGNAL(transmissionStatusChanged(Transmission::Status)),
            this, SLOT(onTransmissionStatusChanged(Transmission::Status)), Qt::DirectConnection);
    connect(d_hponic.data(), SIGNAL(transmissionCommandSend(Command::Result)),
            this, SLOT(onTransmissionCommandSend(Command::Result)), Qt::DirectConnection);

    connect(d_hponic.data(), SIGNAL(exportStarted()), this, SLOT(onExportStarted()), Qt::DirectConnection);
    connect(d_hponic.data(), SIGNAL(exportStopped()), this, SLOT(onExportStopped()), Qt::DirectConnection);
    connect(d_hponic.data(), SIGNAL(exportProgress(int,int)), this, SLOT(onExportProgress(int,int)), Qt::DirectConnection);
}