]> git.sesse.net Git - kdenlive/commitdiff
Merge branch 'master' into feature/pkey
authorEd Rogalsky <ed.rogalsky@googlemail.com>
Sat, 3 Nov 2012 17:53:21 +0000 (18:53 +0100)
committerEd Rogalsky <ed.rogalsky@googlemail.com>
Sat, 3 Nov 2012 17:53:21 +0000 (18:53 +0100)
1  2 
src/mainwindow.cpp
src/mainwindow.h

diff --combined src/mainwindow.cpp
index 013a5e14808c14548994ebc7a6a12fb29f6d8740,2936b538703ba00cc22e593364ddfd8481e86d51..e8126e0755542159d5baa820280f351033d13f91
@@@ -236,7 -236,7 +236,7 @@@ MainWindow::MainWindow(const QString &M
      connect(m_projectList, SIGNAL(clipSelected(DocClipBase *, QPoint, bool)), m_clipMonitor, SLOT(slotSetClipProducer(DocClipBase *, QPoint, bool)));
      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 &)));
@@@ -1402,11 -1402,6 +1402,11 @@@ void MainWindow::setupActions(
      collection.addAction("delete_timeline_clip", deleteItem);
      connect(deleteItem, SIGNAL(triggered(bool)), this, SLOT(slotDeleteItem()));
  
 +    KAction* alignPlayhead = new KAction(i18n("Align Playhead to Mouse Position"), this);
 +    alignPlayhead->setShortcut(Qt::Key_P);
 +    collection.addAction("align_playhead", alignPlayhead);
 +    connect(alignPlayhead, SIGNAL(triggered(bool)), this, SLOT(slotAlignPlayheadToMousePos()));
 +
      /*KAction* editTimelineClipSpeed = new KAction(i18n("Change Clip Speed"), this);
      collection.addAction("change_clip_speed", editTimelineClipSpeed);
      editTimelineClipSpeed->setData("change_speed");
@@@ -2421,7 -2416,7 +2421,7 @@@ void MainWindow::slotRenderProject(
          connect(m_renderWidget, SIGNAL(selectedRenderProfile(QMap <QString, QString>)), this, SLOT(slotSetDocumentRenderProfile(QMap <QString, QString>)));
          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());
@@@ -3217,19 -3212,13 +3217,13 @@@ void MainWindow::slotUpdateZoomSliderTo
      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);
      }
  }
@@@ -3337,7 -3326,7 +3331,7 @@@ void MainWindow::slotShowClipProperties
      }
      
      connect(dia, SIGNAL(addMarkers(const QString &, QList <CommentedTime>)), m_activeTimeline->projectView(), SLOT(slotAddClipMarker(const QString &, QList <CommentedTime>)));
-     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 *)));
@@@ -3882,12 -3871,12 +3876,12 @@@ void MainWindow::slotUpdateClipType(QAc
      }
  }
  
- 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<DvdWizard> w = new DvdWizard(url, profile, this);
+     QPointer<DvdWizard> w = new DvdWizard(url, this);
      w->exec();
      m_projectMonitor->start();
      delete w;
@@@ -3954,7 -3943,7 +3948,7 @@@ void MainWindow::loadTranscoders(
      QMenu *extractAudioMenu = static_cast<QMenu*>(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();
@@@ -4023,7 -4012,7 +4017,7 @@@ void MainWindow::slotTranscode(KUrl::Li
          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();
  }
@@@ -4592,10 -4581,6 +4586,10 @@@ void MainWindow::slotProcessImportKeyfr
      }
  }
  
 +void MainWindow::slotAlignPlayheadToMousePos()
 +{
 +      m_activeTimeline->projectView()->slotAlignPlayheadToMousePos();
 +}
  
  #include "mainwindow.moc"
  
diff --combined src/mainwindow.h
index db1cbc2252d415b8877429a991d45720d1c7ebfc,141c7e246621c8ab7819631d95086a3e4f17cba0..acba2873dcc8e3dfa3ed21188db0b26c82b2eb36
@@@ -328,7 -328,7 +328,7 @@@ public slots
      *
      * Checks if already open and whether backup exists */
      void openFile(const KUrl &url);
-     void slotGotProgressInfo(const QString &message, int progress);
+     void slotGotProgressInfo(const QString &message, int progress, MessageType type = DefaultMessage);
      void slotReloadEffects();
      Q_SCRIPTABLE void setRenderingProgress(const QString &url, int progress);
      Q_SCRIPTABLE void setRenderingFinished(const QString &url, int status, const QString &error);
@@@ -486,7 -486,7 +486,7 @@@ private slots
      /** @brief Lets the sampleplugin create a generator.  */
      void generateClip();
      void slotZoneMoved(int start, int end);
-     void slotDvdWizard(const QString &url = QString(), const QString &profile = "dv_pal");
+     void slotDvdWizard(const QString &url = QString());
      void slotGroupClips();
      void slotUnGroupClips();
      void slotEditItemDuration();
      void slotSaveTimelineClip();
      /** @brief Process keyframe data sent from a clip to effect / transition stack. */
      void slotProcessImportKeyframes(GRAPHICSRECTITEM type, const QString& data, int maximum);
 +    /** @brief Move playhead to mouse curser position if defined key is pressed */
 +    void slotAlignPlayheadToMousePos();
  
  signals:
      Q_SCRIPTABLE void abortRenderJob(const QString &url);