]> git.sesse.net Git - kdenlive/blobdiff - src/mainwindow.cpp
remove useless locks
[kdenlive] / src / mainwindow.cpp
index d8a46d373371173a04b5243e8fe1b7aee0b637f5..11c42b57fd2b75feb93f6d9c8a60e5e08bbb54b3 100644 (file)
@@ -218,6 +218,7 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString &
     m_recMonitor = new RecMonitor("record", m_monitorManager);
     m_recMonitorDock->setWidget(m_recMonitor);
     connect(m_recMonitor, SIGNAL(addProjectClip(KUrl)), this, SLOT(slotAddProjectClip(KUrl)));
+    connect(m_recMonitor, SIGNAL(addProjectClipList(KUrl::List)), this, SLOT(slotAddProjectClipList(KUrl::List)));
     connect(m_recMonitor, SIGNAL(showConfigDialog(int, int)), this, SLOT(slotPreferences(int, int)));
 #endif
     m_monitorManager->initMonitors(m_clipMonitor, m_projectMonitor, m_recMonitor);
@@ -570,7 +571,6 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString &
     connect(m_projectMonitorDock, SIGNAL(visibilityChanged(bool)), m_projectMonitor, SLOT(refreshMonitor(bool)));
     connect(m_clipMonitorDock, SIGNAL(visibilityChanged(bool)), m_clipMonitor, SLOT(refreshMonitor(bool)));
     //connect(m_monitorManager, SIGNAL(connectMonitors()), this, SLOT(slotConnectMonitors()));
-    connect(m_monitorManager, SIGNAL(raiseMonitor(AbstractMonitor *)), this, SLOT(slotRaiseMonitor(AbstractMonitor *)));
     connect(m_monitorManager, SIGNAL(checkColorScopes()), this, SLOT(slotUpdateColorScopes()));
     connect(m_monitorManager, SIGNAL(clearScopes()), this, SLOT(slotClearColorScopes()));
     connect(m_effectList, SIGNAL(addEffect(const QDomElement)), this, SLOT(slotAddEffect(const QDomElement)));
@@ -833,12 +833,6 @@ void MainWindow::slotAddEffect(const QDomElement effect)
     else m_activeTimeline->projectView()->slotAddEffect(effectToAdd, GenTime(), -1);
 }
 
-void MainWindow::slotRaiseMonitor(AbstractMonitor *monitor)
-{
-    if (monitor == m_clipMonitor) m_clipMonitorDock->raise();
-    else if (monitor == m_projectMonitor) m_projectMonitorDock->raise();
-}
-
 void MainWindow::slotUpdateClip(const QString &id)
 {
     if (!m_activeDocument) return;
@@ -2296,6 +2290,8 @@ void MainWindow::slotUpdateProjectProfile(const QString &profile)
     if (m_renderWidget) m_renderWidget->setProfile(m_activeDocument->mltProfile());
     m_timelineArea->setTabText(m_timelineArea->currentIndex(), m_activeDocument->description());
     if (updateFps) m_activeTimeline->updateProjectFps();
+    m_activeDocument->clipManager()->clearCache();
+    m_activeTimeline->updateProfile();
     m_activeDocument->setModified(true);
     m_commandStack->activeStack()->clear();
     //Update the mouse position display so it will display in DF/NDF format by default based on the project setting.
@@ -2493,7 +2489,7 @@ void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc)   //cha
 
     connect(doc, SIGNAL(docModified(bool)), this, SLOT(slotUpdateDocumentState(bool)));
     connect(doc, SIGNAL(guidesUpdated()), this, SLOT(slotGuidesUpdated()));
-    connect(doc, SIGNAL(saveTimelinePreview(const QString)), trackView, SLOT(slotSaveTimelinePreview(const QString)));
+    connect(doc, SIGNAL(saveTimelinePreview(const QString &)), trackView, SLOT(slotSaveTimelinePreview(const QString)));
     
     connect(m_notesWidget, SIGNAL(textChanged()), doc, SLOT(setModified()));
 
@@ -2639,7 +2635,7 @@ void MainWindow::updateConfiguration()
     if (m_activeTimeline) {
         m_activeTimeline->refresh();
         m_activeTimeline->projectView()->checkAutoScroll();
-        m_activeTimeline->projectView()->checkTrackHeight();
+        m_activeTimeline->checkTrackHeight();
         if (m_activeDocument)
             m_activeDocument->clipManager()->checkAudioThumbs();
     }
@@ -3001,6 +2997,12 @@ void MainWindow::slotAddProjectClip(KUrl url)
         m_activeDocument->slotAddClipFile(url, QString());
 }
 
+void MainWindow::slotAddProjectClipList(KUrl::List urls)
+{
+    if (m_activeDocument)
+        m_activeDocument->slotAddClipList(urls, QString());
+}
+
 void MainWindow::slotAddTransition(QAction *result)
 {
     if (!result) return;
@@ -4300,7 +4302,7 @@ void MainWindow::slotOpenStopmotion()
 {
     if (m_stopmotion == NULL) {
         m_stopmotion = new StopmotionWidget(m_monitorManager, m_activeDocument->projectFolder(), m_stopmotion_actions->actions(), this);
-        connect(m_stopmotion, SIGNAL(addOrUpdateSequence(const QString)), m_projectList, SLOT(slotAddOrUpdateSequence(const QString)));
+        connect(m_stopmotion, SIGNAL(addOrUpdateSequence(const QString &)), m_projectList, SLOT(slotAddOrUpdateSequence(const QString)));
         //for (int i = 0; i < m_gfxScopesList.count(); i++) {
             // Check if we need the renderer to send a new frame for update
             /*if (!m_scopesList.at(i)->widget()->visibleRegion().isEmpty() && !(static_cast<AbstractScopeWidget *>(m_scopesList.at(i)->widget())->autoRefreshEnabled())) request = true;*/