Skip to content

Commit

Permalink
feat(cpn): Extend Log Viewer x-axis time format to show milliseconds (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mha1 authored Nov 10, 2023
1 parent ce1242f commit da0950c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions companion/src/logsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ LogsDialog::LogsDialog(QWidget *parent) :
axisRect = ui->customPlot->axisRect();

// configure bottom axis to show time instead of number:
axisRect->axis(QCPAxis::atBottom)->setLabel(tr("Time (hh:mm:ss)"));
axisRect->axis(QCPAxis::atBottom)->setLabel(tr("Time (hh:mm:ss.ms)"));
QSharedPointer<QCPAxisTickerDateTime> timeTicker(new QCPAxisTickerDateTime);
timeTicker->setDateTimeFormat("hh:mm:ss");
timeTicker->setDateTimeFormat("hh:mm:ss.zzz");
axisRect->axis(QCPAxis::atBottom)->setTicker(timeTicker);
QDateTime now = QDateTime::currentDateTime();
axisRect->axis(QCPAxis::atBottom)->setRange(now.addSecs(-60 * 60 * 2).toTime_t(), now.toTime_t());
Expand Down

0 comments on commit da0950c

Please sign in to comment.