if (item->baseClip()->isTransparent() && getTransitionItemAtStart(info.startPos, info.track) == NULL) {
// add transparency transition
- QDomElement trans = MainWindow::transitions.getEffectByTag("composite", "composite").cloneNode().toElement();
+ QDomElement trans = MainWindow::transitions.getEffectByTag("composite", "composite").cloneNode().toElement();
new AddTransitionCommand(this, info, getPreviousVideoTrack(info.track), trans, false, true, addCommand);
}
info.track = m_document->tracksCount() - item->track();
<default>false</default>
</entry>
+ <entry name="frametimecode" type="Bool">
+ <label>Show timecodes as frame number instead of hh:mm:ss:ff.</label>
+ <default>false</default>
+ </entry>
+
<entry name="snaptopoints" type="Bool">
<label>Snap movements to clips, guides and markers.</label>
<default>true</default>
void MainWindow::queryQuit()
{
- delete m_effectStack;
- delete m_activeTimeline;
- delete m_projectMonitor;
- kDebug() << "// DEL MON 1 done";
- delete m_clipMonitor;
- kDebug() << "// DEL MON 2 done";
- delete m_activeDocument;
- Mlt::Factory::close();
- qApp->quit();
- /*
- if (queryClose()) {
- Mlt::Factory::close();
- kapp->quit();
- }*/
+ if (queryClose()) {
+ delete m_effectStack;
+ delete m_activeTimeline;
+ delete m_projectMonitor;
+ delete m_clipMonitor;
+ delete m_activeDocument;
+ Mlt::Factory::close();
+ kapp->quit();
+ }
}
//virtual
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);
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"
void slotTranscodeClip();
void slotSetDocumentRenderProfile(const QString &dest, const QString &name, const QString &file);
void slotPrepareRendering(bool scriptExport, bool zoneOnly, const QString &chapterFile);
+ void slotUpdateTimecodeFormat(int ix);
signals:
Q_SCRIPTABLE void abortRenderJob(const QString &url);
toolbar->addWidget(spacer);
m_timePos = new KRestrictedLine(this);
m_timePos->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::MinimumExpanding);
- m_timePos->setInputMask("99:99:99:99");
+ m_frametimecode = KdenliveSettings::frametimecode();
+ if (m_frametimecode) m_timePos->setInputMask("999999999");
+ else m_timePos->setInputMask("99:99:99:99");
toolbar->addWidget(m_timePos);
connect(m_timePos, SIGNAL(editingFinished()), this, SLOT(slotSeek()));
void Monitor::setTimePos(const QString &pos)
{
- m_timePos->setText(pos);
+ if (m_frametimecode) {
+ int frames = m_monitorManager->timecode().getFrameCount(pos, m_monitorManager->timecode().fps());
+ m_timePos->setText(QString::number(frames));
+ } else m_timePos->setText(pos);
slotSeek();
}
void Monitor::slotSeek()
{
- const int frames = m_monitorManager->timecode().getFrameCount(m_timePos->text(), m_monitorManager->timecode().fps());
+ int frames;
+ if (m_frametimecode) frames = m_timePos->text().toInt();
+ else frames = m_monitorManager->timecode().getFrameCount(m_timePos->text(), m_monitorManager->timecode().fps());
slotSeek(frames);
}
{
activateMonitor();
checkOverlay();
- m_timePos->setText(m_monitorManager->timecode().getTimecodeFromFrames(pos));
+ if (m_frametimecode) m_timePos->setText(QString::number(pos));
+ else m_timePos->setText(m_monitorManager->timecode().getTimecodeFromFrames(pos));
m_ruler->slotNewValue(pos);
}
}
m_ruler->slotNewValue(pos);
checkOverlay();
- m_timePos->setText(m_monitorManager->timecode().getTimecodeFromFrames(pos));
+ if (m_frametimecode) m_timePos->setText(QString::number(pos));
+ else m_timePos->setText(m_monitorManager->timecode().getTimecodeFromFrames(pos));
m_playAction->setChecked(false);
m_playAction->setIcon(m_playIcon);
}
}
}
+void Monitor::updateTimecodeFormat()
+{
+ m_frametimecode = KdenliveSettings::frametimecode();
+ if (m_frametimecode) {
+ int frames = m_monitorManager->timecode().getFrameCount(m_timePos->text(), m_monitorManager->timecode().fps());
+ m_timePos->setInputMask("999999999");
+ m_timePos->setText(QString::number(frames));
+ } else {
+ int pos = m_timePos->text().toInt();
+ m_timePos->setInputMask("99:99:99:99");
+ m_timePos->setText(m_monitorManager->timecode().getTimecodeFromFrames(pos));
+ }
+}
+
MonitorRefresh::MonitorRefresh(QWidget* parent) : \
QWidget(parent),
DocClipBase *activeClip();
GenTime position();
void checkOverlay();
+ void updateTimecodeFormat();
protected:
virtual void mousePressEvent(QMouseEvent * event);
QMenu *m_playMenu;
QPoint m_DragStartPosition;
GenTime getSnapForPos(bool previous);
+ bool m_frametimecode;
private slots:
void seekCursor(int pos);