X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmainwindow.cpp;h=9e817b2a5c19724eca4fca6fd6b32354e4f73189;hb=1d9ce4dd0538c76fb9513b9b05bf66c3186f44de;hp=49bf50184f02ba8d3dd795f831aecbd79cddd8d3;hpb=515478642cdca3a049c55d4cccbcafef823a4f5d;p=kdenlive diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 49bf5018..9e817b2a 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -234,9 +234,9 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString & // Connect the project list connect(m_projectList, SIGNAL(clipSelected(DocClipBase *, QPoint, bool)), m_clipMonitor, SLOT(slotSetClipProducer(DocClipBase *, QPoint, bool))); - connect(m_projectList, SIGNAL(raiseClipMonitor()), m_clipMonitor, SLOT(slotActivateMonitor())); + connect(m_projectList, SIGNAL(raiseClipMonitor(bool)), m_clipMonitor, SLOT(slotActivateMonitor(bool))); connect(m_projectList, SIGNAL(loadingIsOver()), this, SLOT(slotElapsedTime())); - connect(m_projectList, SIGNAL(displayMessage(const QString&, int)), this, SLOT(slotGotProgressInfo(const QString&, int))); + connect(m_projectList, SIGNAL(displayMessage(const QString&, int, MessageType)), this, SLOT(slotGotProgressInfo(const QString&, int, MessageType))); connect(m_projectList, SIGNAL(updateRenderStatus()), this, SLOT(slotCheckRenderStatus())); connect(m_projectList, SIGNAL(clipNeedsReload(const QString&)),this, SLOT(slotUpdateClip(const QString &))); connect(m_projectList, SIGNAL(updateProfile(const QString &)), this, SLOT(slotUpdateProjectProfile(const QString &))); @@ -1962,6 +1962,7 @@ bool MainWindow::closeCurrentDocument(bool saveChanges) break; } } + slotTimelineClipSelected(NULL, false); m_clipMonitor->slotSetClipProducer(NULL); m_projectList->slotResetProjectList(); m_timelineArea->removeTab(m_timelineArea->indexOf(w)); @@ -2415,7 +2416,7 @@ void MainWindow::slotRenderProject() connect(m_renderWidget, SIGNAL(selectedRenderProfile(QMap )), this, SLOT(slotSetDocumentRenderProfile(QMap ))); connect(m_renderWidget, SIGNAL(prepareRenderingData(bool, bool, const QString&)), this, SLOT(slotPrepareRendering(bool, bool, const QString&))); connect(m_renderWidget, SIGNAL(abortProcess(const QString &)), this, SIGNAL(abortRenderJob(const QString &))); - connect(m_renderWidget, SIGNAL(openDvdWizard(const QString &, const QString &)), this, SLOT(slotDvdWizard(const QString &, const QString &))); + connect(m_renderWidget, SIGNAL(openDvdWizard(const QString &)), this, SLOT(slotDvdWizard(const QString &))); if (m_activeDocument) { m_renderWidget->setProfile(m_activeDocument->mltProfile()); m_renderWidget->setGuides(m_activeDocument->guidesXml(), m_activeDocument->projectDuration()); @@ -2567,7 +2568,7 @@ void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc) //cha connect(trackView, SIGNAL(mousePosition(int)), this, SLOT(slotUpdateMousePosition(int))); connect(trackView->projectView(), SIGNAL(forceClipProcessing(const QString &)), m_projectList, SLOT(slotForceProcessing(const QString &))); - connect(trackView->projectView(), SIGNAL(importKeyframes(GRAPHICSRECTITEM, const QString&)), this, SLOT(slotProcessImportKeyframes(GRAPHICSRECTITEM, const QString&))); + connect(trackView->projectView(), SIGNAL(importKeyframes(GRAPHICSRECTITEM, const QString&, int)), this, SLOT(slotProcessImportKeyframes(GRAPHICSRECTITEM, const QString&, int))); connect(m_projectMonitor, SIGNAL(renderPosition(int)), trackView, SLOT(moveCursorPos(int))); connect(m_projectMonitor, SIGNAL(zoneUpdated(QPoint)), trackView, SLOT(slotSetZone(QPoint))); @@ -3211,19 +3212,13 @@ void MainWindow::slotUpdateZoomSliderToolTip(int zoomlevel) m_zoomSlider->setToolTip(i18n("Zoom Level: %1/13", (13 - zoomlevel))); } -void MainWindow::slotGotProgressInfo(const QString &message, int progress) +void MainWindow::slotGotProgressInfo(const QString &message, int progress, MessageType type) { - m_statusProgressBar->setValue(progress); + if (type == DefaultMessage) m_statusProgressBar->setValue(progress); + m_messageLabel->setMessage(message, type); if (progress >= 0) { - if (!message.isEmpty()) - m_messageLabel->setMessage(message, InformationMessage);//statusLabel->setText(message); - m_statusProgressBar->setVisible(true); - } else if (progress == -2) { - if (!message.isEmpty()) - m_messageLabel->setMessage(message, ErrorMessage); - m_statusProgressBar->setVisible(false); + if (type == DefaultMessage) m_statusProgressBar->setVisible(true); } else { - m_messageLabel->setMessage(QString(), DefaultMessage); m_statusProgressBar->setVisible(false); } } @@ -3324,14 +3319,14 @@ void MainWindow::slotShowClipProperties(DocClipBase *clip) // any type of clip but a title ClipProperties *dia = new ClipProperties(clip, m_activeDocument->timecode(), m_activeDocument->fps(), this); - if (clip->clipType() == AV || clip->clipType() == VIDEO || clip->clipType() == PLAYLIST) { + if (clip->clipType() == AV || clip->clipType() == VIDEO || clip->clipType() == PLAYLIST || clip->clipType() == SLIDESHOW) { // request clip thumbnails m_activeDocument->clipManager()->requestThumbs(QString('?' + clip->getId()), QList() << clip->getClipThumbFrame()); connect(m_activeDocument->clipManager(), SIGNAL(gotClipPropertyThumbnail(const QString&,QImage)), dia, SLOT(slotGotThumbnail(const QString&,QImage))); } connect(dia, SIGNAL(addMarkers(const QString &, QList )), m_activeTimeline->projectView(), SLOT(slotAddClipMarker(const QString &, QList ))); - connect(dia, SIGNAL(deleteAnalysis(QString,QString)), m_activeTimeline->projectView(), SLOT(slotAddClipExtraData(QString,QString))); + connect(dia, SIGNAL(editAnalysis(QString,QString,QString)), m_activeTimeline->projectView(), SLOT(slotAddClipExtraData(QString,QString,QString))); connect(m_activeTimeline->projectView(), SIGNAL(updateClipMarkers(DocClipBase *)), dia, SLOT(slotFillMarkersList(DocClipBase *))); connect(m_activeTimeline->projectView(), SIGNAL(updateClipExtraData(DocClipBase *)), dia, SLOT(slotUpdateAnalysisData(DocClipBase *))); connect(m_projectList, SIGNAL(updateAnalysisData(DocClipBase *)), dia, SLOT(slotUpdateAnalysisData(DocClipBase *))); @@ -3876,12 +3871,12 @@ void MainWindow::slotUpdateClipType(QAction *action) } } -void MainWindow::slotDvdWizard(const QString &url, const QString &profile) +void MainWindow::slotDvdWizard(const QString &url) { // We must stop the monitors since we create a new on in the dvd wizard m_clipMonitor->stop(); m_projectMonitor->stop(); - QPointer w = new DvdWizard(url, profile, this); + QPointer w = new DvdWizard(url, this); w->exec(); m_projectMonitor->start(); delete w; @@ -3948,7 +3943,7 @@ void MainWindow::loadTranscoders() QMenu *extractAudioMenu = static_cast(factory()->container("extract_audio", this)); extractAudioMenu->clear(); - KSharedConfigPtr config = KSharedConfig::openConfig("kdenlivetranscodingrc"); + KSharedConfigPtr config = KSharedConfig::openConfig("kdenlivetranscodingrc", KConfig::CascadeConfig); KConfigGroup transConfig(config, "Transcoding"); // read the entries QMap< QString, QString > profiles = transConfig.entryMap(); @@ -4017,7 +4012,7 @@ void MainWindow::slotTranscode(KUrl::List urls) m_messageLabel->setMessage(i18n("No clip to transcode"), ErrorMessage); return; } - ClipTranscode *d = new ClipTranscode(urls, params, desc); + ClipTranscode *d = new ClipTranscode(urls, params, QStringList(), desc); connect(d, SIGNAL(addClip(KUrl)), this, SLOT(slotAddProjectClip(KUrl))); d->show(); } @@ -4572,14 +4567,15 @@ void MainWindow::slotSaveTimelineClip() } } -void MainWindow::slotProcessImportKeyframes(GRAPHICSRECTITEM type, const QString& data) +void MainWindow::slotProcessImportKeyframes(GRAPHICSRECTITEM type, const QString& data, int maximum) { if (type == AVWIDGET) { // This data should be sent to the effect stack + m_effectStack->setKeyframes(data, maximum); } else if (type == TRANSITIONWIDGET) { // This data should be sent to the transition stack - m_transitionConfig->setKeyframes(data); + m_transitionConfig->setKeyframes(data, maximum); } else { // Error