QString crop = m_document->timecode().getDisplayTimecode(m_dragItem->cropStart(), KdenliveSettings::frametimecode());
QString duration = m_document->timecode().getDisplayTimecode(m_dragItem->cropDuration(), KdenliveSettings::frametimecode());
QString offset = m_document->timecode().getDisplayTimecode(m_dragItem->cropStart() - m_dragItemInfo.cropStart, KdenliveSettings::frametimecode());
- emit displayMessage(i18n("Crop from start:") + " " + crop + " " + i18n("Duration:") + " " + duration + " " + i18n("Offset: ") + offset, InformationMessage);
+ emit displayMessage(i18n("Crop from start:") + ' ' + crop + ' ' + i18n("Duration:") + ' ' + duration + ' ' + i18n("Offset:") + ' ' + offset, InformationMessage);
} else if (m_operationMode == RESIZEEND && move) {
m_document->renderer()->pause();
if (!m_controlModifier && m_dragItem->type() == AVWIDGET && m_dragItem->parentItem() && m_dragItem->parentItem() != m_selectionGroup) {
}
QString duration = m_document->timecode().getDisplayTimecode(m_dragItem->cropDuration(), KdenliveSettings::frametimecode());
QString offset = m_document->timecode().getDisplayTimecode(m_dragItem->cropDuration() - m_dragItemInfo.cropDuration, KdenliveSettings::frametimecode());
- emit displayMessage(i18n("Duration:") + " " + duration + " " + i18n("Offset: ") + offset, InformationMessage);
+ emit displayMessage(i18n("Duration:") + ' ' + duration + ' ' + i18n("Offset:") + ' ' + offset, InformationMessage);
} else if (m_operationMode == FADEIN && move) {
((ClipItem*) m_dragItem)->setFadeIn((int)(mappedXPos - m_dragItem->startPos().frames(m_document->fps())));
} else if (m_operationMode == FADEOUT && move) {
QString Timecode::getStringTimecode(int frames, const double &fps)
{
// Returns the timecode in an hh:mm:ss format
+
+ bool negative = false;
+ if (frames < 0) {
+ negative = true;
+ frames = qAbs(frames);
+ }
+
int seconds = (int)(frames / fps);
int minutes = seconds / 60;
seconds = seconds % 60;
int hours = minutes / 60;
minutes = minutes % 60;
QString text;
+ if (negative)
+ text.append('-');
text.append(QString::number(hours).rightJustified(2, '0', false));
text.append(':');
text.append(QString::number(minutes).rightJustified(2, '0', false));
{
// Returns the timecode in an easily read display, like 3 min. 5 sec.
int frames = (int) time.frames(fps);
+
+ bool negative = false;
+ if (frames < 0) {
+ negative = true;
+ frames = qAbs(frames);
+ }
+
int seconds = (int)(frames / fps);
frames = frames - ((int)(fps * seconds));
QString text;
bool trim = false;
+ if (negative)
+ text.append('-');
if (hours != 0) {
text.append(QString::number(hours).rightJustified(2, '0', false));
text.append(' ' + i18n("hour") + ' ');
if (m_dropFrameTimecode) {
return getTimecodeDropFrame(frames);
}
+
+ bool negative = false;
+ if (frames < 0) {
+ negative = true;
+ frames = qAbs(frames);
+ }
+
int seconds = frames / m_displayedFramesPerSecond;
frames = frames % m_displayedFramesPerSecond;
minutes = minutes % 60;
QString text;
+ if (negative)
+ text.append('-');
text.append(QString::number(hours).rightJustified(2, '0', false));
text.append(':');
text.append(QString::number(minutes).rightJustified(2, '0', false));
const QString Timecode::getTimecodeHH_MM_SS_HH(const GenTime & time) const
{
int hundredths = (int)(time.seconds() * 100);
+
+ bool negative = false;
+ if (hundredths < 0) {
+ negative = true;
+ hundredths = qAbs(hundredths);
+ }
+
int seconds = hundredths / 100;
hundredths = hundredths % 100;
int minutes = seconds / 60;
minutes = minutes % 60;
QString text;
-
+ if (negative)
+ text.append('-');
text.append(QString::number(hours).rightJustified(2, '0', false));
text.append(':');
text.append(QString::number(minutes).rightJustified(2, '0', false));
//Given an int called framenumber and a double called framerate
//Framerate should be 29.97, 59.94, or 23.976, otherwise the calculations will be off.
+ bool negative = false;
+ if (framenumber < 0) {
+ negative = true;
+ framenumber = qAbs(framenumber);
+ }
+
int d = floor(framenumber / m_framesPer10Minutes);
int m = framenumber % m_framesPer10Minutes;
int hours = floor(floor(floor(framenumber / m_displayedFramesPerSecond) / 60) / 60);
QString text;
+ if (negative)
+ text.append('-');
text.append(QString::number(hours).rightJustified(2, '0', false));
text.append(':');
text.append(QString::number(minutes).rightJustified(2, '0', false));