Options (via Ctrl+M) to minimize size of Main Window and Wide Graph; add separate Start/End times to logging information. Thanks to W9MDB!

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7430 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2016-12-30 15:45:31 +00:00
parent b7309f1d36
commit f98aa4e6f4
20 changed files with 1135 additions and 806 deletions

View File

@ -400,17 +400,17 @@ void MessageClient::clear_decodes ()
}
}
void MessageClient::qso_logged (QDateTime time, QString const& dx_call, QString const& dx_grid
void MessageClient::qso_logged (QDateTime timeOff, QString const& dx_call, QString const& dx_grid
, Frequency dial_frequency, QString const& mode, QString const& report_sent
, QString const& report_received, QString const& tx_power
, QString const& comments, QString const& name)
, QString const& comments, QString const& name, QDateTime timeOn)
{
if (m_->server_port_ && !m_->server_string_.isEmpty ())
{
QByteArray message;
NetworkMessage::Builder out {&message, NetworkMessage::QSOLogged, m_->id_, m_->schema_};
out << time << dx_call.toUtf8 () << dx_grid.toUtf8 () << dial_frequency << mode.toUtf8 ()
<< report_sent.toUtf8 () << report_received.toUtf8 () << tx_power.toUtf8 () << comments.toUtf8 () << name.toUtf8 ();
out << timeOff << dx_call.toUtf8 () << dx_grid.toUtf8 () << dial_frequency << mode.toUtf8 ()
<< report_sent.toUtf8 () << report_received.toUtf8 () << tx_power.toUtf8 () << comments.toUtf8 () << name.toUtf8 () << timeOn;
m_->send_message (out, message);
}
}

View File

@ -57,10 +57,10 @@ public:
Q_SLOT void WSPR_decode (bool is_new, QTime time, qint32 snr, float delta_time, Frequency
, qint32 drift, QString const& callsign, QString const& grid, qint32 power);
Q_SLOT void clear_decodes ();
Q_SLOT void qso_logged (QDateTime time, QString const& dx_call, QString const& dx_grid
Q_SLOT void qso_logged (QDateTime timeOff, QString const& dx_call, QString const& dx_grid
, Frequency dial_frequency, QString const& mode, QString const& report_sent
, QString const& report_received, QString const& tx_power, QString const& comments
, QString const& name);
, QString const& name, QDateTime timeOn);
// this slot may be used to send arbitrary UDP datagrams to and
// destination allowing the underlying socket to be used for general

View File

@ -273,7 +273,7 @@ void MessageServer::impl::parse_message (QHostAddress const& sender, port_type s
case NetworkMessage::QSOLogged:
{
QDateTime time;
QDateTime timeOff;
QByteArray dx_call;
QByteArray dx_grid;
Frequency dial_frequency;
@ -283,14 +283,15 @@ void MessageServer::impl::parse_message (QHostAddress const& sender, port_type s
QByteArray tx_power;
QByteArray comments;
QByteArray name;
in >> time >> dx_call >> dx_grid >> dial_frequency >> mode >> report_sent >> report_received
>> tx_power >> comments >> name;
QDateTime timeOn;
in >> timeOff >> dx_call >> dx_grid >> dial_frequency >> mode >> report_sent >> report_received
>> tx_power >> comments >> name >> timeOn;
if (check_status (in) != Fail)
{
Q_EMIT self_->qso_logged (id, time, QString::fromUtf8 (dx_call), QString::fromUtf8 (dx_grid)
Q_EMIT self_->qso_logged (id, timeOff, QString::fromUtf8 (dx_call), QString::fromUtf8 (dx_grid)
, dial_frequency, QString::fromUtf8 (mode), QString::fromUtf8 (report_sent)
, QString::fromUtf8 (report_received), QString::fromUtf8 (tx_power)
, QString::fromUtf8 (comments), QString::fromUtf8 (name));
, QString::fromUtf8 (comments), QString::fromUtf8 (name), timeOn);
}
}
break;

View File

@ -72,10 +72,10 @@ public:
, quint32 delta_frequency, QString const& mode, QString const& message);
Q_SIGNAL void WSPR_decode (bool is_new, QString const& id, QTime time, qint32 snr, float delta_time, Frequency
, qint32 drift, QString const& callsign, QString const& grid, qint32 power);
Q_SIGNAL void qso_logged (QString const& id, QDateTime time, QString const& dx_call, QString const& dx_grid
Q_SIGNAL void qso_logged (QString const& id, QDateTime timeOff, QString const& dx_call, QString const& dx_grid
, Frequency dial_frequency, QString const& mode, QString const& report_sent
, QString const& report_received, QString const& tx_power, QString const& comments
, QString const& name);
, QString const& name, QDateTime timeOn);
Q_SIGNAL void clear_decodes (QString const& id);
// this signal is emitted when a network error occurs

View File

@ -203,7 +203,7 @@
*
* QSO Logged Out 5 quint32
* Id (unique key) utf8
* Date & Time QDateTime
* Date & Time Off QDateTime
* DX call utf8
* DX grid utf8
* Dial frequency (Hz) quint64
@ -213,6 +213,7 @@
* Tx power utf8
* Comments utf8
* Name utf8
* Date & Time On QDateTime
*
* The QSO logged message is sent to the server(s) when the
* WSJT-X user accepts the "Log QSO" dialog by clicking the "OK"

View File

@ -2,15 +2,18 @@
The following buttons appear just under the decoded text windows on
the main screen:
//.Main UI Controls
//.Main UI
image::main-ui-controls.png[align="left",width=650,alt="Main UI Controls"]
* *Log QSO* raises a dialog window pre-filled with known information
about a QSO you have nearly completed. You can edit or add to this
information before clicking *OK* to log the QSO. If you check *Prompt
me to log QSO* on the *Setup* menu, the program will raise the
confirmation screen automatically when you send a message containing
73.
confirmation screen automatically when you send a message
containing "`73`". *Start Date* and *Start Time* are set when you click
to send the *Tx 2* or *Tx 3* message, and backed up by one or two
minutes, respectively. End date and time are set when the *Log
QSO* screen is invoked.
//.Log QSO Window
image::log-qso.png[align="center",alt="Log QSO"]

View File

@ -87,3 +87,13 @@ spectra, thereby smoothing the curves over multiple bins.
- Click the *Colors* button to cycle through 6 possible choices of
color and line width for the plots.
[[CONTROLS_MISCELLANEOUS]]
=== Miscellaneous
Most windows can be resized as desired. If you are short of screen
space you can make the Main Window and Wide Graph smaller by hiding
some controls and labels. To enable this feature type *Ctrl+M* with
focus on the appropriate window. (For the Main Window you can select
*Hide menus and labels* on the *View* menu.) Type *Ctrl+M* again
to make the controls visible once more.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -134,7 +134,7 @@ int ADIF::getCount()
// open ADIF file and append the QSO details. Return true on success
bool ADIF::addQSOToFile(const QString hisCall, const QString hisGrid, const QString mode, const QString rptSent, const QString rptRcvd, const QString date, const QString time, const QString band,
bool ADIF::addQSOToFile(const QString hisCall, const QString hisGrid, const QString mode, const QString rptSent, const QString rptRcvd, const QString dateOn, const QString timeOn, QString dateOff, const QString timeOff, const QString band,
const QString comments, const QString name, const QString strDialFreq, const QString m_myCall, const QString m_myGrid, const QString m_txPower)
{
QFile f2(_filename);
@ -152,8 +152,10 @@ bool ADIF::addQSOToFile(const QString hisCall, const QString hisGrid, const QStr
t+=" <mode:" + QString::number(mode.length()) + ">" + mode;
t+=" <rst_sent:" + QString::number(rptSent.length()) + ">" + rptSent;
t+=" <rst_rcvd:" + QString::number(rptRcvd.length()) + ">" + rptRcvd;
t+=" <qso_date:8>" + date;
t+=" <time_on:4>" + time;
t+=" <qso_date:8>" + dateOn;
t+=" <time_on:4>" + timeOn;
t+=" <qso_date_off:8>" + dateOff;
t+=" <time_off:4>" + timeOff;
t+=" <band:" + QString::number(band.length()) + ">" + band;
t+=" <freq:" + QString::number(strDialFreq.length()) + ">" + strDialFreq;
t+=" <station_callsign:" + QString::number(m_myCall.length()) + ">" +

View File

@ -28,7 +28,7 @@ class ADIF
int getCount();
// open ADIF file and append the QSO details. Return true on success
bool addQSOToFile(const QString hisCall, const QString hisGrid, const QString mode, const QString rptSent, const QString rptRcvd, const QString date, const QString time, const QString band,
bool addQSOToFile(const QString hisCall, const QString hisGrid, const QString mode, const QString rptSent, const QString rptRcvd, const QString dateOn, const QString timeOn, const QString dateOff, const QString timeOff, const QString band,
const QString comments, const QString name, const QString strDialFreq, const QString m_myCall, const QString m_myGrid, const QString m_txPower);
static QString bandFromFrequency(double dialFreq);

View File

@ -49,7 +49,7 @@ void LogQSO::storeSettings () const
}
void LogQSO::initLogQSO(QString hisCall, QString hisGrid, QString mode,
QString rptSent, QString rptRcvd, QDateTime dateTime,
QString rptSent, QString rptRcvd, QDateTime dateTimeOn, QDateTime dateTimeOff,
Radio::Frequency dialFreq, QString myCall, QString myGrid,
bool noSuffix, bool toRTTY, bool dBtoComments)
{
@ -72,11 +72,16 @@ void LogQSO::initLogQSO(QString hisCall, QString hisGrid, QString mode,
ui->mode->setText(mode);
ui->sent->setText(rptSent);
ui->rcvd->setText(rptRcvd);
m_dateTime=dateTime;
QString date=dateTime.toString("yyyy-MM-dd");
ui->date->setText(date);
QString time=dateTime.toString("hhmm");
ui->time->setText(time);
m_dateTimeOn=dateTimeOn;
m_dateTimeOff=dateTimeOff;
QString dateOn=dateTimeOn.toString("yyyy-MM-dd");
ui->dateOn->setText(dateOn);
QString timeOn=dateTimeOn.toString("hhmm");
ui->timeOn->setText(timeOn);
QString dateOff=dateTimeOff.toString("yyyy-MM-dd");
ui->dateOff->setText(dateOff);
QString timeOff=dateTimeOff.toString("hhmm");
ui->timeOff->setText(timeOff);
m_dialFreq=dialFreq;
m_myCall=myCall;
m_myGrid=myGrid;
@ -88,7 +93,7 @@ void LogQSO::initLogQSO(QString hisCall, QString hisGrid, QString mode,
void LogQSO::accept()
{
QString hisCall,hisGrid,mode,rptSent,rptRcvd,date,time,band;
QString hisCall,hisGrid,mode,rptSent,rptRcvd,dateOn,dateOff,timeOn,timeOff,band;
QString comments,name;
hisCall=ui->call->text();
@ -96,9 +101,12 @@ void LogQSO::accept()
mode=ui->mode->text();
rptSent=ui->sent->text();
rptRcvd=ui->rcvd->text();
date=ui->date->text();
date=date.mid(0,4) + date.mid(5,2) + date.mid(8,2);
time=ui->time->text();
dateOn=ui->dateOn->text();
dateOn=dateOn.mid(0,4) + dateOn.mid(5,2) + dateOn.mid(8,2);
timeOn=ui->timeOn->text();
dateOff=ui->dateOff->text();
dateOff=dateOff.mid(0,4) + dateOff.mid(5,2) + dateOff.mid(8,2);
timeOff=ui->timeOff->text();
band=ui->band->text();
name=ui->name->text();
m_txPower=ui->txPower->text();
@ -111,7 +119,7 @@ void LogQSO::accept()
ADIF adifile;
auto adifilePath = QDir {QStandardPaths::writableLocation (QStandardPaths::DataLocation)}.absoluteFilePath ("wsjtx_log.adi");
adifile.init(adifilePath);
if (!adifile.addQSOToFile(hisCall,hisGrid,mode,rptSent,rptRcvd,date,time,band,comments,name,strDialFreq,m_myCall,m_myGrid,m_txPower))
if (!adifile.addQSOToFile(hisCall,hisGrid,mode,rptSent,rptRcvd,dateOn,timeOn,dateOff,timeOff,band,comments,name,strDialFreq,m_myCall,m_myGrid,m_txPower))
{
MessageBox::warning_message (this, tr ("Log file error"),
tr ("Cannot open \"%1\"").arg (adifilePath));
@ -124,8 +132,10 @@ void LogQSO::accept()
tr ("Cannot open \"%1\" for append").arg (f.fileName ()),
tr ("Error: %1").arg (f.errorString ()));
} else {
QString logEntry=m_dateTime.date().toString("yyyy-MMM-dd,") +
m_dateTime.time().toString("hh:mm,") + hisCall + "," +
QString logEntry=m_dateTimeOn.date().toString("yyyy-MM-dd,") +
m_dateTimeOn.time().toString("hh:mm,") +
m_dateTimeOff.date().toString("yyyy-MM-dd,") +
m_dateTimeOff.time().toString("hh:mm,") + hisCall + "," +
hisGrid + "," + strDialFreq + "," + mode +
"," + rptSent + "," + rptRcvd + "," + m_txPower +
"," + comments + "," + name;
@ -135,7 +145,7 @@ void LogQSO::accept()
}
//Clean up and finish logging
Q_EMIT acceptQSO (m_dateTime, hisCall, hisGrid, m_dialFreq, mode, rptSent, rptRcvd, m_txPower, comments, name);
Q_EMIT acceptQSO (m_dateTimeOff, hisCall, hisGrid, m_dialFreq, mode, rptSent, rptRcvd, m_txPower, comments, name,m_dateTimeOn);
QDialog::accept();
}

View File

@ -26,7 +26,7 @@ public:
explicit LogQSO(QString const& programTitle, QSettings *, QWidget *parent = 0);
~LogQSO();
void initLogQSO(QString hisCall, QString hisGrid, QString mode,
QString rptSent, QString rptRcvd, QDateTime dateTime,
QString rptSent, QString rptRcvd, QDateTime dateTimeOn,QDateTime dateTimeOff,
Radio::Frequency dialFreq, QString myCall, QString myGrid,
bool noSuffix, bool toRTTY, bool dBtoComments);
@ -34,11 +34,11 @@ public slots:
void accept();
signals:
void acceptQSO (QDateTime const&, QString const& call, QString const& grid
void acceptQSO (QDateTime const& QSO_date_off, QString const& call, QString const& grid
, Radio::Frequency dial_freq, QString const& mode
, QString const& rpt_sent, QString const& rpt_received
, QString const& tx_power, QString const& comments
, QString const& name);
, QString const& name, QDateTime const& QSO_date_on);
protected:
void hideEvent (QHideEvent *);
@ -54,7 +54,8 @@ private:
Radio::Frequency m_dialFreq;
QString m_myCall;
QString m_myGrid;
QDateTime m_dateTime;
QDateTime m_dateTimeOn;
QDateTime m_dateTimeOff;
};
#endif // LogQSO_H

1610
logqso.ui

File diff suppressed because it is too large Load Diff

View File

@ -504,6 +504,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
txMsgButtonGroup->addButton(ui->txrb4,4);
txMsgButtonGroup->addButton(ui->txrb5,5);
txMsgButtonGroup->addButton(ui->txrb6,6);
set_dateTimeQSO(-1);
connect(txMsgButtonGroup,SIGNAL(buttonClicked(int)),SLOT(set_ntx(int)));
connect(ui->decodedTextBrowser2,SIGNAL(selectCallsign(bool,bool)),this,
SLOT(doubleClickOnCall(bool,bool)));
@ -679,6 +680,9 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
m_audioThread.start (m_audioThreadPriority);
m_dateTimeDefault=QDateTime(QDate(1900,1,1),QTime(0,0));
m_dateTimeQSOOn=m_dateTimeDefault;
#ifdef WIN32
if (!m_multiple)
{
@ -849,6 +853,8 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
connect (&splashTimer, &QTimer::timeout, this, &MainWindow::splash_done);
splashTimer.setSingleShot (true);
splashTimer.start (20 * 1000);
m_bHideControls = !m_bHideControls; // we're not toggling here so we start in opposite state
on_actionHide_Controls_triggered();
// this must be the last statement of constructor
if (!m_valid) throw std::runtime_error {"Fatal initialization exception"};
@ -904,6 +910,7 @@ void MainWindow::writeSettings()
{
m_settings->beginGroup("MainWindow");
m_settings->setValue ("geometry", saveGeometry ());
m_settings->setValue ("geometryNoControls", m_geometryNoControls);
m_settings->setValue ("state", saveState ());
m_settings->setValue("MRUdir", m_path);
m_settings->setValue("TxFirst",m_txFirst);
@ -912,6 +919,7 @@ void MainWindow::writeSettings()
m_settings->setValue ("AstroDisplayed", m_astroWidget && m_astroWidget->isVisible());
m_settings->setValue ("MsgAvgDisplayed", m_msgAvgWidget && m_msgAvgWidget->isVisible());
m_settings->setValue ("FreeText", ui->freeTextMsg->currentText ());
m_settings->setValue ("HideControls", m_bHideControls);
m_settings->endGroup();
m_settings->beginGroup("Common");
@ -958,6 +966,7 @@ void MainWindow::readSettings()
{
m_settings->beginGroup("MainWindow");
restoreGeometry (m_settings->value ("geometry", saveGeometry ()).toByteArray ());
m_geometryNoControls = m_settings->value ("geometryNoControls",saveGeometry()).toByteArray();
restoreState (m_settings->value ("state", saveState ()).toByteArray ());
ui->dxCallEntry->setText (m_settings->value ("DXcall", QString {}).toString ());
ui->dxGridEntry->setText (m_settings->value ("DXgrid", QString {}).toString ());
@ -967,6 +976,7 @@ void MainWindow::readSettings()
auto displayMsgAvg = m_settings->value ("MsgAvgDisplayed", false).toBool ();
if (m_settings->contains ("FreeText")) ui->freeTextMsg->setCurrentText (
m_settings->value ("FreeText").toString ());
m_bHideControls = m_settings->value("HideControls", false).toBool ();
m_settings->endGroup();
// do this outside of settings group because it uses groups internally
@ -1550,6 +1560,12 @@ void MainWindow::keyPressEvent (QKeyEvent * e)
}
}
break;
case Qt::Key_M:
if(e->modifiers() & Qt::ControlModifier) {
on_actionHide_Controls_triggered();
return;
}
break;
case Qt::Key_F4:
clearDX ();
ui->dxCallEntry->setFocus();
@ -1919,6 +1935,59 @@ void MainWindow::on_actionFast_Graph_triggered()
m_fastGraph->show();
}
// This allows the window to shrink by removing certain things
// and reducing space used by controls
void MainWindow::on_actionHide_Controls_triggered()
{
m_bHideControls = !m_bHideControls;
int spacing = m_bHideControls ? 1 : 6;
if (m_bHideControls) {
statusBar ()->removeWidget (&auto_tx_label);
minimumSize().setHeight(450);
minimumSize().setWidth(700);
restoreGeometry(m_geometryNoControls);
updateGeometry();
//resize(450,700); // how to auto-shrink it?
}
else {
m_geometryNoControls = saveGeometry();
statusBar ()->addWidget(&auto_tx_label);
minimumSize().setHeight(520);
minimumSize().setWidth(770);
}
ui->menuBar->setVisible(!m_bHideControls);
ui->label_6->setVisible(!m_bHideControls);
ui->line->setVisible(!m_bHideControls);
ui->line_2->setVisible(!m_bHideControls);
ui->label_7->setVisible(!m_bHideControls);
ui->decodedTextLabel->setVisible(!m_bHideControls);
ui->decodedTextLabel2->setVisible(!m_bHideControls);
ui->gridLayout_5->layout()->setSpacing(spacing);
ui->horizontalLayout->layout()->setSpacing(spacing);
ui->horizontalLayout_2->layout()->setSpacing(spacing);
ui->horizontalLayout_3->layout()->setSpacing(spacing);
ui->horizontalLayout_4->layout()->setSpacing(spacing);
ui->horizontalLayout_5->layout()->setSpacing(spacing);
ui->horizontalLayout_6->layout()->setSpacing(spacing);
ui->horizontalLayout_7->layout()->setSpacing(spacing);
ui->horizontalLayout_8->layout()->setSpacing(spacing);
ui->horizontalLayout_9->layout()->setSpacing(spacing);
ui->horizontalLayout_10->layout()->setSpacing(spacing);
ui->horizontalLayout_11->layout()->setSpacing(spacing);
ui->horizontalLayout_12->layout()->setSpacing(spacing);
ui->horizontalLayout_13->layout()->setSpacing(spacing);
ui->horizontalLayout_14->layout()->setSpacing(spacing);
ui->verticalLayout->layout()->setSpacing(spacing);
ui->verticalLayout_2->layout()->setSpacing(spacing);
ui->verticalLayout_3->layout()->setSpacing(spacing);
ui->verticalLayout_4->layout()->setSpacing(spacing);
ui->verticalLayout_5->layout()->setSpacing(spacing);
ui->verticalLayout_7->layout()->setSpacing(spacing);
ui->verticalLayout_8->layout()->setSpacing(spacing);
ui->tab->layout()->setSpacing(spacing);
}
void MainWindow::on_actionAstronomical_data_toggled (bool checked)
{
if (checked)
@ -2595,6 +2664,7 @@ void MainWindow::on_EraseButton_clicked() //Erase
}
}
m_msErase=ms;
set_dateTimeQSO(-1);
}
void MainWindow::decodeBusy(bool b) //decodeBusy()
@ -3153,11 +3223,51 @@ void MainWindow::on_txFirstCheckBox_stateChanged(int nstate) //TxFirst
m_txFirst = (nstate==2);
}
void MainWindow::set_dateTimeQSO(int m_ntx)
{
// m_ntx = -1 resets to default time
// Our QSO start time can be fairly well determined from Tx 2 and Tx 3 -- the grid reports
// If we CQ'd and sending sigrpt then 2 minutes ago n=2
// If we're on msg 3 then 3 minutes ago n=3 -- might have sat on msg1 for a while
// If we've already set our time on just return.
// This should mean that Tx2 or Tx3 has been repeated so don't update the start time
// We reset it in several places
if (m_ntx == -1) { // we use a default date to detect change
m_dateTimeQSOOn=m_dateTimeDefault;
}
else if (m_dateTimeQSOOn != m_dateTimeDefault) {
return;
}
else { // we also take of m_TRperiod/2 to allow for late clicks
m_dateTimeQSOOn=QDateTime::currentDateTimeUtc().addSecs((-(m_ntx-1)*m_TRperiod)-m_TRperiod/2);
}
}
void MainWindow::set_ntx(int n) //set_ntx()
{
m_ntx=n;
}
void MainWindow::on_txrb1_toggled(bool status)
{
// if Tx 1 is clicked we won't use it so reset to default
// We may hang on this message for quite a while trying
// to get a response perhaps when another QSO is going on
if (status) set_dateTimeQSO(-1);
}
void MainWindow::on_txrb2_toggled(bool status)
{
// Tx 2 means we already have CQ'd so good reference
if (status) set_dateTimeQSO(m_ntx);
}
void MainWindow::on_txrb3_toggled(bool status)
{
// Tx 3 means we should havel already have done Tx 1 so good reference
if (status) set_dateTimeQSO(m_ntx);
}
void MainWindow::on_txb1_clicked() //txb1
{
m_ntx=1;
@ -3198,10 +3308,12 @@ void MainWindow::on_txb6_clicked() //txb6
m_ntx=6;
ui->txrb6->setChecked(true);
if (m_transmitting) m_restart=true;
if (ui->txrb6->text().contains("CQ")) set_dateTimeQSO(-1);
}
void MainWindow::doubleClickOnCall2(bool shift, bool ctrl)
{
set_dateTimeQSO(-1); // reset our QSO start time
m_decodedText2=true;
doubleClickOnCall(shift,ctrl);
m_decodedText2=false;
@ -3211,6 +3323,7 @@ void MainWindow::doubleClickOnCall(bool shift, bool ctrl)
{
QTextCursor cursor;
QString t; //Full contents
set_dateTimeQSO(-1); // reset our QSO start time
if(m_mode=="ISCAT") {
MessageBox::information_message (this,
"Double-click not presently implemented for ISCAT mode");
@ -3935,24 +4048,27 @@ void MainWindow::on_genStdMsgsPushButton_clicked() //genStdMsgs button
void MainWindow::on_logQSOButton_clicked() //Log QSO button
{
if (!m_hisCall.size ()) return;
m_dateTimeQSO=QDateTime::currentDateTimeUtc();
// m_dateTimeQSOOn should really already be set but we'll ensure it gets set to something just in case
if (m_dateTimeQSOOn==m_dateTimeDefault)
m_dateTimeQSOOn=QDateTime::currentDateTimeUtc();
m_dateTimeQSOOff = QDateTime::currentDateTimeUtc();
m_logDlg->initLogQSO (m_hisCall, m_hisGrid, m_modeTx, m_rptSent, m_rptRcvd,
m_dateTimeQSO, m_freqNominal + ui->TxFreqSpinBox->value(),
m_dateTimeQSOOn, m_dateTimeQSOOff, m_freqNominal + ui->TxFreqSpinBox->value(),
m_config.my_callsign(), m_config.my_grid(), m_noSuffix,
m_config.log_as_RTTY(), m_config.report_in_comments());
m_dateTimeQSOOn = m_dateTimeDefault;
}
void MainWindow::acceptQSO2(QDateTime const& QSO_date, QString const& call, QString const& grid
void MainWindow::acceptQSO2(QDateTime const& QSO_date_off, QString const& call, QString const& grid
, Frequency dial_freq, QString const& mode
, QString const& rpt_sent, QString const& rpt_received
, QString const& tx_power, QString const& comments
, QString const& name)
, QString const& name, QDateTime const& QSO_date_on)
{
QString date = m_dateTimeQSO.toString("yyyyMMdd");
QString date = m_dateTimeQSOOn.toString("yyyyMMdd");
m_logBook.addAsWorked (m_hisCall, m_config.bands ()->find (m_freqNominal), m_modeTx, date);
m_messageClient->qso_logged (QSO_date, call, grid, dial_freq, mode, rpt_sent, rpt_received, tx_power, comments, name);
m_messageClient->qso_logged (QSO_date_off, call, grid, dial_freq, mode, rpt_sent, rpt_received, tx_power, comments, name, QSO_date_on);
if (m_config.clear_DX ())
{
@ -4645,6 +4761,7 @@ void MainWindow::on_pbCallCQ_clicked()
m_ntx=7;
ui->rbGenMsg->setChecked(true);
if(m_transmitting) m_restart=true;
set_dateTimeQSO(-1);
}
void MainWindow::on_pbAnswerCaller_clicked()
@ -4658,6 +4775,7 @@ void MainWindow::on_pbAnswerCaller_clicked()
m_ntx=7;
ui->rbGenMsg->setChecked(true);
if(m_transmitting) m_restart=true;
set_dateTimeQSO(2);
}
void MainWindow::on_pbSendRRR_clicked()
@ -4689,6 +4807,7 @@ void MainWindow::on_pbSendReport_clicked()
m_ntx=7;
ui->rbGenMsg->setChecked(true);
if(m_transmitting) m_restart=true;
set_dateTimeQSO(3);
}
void MainWindow::on_pbSend73_clicked()

View File

@ -148,7 +148,11 @@ private slots:
void on_EraseButton_clicked();
void on_txb1_clicked();
void on_txFirstCheckBox_stateChanged(int arg1);
void set_dateTimeQSO(int m_ntx);
void set_ntx(int n);
void on_txrb1_toggled(bool status);
void on_txrb2_toggled(bool status);
void on_txrb3_toggled(bool status);
void on_txb2_clicked();
void on_txb3_clicked();
void on_txb4_clicked();
@ -196,7 +200,7 @@ private slots:
, Frequency dial_freq, QString const& mode
, QString const& rpt_sent, QString const& rpt_received
, QString const& tx_power, QString const& comments
, QString const& name);
, QString const& name, QDateTime const&);
void on_bandComboBox_currentIndexChanged (int index);
void on_bandComboBox_activated (int index);
void on_readFreq_clicked();
@ -239,6 +243,7 @@ private slots:
void on_actionEcho_triggered();
void on_actionISCAT_triggered();
void on_actionFast_Graph_triggered();
void on_actionHide_Controls_triggered();
void fast_decode_done();
void on_actionSave_reference_spectrum_triggered();
void on_actionClear_reference_spectrum_triggered();
@ -422,6 +427,7 @@ private:
bool m_bNoMoreFiles;
bool m_bQRAsyncWarned;
bool m_bDoubleClicked;
bool m_bHideControls;
float m_pctZap;
int m_ihsym;
@ -495,7 +501,9 @@ private:
QSet<QString> m_pfx;
QSet<QString> m_sfx;
QDateTime m_dateTimeQSO;
QDateTime m_dateTimeQSOOn;
QDateTime m_dateTimeQSOOff;
QDateTime m_dateTimeDefault;
QSharedMemory *mem_jt9;
LogBook m_logBook;
@ -523,7 +531,7 @@ private:
DisplayManual m_manual;
QHash<QString, QVariant> m_pwrBandTxMemory; // Remembers power level by band
QHash<QString, QVariant> m_pwrBandTuneMemory; // Remembers power level by band for tuning
QByteArray m_geometryNoControls;
//---------------------------------------------------- private functions
void readSettings();
void setDecodedTextFont (QFont const&);

View File

@ -2357,6 +2357,8 @@ QPushButton[state=&quot;ok&quot;] {
<addaction name="actionMessage_averaging"/>
<addaction name="actionEcho_Graph"/>
<addaction name="actionFast_Graph"/>
<addaction name="separator"/>
<addaction name="actionHide_Controls"/>
</widget>
<widget class="QMenu" name="menuDecode">
<property name="title">
@ -2899,6 +2901,17 @@ QPushButton[state=&quot;ok&quot;] {
<string>Clear reference spectrum</string>
</property>
</action>
<action name="actionHide_Controls">
<property name="text">
<string>Hide menus and labels</string>
</property>
<property name="toolTip">
<string>Reduces window size by removing controls and some spacing</string>
</property>
<property name="shortcut">
<string>Ctrl+M</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>

View File

@ -22,6 +22,7 @@
<tr><td><b>Alt+H </b></td><td>Halt Tx</td></tr>
<tr><td><b>Ctrl+L </b></td><td>Lookup callsign in database, generate standard messages</td></tr>
<tr><td><b>Alt+M </b></td><td>Monitor</td></tr>
<tr><td><b>Ctrl+M </b></td><td>Minimize window size by hiding some controls</td></tr>
<tr><td><b>Alt+N </b></td><td>Enable Tx</td></tr>
<tr><td><b>Ctrl+O </b></td><td>Open a .wav file</td></tr>
<tr><td><b>Alt+Q </b></td><td>Log QSO</td></tr>

View File

@ -6,6 +6,7 @@
#include "Configuration.hpp"
#include "MessageBox.hpp"
#include "moc_widegraph.cpp"
#include "SettingsGroup.hpp"
namespace
{
@ -82,6 +83,9 @@ WideGraph::WideGraph(QSettings * settings, QWidget *parent) :
int m_fMin = m_settings->value ("Fmin", 2500).toInt ();
ui->fSplitSpinBox->setValue (m_fMin);
setRxRange (m_fMin);
m_bHideControls = m_settings->value("HideControls", false).toBool ();
m_bHideControls = !m_bHideControls; // we're not toggling here so we start in opposite state
on_hideControls();
m_settings->endGroup();
saveSettings (); // update config with defaults
@ -112,6 +116,57 @@ void WideGraph::closeEvent (QCloseEvent * e)
QDialog::closeEvent (e);
}
void WideGraph::on_hideControls()
{
m_bHideControls = !m_bHideControls;
ui->verticalLayout->setEnabled(!m_bHideControls);
ui->gridLayout->setEnabled(!m_bHideControls);
ui->horizontalLayout->setEnabled(!m_bHideControls);
ui->horizontalLayout_2->setEnabled(!m_bHideControls);
ui->horizontalLayout_3->setEnabled(!m_bHideControls);
if (!m_bHideControls) {
ui->adjust_palette_push_button->show();
ui->labPalette->show();
ui->smoSpinBox->show();
ui->cbFlatten->show();
ui->cbRef->show();
ui->bppSpinBox->show();
ui->fSplitSpinBox->show();
ui->fStartSpinBox->show();
ui->gain2dSlider->show();
ui->gainSlider->show();
ui->line->show();
ui->line_2->show();
ui->paletteComboBox->show();
ui->sbPercent2dPlot->show();
ui->spec2dComboBox->show();
ui->waterfallAvgSpinBox->show();
ui->zero2dSlider->show();
ui->zeroSlider->show();
}
else {
ui->adjust_palette_push_button->hide();
ui->labPalette->hide();
ui->smoSpinBox->hide();
ui->cbFlatten->hide();
ui->cbRef->hide();
ui->bppSpinBox->hide();
ui->fSplitSpinBox->hide();
ui->fStartSpinBox->hide();
ui->gain2dSlider->hide();
ui->gainSlider->hide();
ui->line->hide();
ui->line_2->hide();
ui->paletteComboBox->hide();
ui->sbPercent2dPlot->hide();
ui->spec2dComboBox->hide();
ui->waterfallAvgSpinBox->hide();
ui->zero2dSlider->hide();
ui->zeroSlider->hide();
ui->widePlot->adjustSize();
}
}
void WideGraph::saveSettings() //saveSettings
{
m_settings->beginGroup ("WideGraph");
@ -136,6 +191,7 @@ void WideGraph::saveSettings() //saveS
m_settings->setValue ("Fmin", m_fMin);
m_settings->setValue("Flatten",m_bFlatten);
m_settings->setValue("UseRef",m_bRef);
m_settings->setValue("HideControls",m_bHideControls);
m_settings->endGroup ();
}
@ -217,6 +273,11 @@ void WideGraph::keyPressEvent(QKeyEvent *e) //F1
if(e->modifiers() & Qt::ControlModifier) n+=100;
emit f11f12(n);
break;
case Qt::Key_M:
if(e->modifiers() & Qt::ControlModifier) {
on_hideControls();
}
break;
default:
QDialog::keyPressEvent (e);
}

View File

@ -80,6 +80,7 @@ private slots:
void on_zero2dSlider_valueChanged(int value);
void on_smoSpinBox_valueChanged(int n);
void on_sbPercent2dPlot_valueChanged(int n);
void on_hideControls();
private:
void readPalette();
@ -104,7 +105,7 @@ private:
bool m_bFlatten;
bool m_bRef;
bool m_bHaveTransmitted; //Set true at end of a WSPR transmission
bool m_bHideControls;
QString m_mode;
QString m_modeTx;
QString m_waterfallPalette;