m_timelineContextMenu->addAction(actionCollection()->action(KStandardAction::name(KStandardAction::Paste)));
m_timelineContextClipMenu->addAction(actionCollection()->action("delete_timeline_clip"));
- m_timelineContextClipMenu->addAction(actionCollection()->action("change_clip_speed"));
m_timelineContextClipMenu->addAction(actionCollection()->action("group_clip"));
m_timelineContextClipMenu->addAction(actionCollection()->action("ungroup_clip"));
m_timelineContextClipMenu->addAction(actionCollection()->action("cut_timeline_clip"));
void MainWindow::queryQuit()
{
- kDebug() << "----- SAVING CONFUIG";
if (queryClose()) {
+ delete m_effectStack;
+ delete m_activeTimeline;
+ delete m_projectMonitor;
+ delete m_clipMonitor;
+ delete m_activeDocument;
Mlt::Factory::close();
kapp->quit();
}
m_timecodeFormat = new KComboBox(this);
m_timecodeFormat->addItem(i18n("hh:mm:ss::ff"));
m_timecodeFormat->addItem(i18n("Frames"));
+ if (KdenliveSettings::frametimecode()) m_timecodeFormat->setCurrentIndex(1);
+ connect(m_timecodeFormat, SIGNAL(activated(int)), this, SLOT(slotUpdateTimecodeFormat(int)));
m_statusProgressBar = new QProgressBar(this);
m_statusProgressBar->setMinimum(0);
collection->addAction("delete_timeline_clip", deleteTimelineClip);
connect(deleteTimelineClip, SIGNAL(triggered(bool)), this, SLOT(slotDeleteTimelineClip()));
- KAction* editTimelineClipSpeed = new KAction(i18n("Change Clip Speed"), this);
+ /*KAction* editTimelineClipSpeed = new KAction(i18n("Change Clip Speed"), this);
collection->addAction("change_clip_speed", editTimelineClipSpeed);
editTimelineClipSpeed->setData("change_speed");
- connect(editTimelineClipSpeed, SIGNAL(triggered(bool)), this, SLOT(slotChangeClipSpeed()));
+ connect(editTimelineClipSpeed, SIGNAL(triggered(bool)), this, SLOT(slotChangeClipSpeed()));*/
KAction *stickTransition = collection->addAction("auto_transition");
stickTransition->setData(QString("auto"));
if (m_activeDocument->profilePath() != profile) {
// Profile was changed
double dar = m_activeDocument->dar();
+
+ // Deselect current effect / transition
+ m_effectStack->slotClipItemSelected(NULL, 0);
+ m_transitionConfig->slotTransitionItemSelected(NULL, 0, QPoint(), false);
+
m_activeDocument->setProfilePath(profile);
KdenliveSettings::setCurrent_profile(profile);
KdenliveSettings::setProject_fps(m_activeDocument->fps());
setCaption(m_activeDocument->description(), m_activeDocument->isModified());
m_monitorManager->resetProfiles(m_activeDocument->timecode());
+ m_transitionConfig->updateProjectFormat(m_activeDocument->mltProfile(), m_activeDocument->timecode(), m_activeTimeline->tracksNumber());
+ m_effectStack->updateProjectFormat(m_activeDocument->mltProfile(), m_activeDocument->timecode());
if (m_renderWidget) m_renderWidget->setProfile(m_activeDocument->mltProfile());
m_timelineArea->setTabText(m_timelineArea->currentIndex(), m_activeDocument->description());
m_activeDocument->clipManager()->resetProducersList(m_projectMonitor->render->producersList());
if (dar != m_activeDocument->dar()) m_projectList->reloadClipThumbnails();
+ m_activeTimeline->updateProjectFps();
// We need to desactivate & reactivate monitors to get a refresh
m_monitorManager->switchMonitors();
}
setCaption(doc->description(), doc->isModified());
m_saveAction->setEnabled(doc->isModified());
m_activeDocument = doc;
+ m_activeTimeline->updateProjectFps();
if (KdenliveSettings::dropbframes()) slotUpdatePreviewSettings();
// set tool to select tool
}
}
-void MainWindow::slotChangeClipSpeed()
-{
- if (m_activeTimeline) {
- m_activeTimeline->projectView()->changeClipSpeed();
- }
-}
-
void MainWindow::slotAddClipMarker()
{
DocClipBase *clip = NULL;
return;
}
QString path = clip->getProperty("resource");
- TitleWidget *dia_ui = new TitleWidget(KUrl(), titlepath, m_projectMonitor->render, this);
+ TitleWidget *dia_ui = new TitleWidget(KUrl(), m_activeDocument->timecode(), titlepath, m_projectMonitor->render, this);
QDomDocument doc;
doc.setContent(clip->getProperty("xmldata"));
dia_ui->setXml(doc);
QRect rect = dia_ui->renderedRect();
QMap <QString, QString> newprops;
newprops.insert("xmldata", dia_ui->xml().toString());
+ newprops.insert("out", QString::number(dia_ui->duration()));
newprops.insert("frame_size", QString::number(rect.width()) + 'x' + QString::number(rect.height()));
EditClipCommand *command = new EditClipCommand(m_projectList, clip->getId(), clip->properties(), newprops, true);
m_activeDocument->commandStack()->push(command);
m_renderWidget->slotExport(scriptExport, m_activeTimeline->inPoint(), m_activeTimeline->outPoint(), playlistPath, scriptPath);
}
+void MainWindow::slotUpdateTimecodeFormat(int ix)
+{
+ KdenliveSettings::setFrametimecode(ix == 1);
+ m_clipMonitor->updateTimecodeFormat();
+ m_projectMonitor->updateTimecodeFormat();
+}
+
+
+
+
#include "mainwindow.moc"