From eecf7f65c7306193fe5f9090c64c8f5107844c5a Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Sat, 27 Oct 2018 15:19:49 -0400 Subject: [PATCH] Macro for CQ, Reply, QTH, QTC messages --- mainwindow.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index f85703b..f2802d4 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -6225,7 +6225,7 @@ void MainWindow::on_cqMacroButton_clicked(){ clearCallsignSelected(); - addMessageText(message); + addMessageText(replaceMacros(message, buildMacroValues(), true)); if(m_config.transmit_directed()) toggleTx(true); } @@ -6236,7 +6236,9 @@ void MainWindow::on_replyMacroButton_clicked(){ return; } - addMessageText(QString("%1 %2").arg(call).arg(m_config.reply_message())); + auto message = m_config.reply_message(); + message = replaceMacros(message, buildMacroValues(), true); + addMessageText(QString("%1 %2").arg(call).arg(message)); if(m_config.transmit_directed()) toggleTx(true); } @@ -6247,7 +6249,7 @@ void MainWindow::on_qthMacroButton_clicked(){ return; } - addMessageText(QString("QTH %1").arg(qth)); + addMessageText(QString("QTH %1").arg(replaceMacros(qth, buildMacroValues(), true))); if(m_config.transmit_directed()) toggleTx(true); } @@ -6258,7 +6260,7 @@ void MainWindow::on_qtcMacroButton_clicked(){ return; } - addMessageText(QString("QTC %1").arg(qtc)); + addMessageText(QString("QTC %1").arg(replaceMacros(qtc, buildMacroValues(), true))); if(m_config.transmit_directed()) toggleTx(true); } @@ -6386,7 +6388,9 @@ void MainWindow::buildQueryMenu(QMenu * menu, QString call){ return; } - addMessageText(QString("%1 %2").arg(selectedCall).arg(m_config.reply_message()), true); + auto message = m_config.reply_message(); + message = replaceMacros(message, buildMacroValues(), true); + addMessageText(QString("%1 %2").arg(selectedCall).arg(message), true); }); auto sendSNRAction = menu->addAction(QString("%1 SNR - Send a signal report to the selected callsign").arg(call).trimmed());