From 4c3bf372949ff000a73f0082064b79f491bb6237 Mon Sep 17 00:00:00 2001 From: Joe Taylor <joe@princeton.edu> Date: Mon, 6 Mar 2023 08:31:42 -0500 Subject: [PATCH] Add "Erase list of Q65 callers" to the File menu. --- widgets/mainwindow.cpp | 11 +++++++++++ widgets/mainwindow.h | 1 + widgets/mainwindow.ui | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 0cb86ae22..b5626c935 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -7666,6 +7666,17 @@ void MainWindow::on_actionErase_ALL_TXT_triggered() //Erase ALL.TXT } } +void MainWindow::on_actionErase_list_of_Q65_callers_triggered() +{ + int ret = MessageBox::query_message (this, tr ("Confirm Erase"), + tr ("Are you sure you want to erase the list of Q65 callers?")); + if(ret==MessageBox::Yes) { + QFile f {m_config.writeable_data_dir ().absoluteFilePath ("tsil.3q")}; + f.remove(); + } +} + + void MainWindow::on_reset_cabrillo_log_action_triggered () { if (MessageBox::Yes == MessageBox::query_message (this, tr ("Confirm Reset"), diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 4f33167e9..f38b41b5d 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -236,6 +236,7 @@ private slots: void on_reset_cabrillo_log_action_triggered (); void on_actionErase_wsjtx_log_adi_triggered(); void on_actionErase_WSPR_hashtable_triggered(); + void on_actionErase_list_of_Q65_callers_triggered(); void on_actionExport_Cabrillo_log_triggered(); void startTx2(); void startP1(); diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index 9fc96e45c..3039c3c64 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -3168,6 +3168,7 @@ QPushButton[state="ok"] { <addaction name="actionErase_ALL_TXT"/> <addaction name="actionErase_wsjtx_log_adi"/> <addaction name="actionErase_WSPR_hashtable"/> + <addaction name="actionErase_list_of_Q65_callers"/> <addaction name="reset_cabrillo_log_action"/> <addaction name="actionExport_Cabrillo_log"/> <addaction name="actionOpen_log_directory"/> @@ -3813,6 +3814,11 @@ QPushButton[state="ok"] { <string>Quick-Start Guide to WSJT-X 2.7 and QMAP</string> </property> </action> + <action name="actionErase_list_of_Q65_callers"> + <property name="text"> + <string>Erase list of Q65 callers</string> + </property> + </action> </widget> <layoutdefault spacing="6" margin="11"/> <customwidgets>