Add date to UTC display.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@4728 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2014-12-02 20:14:52 +00:00
parent 00bdd3f9e2
commit 26a0bfdc9b
3 changed files with 23 additions and 27 deletions

View File

@ -1579,7 +1579,7 @@ void MainWindow::guiUpdate()
g_pAstro->astroUpdate(t, m_myGrid, m_hisGrid, fQSO, m_setftx, g_pAstro->astroUpdate(t, m_myGrid, m_hisGrid, fQSO, m_setftx,
m_txFreq, m_azelDir); m_txFreq, m_azelDir);
m_setftx=0; m_setftx=0;
QString utc = " " + t.time().toString() + " "; QString utc = t.date().toString(" yyyy MMM dd \n") + t.time().toString();
ui->labUTC->setText(utc); ui->labUTC->setText(utc);
if((!m_monitoring and !m_diskData) or (khsym==m_hsym0)) { if((!m_monitoring and !m_diskData) or (khsym==m_hsym0)) {
xSignalMeter->setValue(0); xSignalMeter->setValue(0);
@ -1819,10 +1819,18 @@ void MainWindow::on_addButton_clicked() //Add button
} }
QString call3File = m_appDir + "/CALL3.TXT"; QString call3File = m_appDir + "/CALL3.TXT";
QFile f1(call3File); QFile f1(call3File);
if(!f1.open(QIODevice::ReadOnly | QIODevice::Text)) { if(!f1.open(QIODevice::ReadWrite | QIODevice::Text)) {
msgBox("Cannot open " + call3File); msgBox("Cannot open " + call3File);
return; return;
} }
if(f1.size()==0) {
QTextStream out(&f1);
out << "ZZZZZZ" << endl;
f1.close();
f1.open(QIODevice::ReadOnly | QIODevice::Text);
}
QString tmpFile = m_appDir + "/CALL3.TMP"; QString tmpFile = m_appDir + "/CALL3.TMP";
QFile f2(tmpFile); QFile f2(tmpFile);
if(!f2.open(QIODevice::WriteOnly | QIODevice::Text)) { if(!f2.open(QIODevice::WriteOnly | QIODevice::Text)) {
@ -1833,7 +1841,7 @@ void MainWindow::on_addButton_clicked() //Add button
QTextStream out(&f2); QTextStream out(&f2);
QString hc=hiscall; QString hc=hiscall;
QString hc1=""; QString hc1="";
QString hc2=""; QString hc2="000000";
QString s; QString s;
do { do {
s=in.readLine(); s=in.readLine();
@ -1845,6 +1853,7 @@ void MainWindow::on_addButton_clicked() //Add button
hc2=s.mid(0,i1); hc2=s.mid(0,i1);
if(hc>hc1 && hc<hc2) { if(hc>hc1 && hc<hc2) {
out << newEntry + "\n"; out << newEntry + "\n";
out << s + "\n";
m_call3Modified=true; m_call3Modified=true;
} else if(hc==hc2) { } else if(hc==hc2) {
QString t=s + "\n\n is already in CALL3.TXT\n" + QString t=s + "\n\n is already in CALL3.TXT\n" +
@ -1856,14 +1865,13 @@ void MainWindow::on_addButton_clicked() //Add button
m_call3Modified=true; m_call3Modified=true;
} }
} else { } else {
out << s + "\n"; if(s!="") out << s + "\n";
} }
} }
} while(!s.isNull()); } while(!s.isNull());
f1.close(); f1.close();
if(hc>hc1 && !m_call3Modified) if(hc>hc1 && !m_call3Modified) out << newEntry + "\n";
out << newEntry + "\n";
if(m_call3Modified) { if(m_call3Modified) {
QFile f0(m_appDir + "/CALL3.OLD"); QFile f0(m_appDir + "/CALL3.OLD");
if(f0.exists()) f0.remove(); if(f0.exists()) f0.remove();

View File

@ -246,22 +246,6 @@ p, li { white-space: pre-wrap; }
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QGroupBox" name="dxStationGroupBox"> <widget class="QGroupBox" name="dxStationGroupBox">
<property name="sizePolicy"> <property name="sizePolicy">
@ -428,20 +412,24 @@ p, li { white-space: pre-wrap; }
<widget class="QLabel" name="labUTC"> <widget class="QLabel" name="labUTC">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>150</width> <width>165</width>
<height>40</height> <height>70</height>
</size> </size>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<pointsize>20</pointsize> <pointsize>18</pointsize>
</font> </font>
</property> </property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::Panel</enum> <enum>QFrame::Panel</enum>
</property> </property>
<property name="text"> <property name="text">
<string> 01:23:45 </string> <string> 2014 Dec 02
01:23:45 </string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -1,6 +1,6 @@
[Setup] [Setup]
AppName=MAP65 AppName=MAP65
AppVerName=MAP65 Version 2.5 r4597 AppVerName=MAP65 Version 2.5 r4705
AppCopyright=Copyright (C) 2001-2014 by Joe Taylor, K1JT AppCopyright=Copyright (C) 2001-2014 by Joe Taylor, K1JT
DefaultDirName=C:\WSJT\MAP65 DefaultDirName=C:\WSJT\MAP65
DefaultGroupName=WSJT\MAP65 DefaultGroupName=WSJT\MAP65