return m_dropFrameTimecode;
}
-const QString Timecode::mask(GenTime t) const
+const QString Timecode::mask(const GenTime& t) const
{
if (t < GenTime()) {
if (m_dropFrameTimecode) return "#99:99:99,99";
//static
-QString Timecode::getStringTimecode(int frames, const double &fps)
+QString Timecode::getStringTimecode(int frames, const double &fps, bool showFrames)
{
// Returns the timecode in an hh:mm:ss format
}
int seconds = (int)(frames / fps);
+ int frms = frames % (int) (fps + 0.5);
int minutes = seconds / 60;
seconds = seconds % 60;
int hours = minutes / 60;
text.append(QString::number(minutes).rightJustified(2, '0', false));
text.append(':');
text.append(QString::number(seconds).rightJustified(2, '0', false));
+ if (showFrames) {
+ text.append('.');
+ text.append(QString::number(frms).rightJustified(2, '0', false));
+ }
return text;
}