mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-01 21:45:00 -04:00
Display original UTC on waterfall for data read from .wav files. Should replace "sprintf" in plotter.cpp lines 263 and 265.
This commit is contained in:
+22
-6
@@ -246,13 +246,24 @@ void CPlotter::draw(float swide[], bool bScroll, bool bRed)
|
||||
if(m_line == painter1.fontMetrics ().height ()) {
|
||||
painter1.setPen(Qt::white);
|
||||
QString t;
|
||||
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
|
||||
int n = fmod(0.001*ms,m_TRperiod);
|
||||
QDateTime t1=QDateTime::currentDateTimeUtc().addSecs(-n);
|
||||
if(m_TRperiod<60.0) {
|
||||
t=t1.toString("hh:mm:ss") + " " + m_rxBand;
|
||||
if(m_nUTC<0) {
|
||||
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
|
||||
int n = fmod(0.001*ms,m_TRperiod);
|
||||
QDateTime t1=QDateTime::currentDateTimeUtc().addSecs(-n);
|
||||
if(m_TRperiod<60.0) {
|
||||
t=t1.toString("hh:mm:ss") + " " + m_rxBand;
|
||||
} else {
|
||||
t=t1.toString("hh:mm") + " " + m_rxBand;
|
||||
}
|
||||
} else {
|
||||
t=t1.toString("hh:mm") + " " + m_rxBand;
|
||||
int ih=m_nUTC/10000;
|
||||
int im=(m_nUTC - 10000*ih)/100;
|
||||
int is=m_nUTC%100;
|
||||
if(m_TRperiod<60) {
|
||||
t.sprintf("%02d:%02d:%02d",ih,im,is) + " " + m_rxBand;
|
||||
} else {
|
||||
t.sprintf("%02d:%02d",ih,im) + " " + m_rxBand;
|
||||
}
|
||||
}
|
||||
painter1.drawText (5, painter1.fontMetrics ().ascent (), t);
|
||||
}
|
||||
@@ -882,3 +893,8 @@ void CPlotter::setRedFile(QString fRed)
|
||||
{
|
||||
m_redFile=fRed;
|
||||
}
|
||||
|
||||
void CPlotter::setDiskUTC(int nutc)
|
||||
{
|
||||
m_nUTC=nutc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user