From 9bb1ae920b6aa3c1dccab9f441d7a075a0c617c9 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Wed, 23 Jan 2019 20:38:44 -0500 Subject: [PATCH] Added msg to to the menu --- mainwindow.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mainwindow.cpp b/mainwindow.cpp index c3f3d02..e6cc165 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -7390,6 +7390,18 @@ void MainWindow::buildQueryMenu(QMenu * menu, QString call){ addMessageText(QString("%1>[MESSAGE]").arg(selectedCall), true, true); }); + auto msgToAction = menu->addAction(QString("%1 MSG TO:[CALLSIGN] [MESSAGE] - Please store this message at your station for later retreival by [CALLSIGN]").arg(call).trimmed()); + msgToAction->setDisabled(isAllCall); + connect(msgToAction, &QAction::triggered, this, [this](){ + + QString selectedCall = callsignSelected(); + if(selectedCall.isEmpty()){ + return; + } + + addMessageText(QString("%1 MSG TO:[CALLSIGN] [MESSAGE]").arg(selectedCall), true, true); + }); + auto qsoQueryAction = menu->addAction(QString("%1 QUERY CALL [CALLSIGN]? - Please acknowledge you can communicate directly with [CALLSIGN]").arg(call).trimmed()); connect(qsoQueryAction, &QAction::triggered, this, [this](){