mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-10-05 03:26:53 -04:00
1. Option to send Tx message (highlighted in yellow) to QSO window.
2. Setup | Options changed to Setup | Configuration 3. Alt-V causes save-to-file of the most recently completed Rx sequence. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3161 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
f88c0aad81
commit
5483e378b0
@ -131,6 +131,10 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
logQSOTimer->setSingleShot(true);
|
logQSOTimer->setSingleShot(true);
|
||||||
connect(logQSOTimer, SIGNAL(timeout()), this, SLOT(on_logQSOButton_clicked()));
|
connect(logQSOTimer, SIGNAL(timeout()), this, SLOT(on_logQSOButton_clicked()));
|
||||||
|
|
||||||
|
killFileTimer = new QTimer(this);
|
||||||
|
killFileTimer->setSingleShot(true);
|
||||||
|
connect(killFileTimer, SIGNAL(timeout()), this, SLOT(killFile()));
|
||||||
|
|
||||||
m_auto=false;
|
m_auto=false;
|
||||||
m_waterfallAvg = 1;
|
m_waterfallAvg = 1;
|
||||||
m_txFirst=false;
|
m_txFirst=false;
|
||||||
@ -389,6 +393,7 @@ void MainWindow::writeSettings()
|
|||||||
settings.setValue("LeftColor",m_leftColor);
|
settings.setValue("LeftColor",m_leftColor);
|
||||||
settings.setValue("73TxDisable",m_73TxDisable);
|
settings.setValue("73TxDisable",m_73TxDisable);
|
||||||
settings.setValue("Runaway",m_runaway);
|
settings.setValue("Runaway",m_runaway);
|
||||||
|
settings.setValue("Tx2QSO",m_tx2QSO);
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -497,6 +502,8 @@ void MainWindow::readSettings()
|
|||||||
ui->action_73TxDisable->setChecked(m_73TxDisable);
|
ui->action_73TxDisable->setChecked(m_73TxDisable);
|
||||||
m_runaway=settings.value("Runaway",false).toBool();
|
m_runaway=settings.value("Runaway",false).toBool();
|
||||||
ui->actionRunaway_Tx_watchdog->setChecked(m_runaway);
|
ui->actionRunaway_Tx_watchdog->setChecked(m_runaway);
|
||||||
|
m_tx2QSO=settings.value("Tx2QSO",false).toBool();
|
||||||
|
ui->actionTx2QSO->setChecked(m_tx2QSO);
|
||||||
|
|
||||||
if(!ui->actionLinrad->isChecked() && !ui->actionCuteSDR->isChecked() &&
|
if(!ui->actionLinrad->isChecked() && !ui->actionCuteSDR->isChecked() &&
|
||||||
!ui->actionAFMHot->isChecked() && !ui->actionBlue->isChecked()) {
|
!ui->actionAFMHot->isChecked() && !ui->actionBlue->isChecked()) {
|
||||||
@ -784,6 +791,11 @@ void MainWindow::keyPressEvent( QKeyEvent *e ) //keyPressEvent
|
|||||||
genStdMsgs(m_rpt);
|
genStdMsgs(m_rpt);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case Qt::Key_V:
|
||||||
|
if(e->modifiers() & Qt::AltModifier) {
|
||||||
|
m_fileToSave=m_fname;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1188,10 +1200,7 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
m_bdecoded = (t.mid(23,1).toInt()==1);
|
m_bdecoded = (t.mid(23,1).toInt()==1);
|
||||||
bool keepFile=m_saveAll or (m_saveSynced and m_bsynced) or
|
bool keepFile=m_saveAll or (m_saveSynced and m_bsynced) or
|
||||||
(m_saveDecoded and m_bdecoded);
|
(m_saveDecoded and m_bdecoded);
|
||||||
if(!keepFile and !m_diskData) {
|
if(!keepFile and !m_diskData) killFileTimer->start(45*1000); //Kill in 45 s
|
||||||
QFile savedFile(m_fname);
|
|
||||||
savedFile.remove();
|
|
||||||
}
|
|
||||||
jt9com_.nagain=0;
|
jt9com_.nagain=0;
|
||||||
jt9com_.ndiskdat=0;
|
jt9com_.ndiskdat=0;
|
||||||
QFile lockFile(m_appDir + "/.lock");
|
QFile lockFile(m_appDir + "/.lock");
|
||||||
@ -1203,7 +1212,6 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
m_blankLine=true;
|
m_blankLine=true;
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
QFile f("ALL.TXT");
|
QFile f("ALL.TXT");
|
||||||
f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append);
|
f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append);
|
||||||
QTextStream out(&f);
|
QTextStream out(&f);
|
||||||
@ -1330,6 +1338,15 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::killFile()
|
||||||
|
{
|
||||||
|
if(m_fname==m_fileToSave) {
|
||||||
|
} else {
|
||||||
|
QFile savedFile(m_fname);
|
||||||
|
savedFile.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_EraseButton_clicked() //Erase
|
void MainWindow::on_EraseButton_clicked() //Erase
|
||||||
{
|
{
|
||||||
qint64 ms=QDateTime::currentMSecsSinceEpoch();
|
qint64 ms=QDateTime::currentMSecsSinceEpoch();
|
||||||
@ -1431,7 +1448,9 @@ void MainWindow::guiUpdate()
|
|||||||
out << QDateTime::currentDateTimeUtc().toString("hhmm")
|
out << QDateTime::currentDateTimeUtc().toString("hhmm")
|
||||||
<< " Transmitting: " << t << endl;
|
<< " Transmitting: " << t << endl;
|
||||||
f.close();
|
f.close();
|
||||||
|
displayTxMsg(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList w=t.split(" ",QString::SkipEmptyParts);
|
QStringList w=t.split(" ",QString::SkipEmptyParts);
|
||||||
t="";
|
t="";
|
||||||
if(w.length()==3) t=w[2];
|
if(w.length()==3) t=w[2];
|
||||||
@ -1501,6 +1520,7 @@ void MainWindow::guiUpdate()
|
|||||||
out << QDateTime::currentDateTimeUtc().toString("hhmm")
|
out << QDateTime::currentDateTimeUtc().toString("hhmm")
|
||||||
<< " Transmitting: " << t << endl;
|
<< " Transmitting: " << t << endl;
|
||||||
f.close();
|
f.close();
|
||||||
|
displayTxMsg(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!btxok && btxok0 && m_iptt==1) stopTx();
|
if(!btxok && btxok0 && m_iptt==1) stopTx();
|
||||||
@ -1580,6 +1600,22 @@ void MainWindow::guiUpdate()
|
|||||||
btxok0=btxok;
|
btxok0=btxok;
|
||||||
} //End of GUIupdate
|
} //End of GUIupdate
|
||||||
|
|
||||||
|
void MainWindow::displayTxMsg(QString t)
|
||||||
|
{
|
||||||
|
QString bg="yellow";
|
||||||
|
QTextBlockFormat bf;
|
||||||
|
QTextCursor cursor;
|
||||||
|
t=QDateTime::currentDateTimeUtc().toString("hhmmss Tx: ") + t;
|
||||||
|
QString s = "<table border=0 cellspacing=0 width=100%><tr><td bgcolor=\"" +
|
||||||
|
bg + "\"><pre>" + t + "</pre></td></tr></table>";
|
||||||
|
cursor = ui->decodedTextBrowser->textCursor();
|
||||||
|
cursor.movePosition(QTextCursor::End);
|
||||||
|
bf = cursor.blockFormat();
|
||||||
|
bf.setBackground(QBrush(QColor(bg)));
|
||||||
|
cursor.insertHtml(s);
|
||||||
|
ui->decodedTextBrowser->setTextCursor(cursor);
|
||||||
|
}
|
||||||
|
|
||||||
QString MainWindow::rig_command()
|
QString MainWindow::rig_command()
|
||||||
{
|
{
|
||||||
QString cmnd1,cmnd2;
|
QString cmnd1,cmnd2;
|
||||||
@ -2492,3 +2528,8 @@ void MainWindow::on_actionRunaway_Tx_watchdog_triggered(bool checked)
|
|||||||
{
|
{
|
||||||
m_runaway=checked;
|
m_runaway=checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionTx2QSO_triggered(bool checked)
|
||||||
|
{
|
||||||
|
m_tx2QSO=checked;
|
||||||
|
}
|
||||||
|
@ -147,8 +147,9 @@ private slots:
|
|||||||
void on_rptSpinBox_valueChanged(int n);
|
void on_rptSpinBox_valueChanged(int n);
|
||||||
void on_actionColor_highlighting_in_left_window_triggered(bool checked);
|
void on_actionColor_highlighting_in_left_window_triggered(bool checked);
|
||||||
void on_action_73TxDisable_triggered(bool checked);
|
void on_action_73TxDisable_triggered(bool checked);
|
||||||
|
|
||||||
void on_actionRunaway_Tx_watchdog_triggered(bool checked);
|
void on_actionRunaway_Tx_watchdog_triggered(bool checked);
|
||||||
|
void on_actionTx2QSO_triggered(bool checked);
|
||||||
|
void killFile();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
@ -242,6 +243,7 @@ private:
|
|||||||
bool m_73TxDisable;
|
bool m_73TxDisable;
|
||||||
bool m_sent73;
|
bool m_sent73;
|
||||||
bool m_runaway;
|
bool m_runaway;
|
||||||
|
bool m_tx2QSO;
|
||||||
|
|
||||||
char m_decoded[80];
|
char m_decoded[80];
|
||||||
|
|
||||||
@ -271,6 +273,8 @@ private:
|
|||||||
QTimer* ptt1Timer; //StartTx delay
|
QTimer* ptt1Timer; //StartTx delay
|
||||||
QTimer* ptt0Timer; //StopTx delay
|
QTimer* ptt0Timer; //StopTx delay
|
||||||
QTimer* logQSOTimer;
|
QTimer* logQSOTimer;
|
||||||
|
QTimer* killFileTimer;
|
||||||
|
|
||||||
|
|
||||||
QString m_path;
|
QString m_path;
|
||||||
QString m_pbdecoding_style1;
|
QString m_pbdecoding_style1;
|
||||||
@ -297,6 +301,7 @@ private:
|
|||||||
QString m_handshake;
|
QString m_handshake;
|
||||||
QString m_cmnd;
|
QString m_cmnd;
|
||||||
QString m_msgSent0;
|
QString m_msgSent0;
|
||||||
|
QString m_fileToSave;
|
||||||
|
|
||||||
QStringList m_macro;
|
QStringList m_macro;
|
||||||
QStringList m_dFreq;
|
QStringList m_dFreq;
|
||||||
@ -318,6 +323,7 @@ private:
|
|||||||
void statusChanged();
|
void statusChanged();
|
||||||
void dialFreqChanged2(double f);
|
void dialFreqChanged2(double f);
|
||||||
void freeText();
|
void freeText();
|
||||||
|
void displayTxMsg(QString t);
|
||||||
bool gridOK(QString g);
|
bool gridOK(QString g);
|
||||||
QString rig_command();
|
QString rig_command();
|
||||||
QString baseCall(QString t);
|
QString baseCall(QString t);
|
||||||
|
@ -1998,6 +1998,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<addaction name="actionColor_highlighting_in_left_window"/>
|
<addaction name="actionColor_highlighting_in_left_window"/>
|
||||||
<addaction name="action_73TxDisable"/>
|
<addaction name="action_73TxDisable"/>
|
||||||
<addaction name="actionRunaway_Tx_watchdog"/>
|
<addaction name="actionRunaway_Tx_watchdog"/>
|
||||||
|
<addaction name="actionTx2QSO"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuView">
|
<widget class="QMenu" name="menuView">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -2068,10 +2069,10 @@ p, li { white-space: pre-wrap; }
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionDeviceSetup">
|
<action name="actionDeviceSetup">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>false</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Options</string>
|
<string>Configuration</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string>F2</string>
|
<string>F2</string>
|
||||||
@ -2547,6 +2548,14 @@ p, li { white-space: pre-wrap; }
|
|||||||
<string>Runaway Tx watchdog</string>
|
<string>Runaway Tx watchdog</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionTx2QSO">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Tx messages echoed to QSO window</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
Loading…
Reference in New Issue
Block a user