From a87c308823e97191e5b963e7e44eba1d74307dc3 Mon Sep 17 00:00:00 2001
From: Joe Taylor <joe@princeton.edu>
Date: Wed, 25 Jan 2023 09:07:56 -0500
Subject: [PATCH] Next stage of renaming q65w to qmap.

---
 q65w/CMakeLists.txt         | 20 ++++++++++----------
 q65w/about.cpp              |  4 ++--
 q65w/mainwindow.cpp         | 30 +++++++++++++++---------------
 q65w/mainwindow.ui          |  2 +-
 q65w/{q65w.pro => qmap.pro} |  2 +-
 q65w/{q65w.rc => qmap.rc}   |  0
 6 files changed, 29 insertions(+), 29 deletions(-)
 rename q65w/{q65w.pro => qmap.pro} (98%)
 rename q65w/{q65w.rc => qmap.rc} (100%)

diff --git a/q65w/CMakeLists.txt b/q65w/CMakeLists.txt
index b687bb64b..84bcfcc09 100644
--- a/q65w/CMakeLists.txt
+++ b/q65w/CMakeLists.txt
@@ -1,4 +1,4 @@
-set (q65w_CXXSRCS
+set (qmap_CXXSRCS
   about.cpp
   astro.cpp
   devsetup.cpp
@@ -14,10 +14,10 @@ set (q65w_CXXSRCS
   )
 
 if (WIN32)
-  set (q65w_CXXSRCS ${q65w_CXXSRCS})
+  set (qmap_CXXSRCS ${qmap_CXXSRCS})
 endif (WIN32)
 
-set (q65w_UISRCS
+set (qmap_UISRCS
   about.ui
   astro.ui
   devsetup.ui
@@ -25,20 +25,20 @@ set (q65w_UISRCS
   widegraph.ui
 )
 
-set (q65w_C_and_CXXSRCS
-  ${q65w_CSRCS}
-  ${q65w_CXXSRCS}
+set (qmap_C_and_CXXSRCS
+  ${qmap_CSRCS}
+  ${qmap_CXXSRCS}
   )
-set_property (SOURCE ${q65w_C_and_CXXSRCS} APPEND_STRING PROPERTY COMPILE_FLAGS " -include wsjtx_config.h")
-set_property (SOURCE ${q65w_C_and_CXXSRCS} APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/wsjtx_config.h)
+set_property (SOURCE ${qmap_C_and_CXXSRCS} APPEND_STRING PROPERTY COMPILE_FLAGS " -include wsjtx_config.h")
+set_property (SOURCE ${qmap_C_and_CXXSRCS} APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/wsjtx_config.h)
 
 # build the subdirectories
 add_subdirectory (libq65)
 
 # UI generation
-qt5_wrap_ui (q65w_GENUISRCS ${q65w_UISRCS})
+qt5_wrap_ui (qmap_GENUISRCS ${qmap_UISRCS})
 
-add_executable (qmap ${q65w_CXXSRCS} ${q65w_CSRCS} ${q65w_GENUISRCS} q65w.rc)
+add_executable (qmap ${qmap_CXXSRCS} ${qmap_CSRCS} ${qmap_GENUISRCS} qmap.rc)
 target_include_directories (qmap PRIVATE ${CMAKE_SOURCE_DIR} ${FFTW3_INCLUDE_DIRS})
 target_link_libraries (qmap wsjt_qt m65impl ${FFTW3_LIBRARIES} Qt5::Widgets Qt5::Network Usb::Usb)
 
diff --git a/q65w/about.cpp b/q65w/about.cpp
index 5ac318129..6c20e36b9 100644
--- a/q65w/about.cpp
+++ b/q65w/about.cpp
@@ -7,10 +7,10 @@ CAboutDlg::CAboutDlg(QWidget *parent) :
   ui(new Ui::CAboutDlg)
 {
   ui->setupUi(this);
-  ui->labelTxt->setText("<html><h2>" + QString {"Q65W v"
+  ui->labelTxt->setText("<html><h2>" + QString {"QMAP v"
                 + QCoreApplication::applicationVersion ()
                 + " " + revision ()}.simplified () + "</h2><br />"
-    "Q65W is a wideband receiver for the Q65 protocol, <br />"
+    "QMAP is a wideband receiver for the Q65 protocol, <br />"
     "intended primarily for amateur radio EME communication. <br /><br />"
     "Copyright 2001-2023 by Joe Taylor, K1JT.   Additional <br />"
     "acknowledgments are contained in the source code.");
diff --git a/q65w/mainwindow.cpp b/q65w/mainwindow.cpp
index 6e320ad50..53f2f12b6 100644
--- a/q65w/mainwindow.cpp
+++ b/q65w/mainwindow.cpp
@@ -21,7 +21,7 @@
 
 qint16 id[2*60*96000];
 
-QSharedMemory mem_q65w("mem_q65w");            //Memory segment to be shared (optionally) with WSJT-X
+QSharedMemory mem_qmap("mem_qmap");            //Memory segment to be shared (optionally) with WSJT-X
 int* ipc_wsjtx;
 
 extern const int RxDataFrequency = 96000;
@@ -31,7 +31,7 @@ MainWindow::MainWindow(QWidget *parent) :
   QMainWindow(parent),
   ui(new Ui::MainWindow),
   m_appDir {QApplication::applicationDirPath ()},
-  m_settings_filename {m_appDir + "/q65w.ini"},
+  m_settings_filename {m_appDir + "/qmap.ini"},
   m_astro_window {new Astro {m_settings_filename}},
   m_wide_graph_window {new WideGraph {m_settings_filename}},
   m_gui_timer {new QTimer {this}}
@@ -100,17 +100,17 @@ MainWindow::MainWindow(QWidget *parent) :
 
 //Attach or create a memory segment to be shared with WSJT-X.
   int memSize=4096;
-  if(!mem_q65w.attach()) {
-    if(!mem_q65w.create(memSize)) {
-      msgBox("Unable to create shared memory segment mem_q65w.");
+  if(!mem_qmap.attach()) {
+    if(!mem_qmap.create(memSize)) {
+      msgBox("Unable to create shared memory segment mem_qmap.");
     }
   }
-  ipc_wsjtx = (int*)mem_q65w.data();
-  mem_q65w.lock();
+  ipc_wsjtx = (int*)mem_qmap.data();
+  mem_qmap.lock();
   memset(ipc_wsjtx,0,memSize);         //Zero all of shared memory
-  mem_q65w.unlock();
+  mem_qmap.unlock();
 
-  fftwf_import_wisdom_from_filename (QDir {m_appDir}.absoluteFilePath ("q65w_wisdom.dat").toLocal8Bit ());
+  fftwf_import_wisdom_from_filename (QDir {m_appDir}.absoluteFilePath ("qmap_wisdom.dat").toLocal8Bit ());
 
   readSettings();		             //Restore user's setup params
 
@@ -201,7 +201,7 @@ MainWindow::~MainWindow()
     soundInThread.quit();
     soundInThread.wait(3000);
   }
-  fftwf_export_wisdom_to_filename (QDir {m_appDir}.absoluteFilePath ("q65w_wisdom.dat").toLocal8Bit ());
+  fftwf_export_wisdom_to_filename (QDir {m_appDir}.absoluteFilePath ("qmap_wisdom.dat").toLocal8Bit ());
   delete ui;
 }
 
@@ -646,7 +646,7 @@ void MainWindow::on_actionOpen_triggered()                     //Open File
   soundInThread.setMonitoring(m_monitoring);
   QString fname;
   fname=QFileDialog::getOpenFileName(this, "Open File", m_path,
-                                     "MAP65/Q65W Files (*.iq)");
+                                     "MAP65/QMAP Files (*.iq)");
   if(fname != "") {
     m_path=fname;
     int i;
@@ -726,9 +726,9 @@ void MainWindow::decoderFinished()                      //diskWriteFinished
   decodeBusy(false);
   decodes_.nQDecoderDone=1;
   if(m_diskData) decodes_.nQDecoderDone=2;
-  mem_q65w.lock();
+  mem_qmap.lock();
   memcpy((char*)ipc_wsjtx, &decodes_, sizeof(decodes_));
-  mem_q65w.unlock();
+  mem_qmap.unlock();
   QString t1;
 //  t1=t1.asprintf(" %3d/%d  ",decodes_.ndecodes,decodes_.ncand);
   t1=t1.asprintf(" %d ",decodes_.ndecodes);
@@ -953,9 +953,9 @@ void MainWindow::guiUpdate()
     static int n60z=99;
     int n60=nsec%60;
     int itest[5];
-    mem_q65w.lock();
+    mem_qmap.lock();
     memcpy(&itest, (char*)ipc_wsjtx, 20);
-    mem_q65w.unlock();
+    mem_qmap.unlock();
     if(itest[4]==1) m_nTransmitted++;
 //    qDebug() << "AAA" << n60 << itest[0] << itest[1] << itest[2] << itest[3] << itest[4]
 //             << m_nTransmitted;
diff --git a/q65w/mainwindow.ui b/q65w/mainwindow.ui
index a28dd1045..0e06e4b22 100644
--- a/q65w/mainwindow.ui
+++ b/q65w/mainwindow.ui
@@ -458,7 +458,7 @@ p, li { white-space: pre-wrap; }
   </action>
   <action name="actionAbout">
    <property name="text">
-    <string> About Q65W</string>
+    <string> About QMAP</string>
    </property>
    <property name="shortcut">
     <string>Ctrl+F1</string>
diff --git a/q65w/q65w.pro b/q65w/qmap.pro
similarity index 98%
rename from q65w/q65w.pro
rename to q65w/qmap.pro
index 4dbd96ab6..3bc2b6812 100644
--- a/q65w/q65w.pro
+++ b/q65w/qmap.pro
@@ -9,7 +9,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
 CONFIG   += thread
 #CONFIG   += console
 
-TARGET = q65w
+TARGET = qmap
 VERSION = 0.1
 TEMPLATE = app
 DEFINES = QT5
diff --git a/q65w/q65w.rc b/q65w/qmap.rc
similarity index 100%
rename from q65w/q65w.rc
rename to q65w/qmap.rc