Commit b0508bd8 authored by Alexander A. Maly's avatar Alexander A. Maly

Added milliseconds ellapsed time counting

parent 507f45a2
Pipeline #3522 passed with stages
in 4 minutes
...@@ -97,9 +97,9 @@ QSize OneSession::visibleSize() const ...@@ -97,9 +97,9 @@ QSize OneSession::visibleSize() const
QString OneSession::plainText(bool footer_header) const QString OneSession::plainText(bool footer_header) const
{ {
const QString body = lines_.join("\n"); QString body = lines_.join("\n");
const QString header = headerText(); QString header = headerText();
const QString footer = footerText(); QString footer = footerText();
if (footer_header) { if (footer_header) {
return header + "\n" + body + "\n" + footer + "\n"; return header + "\n" + body + "\n" + footer + "\n";
} else { } else {
...@@ -110,8 +110,8 @@ QString OneSession::plainText(bool footer_header) const ...@@ -110,8 +110,8 @@ QString OneSession::plainText(bool footer_header) const
QSize OneSession::minimumSizeHint() const QSize OneSession::minimumSizeHint() const
{ {
const QFontMetrics headingFM(utilityFont()); QFontMetrics headingFM(utilityFont());
const QFontMetrics mainFM(font()); QFontMetrics mainFM(font());
int minH = 2 * (headingFM.height() + BodyPadding + HeaderPadding) + int minH = 2 * (headingFM.height() + BodyPadding + HeaderPadding) +
mainFM.height(); mainFM.height();
int minWidthInChars = fixedWidth_ == -1 ? 10 : fixedWidth_; int minWidthInChars = fixedWidth_ == -1 ? 10 : fixedWidth_;
...@@ -793,13 +793,18 @@ QString OneSession::headerText() const ...@@ -793,13 +793,18 @@ QString OneSession::headerText() const
QString OneSession::footerText() const QString OneSession::footerText() const
{ {
return endTime_.isValid() QString res = endTime_.isValid()
? tr(">> %1:%2:%3 - %4 - Process finished") ? tr(">> %1:%2:%3 - %4 - Process finished")
.arg(endTime_.time().hour(), 2, 10, QChar(' ')) .arg(endTime_.time().hour(), 2, 10, QChar(' '))
.arg(endTime_.time().minute(), 2, 10, QChar('0')) .arg(endTime_.time().minute(), 2, 10, QChar('0'))
.arg(endTime_.time().second(), 2, 10, QChar('0')) .arg(endTime_.time().second(), 2, 10, QChar('0'))
.arg(fileName_) .arg(fileName_)
: ""; : "";
if (startTime_.isValid() && endTime_.isValid()) {
double dt = startTime_.msecsTo(endTime_) * 1e-3;
res += " " + QString::number(dt, 'f', 3) + " ";
}
return res;
} }
QFont OneSession::utilityFont() const QFont OneSession::utilityFont() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment