diff --git a/about.cpp b/about.cpp
index 734503ecc..17fa0f276 100644
--- a/about.cpp
+++ b/about.cpp
@@ -1,26 +1,26 @@
#include "about.h"
+
+#include "svnversion.h"
+
#include "ui_about.h"
#include "moc_about.cpp"
-CAboutDlg::CAboutDlg(QWidget *parent, QString Revision) :
+CAboutDlg::CAboutDlg(QWidget *parent) :
QDialog(parent),
- m_Revision(Revision),
ui(new Ui::CAboutDlg)
{
ui->setupUi(this);
- ui->labelTxt->clear();
- m_Str = "
" + m_Revision + "
\n\n";
- m_Str += "WSJT-X implements digital modes JT9 and JT65 for
";
- m_Str += "Amateur Radio communication.
";
- m_Str += "Copyright 2001-2014 by Joe Taylor, K1JT, with grateful
";
- m_Str += "acknowledgment for contributions from AC6SL, AE4JY,
";
- m_Str += "DJ0OT, G4KLA, G4WJS, K3WYC, KA6MAL, KA9Q, KB1ZMX,
";
- m_Str += "KK1D, PY2SDR, VK3ACF, VK4BDJ, W4TI, and W4TV.
";
- ui->labelTxt->setText(m_Str);
+
+ ui->labelTxt->setText ("WSJT-X v" WSJTX_STRINGIZE (WSJTX_VERSION_MAJOR) "." WSJTX_STRINGIZE (WSJTX_VERSION_MINOR) "." WSJTX_STRINGIZE (WSJTX_VERSION_PATCH) ", " WSJTX_STRINGIZE (SVNVERSION) "
\n\n"
+ "WSJT-X implements digital modes JT9 and JT65 for
"
+ "Amateur Radio communication.
"
+ "© 2001-2014 by Joe Taylor, K1JT, with grateful
"
+ "acknowledgment for contributions from AC6SL, AE4JY,
"
+ "DJ0OT, G4KLA, G4WJS, K3WYC, KA6MAL, KA9Q, KB1ZMX,
"
+ "KK1D, PY2SDR, VK3ACF, VK4BDJ, W4TI, and W4TV.
");
}
CAboutDlg::~CAboutDlg()
{
- delete ui;
}
diff --git a/about.h b/about.h
index ca45d1996..02e9239e4 100644
--- a/about.h
+++ b/about.h
@@ -2,23 +2,22 @@
#define ABOUTDLG_H
#include
+#include
namespace Ui {
- class CAboutDlg;
+ class CAboutDlg;
}
class CAboutDlg : public QDialog
{
- Q_OBJECT
+ Q_OBJECT;
public:
- explicit CAboutDlg(QWidget *parent=0, QString Revision="");
- ~CAboutDlg();
-
+ explicit CAboutDlg(QWidget *parent = nullptr);
+ ~CAboutDlg ();
+
private:
- QString m_Revision;
- Ui::CAboutDlg *ui;
- QString m_Str;
+ QScopedPointer ui;
};
#endif // ABOUTDLG_H
diff --git a/about.ui b/about.ui
index 23d3eff21..8e8b92688 100644
--- a/about.ui
+++ b/about.ui
@@ -31,7 +31,7 @@
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+ Qt::AlignCenter
diff --git a/logqso.cpp b/logqso.cpp
index a675230a8..e5aa531ac 100644
--- a/logqso.cpp
+++ b/logqso.cpp
@@ -12,14 +12,14 @@
#include "moc_logqso.cpp"
-LogQSO::LogQSO(QSettings * settings, Configuration const * configuration, QWidget *parent) :
+LogQSO::LogQSO(QString const& programTitle, QSettings * settings, Configuration const * configuration, QWidget *parent) :
QDialog(parent),
ui(new Ui::LogQSO),
m_settings (settings),
m_configuration (configuration)
{
ui->setupUi(this);
-
+ setWindowTitle(programTitle + " Log QSO");
loadSettings ();
}
diff --git a/logqso.h b/logqso.h
index 98816a68f..72121e76e 100644
--- a/logqso.h
+++ b/logqso.h
@@ -21,7 +21,7 @@ class LogQSO : public QDialog
Q_OBJECT
public:
- explicit LogQSO(QSettings *, Configuration const *, QWidget *parent = 0);
+ explicit LogQSO(QString const& programTitle, QSettings *, Configuration const *, QWidget *parent = 0);
~LogQSO();
void initLogQSO(QString hisCall, QString hisGrid, QString mode,
QString rptSent, QString rptRcvd, QDateTime dateTime,
diff --git a/logqso.ui b/logqso.ui
index a9c6fe902..36cb10066 100644
--- a/logqso.ui
+++ b/logqso.ui
@@ -16,9 +16,6 @@
16777215
-
- Log QSO
-
-
diff --git a/main.cpp b/main.cpp
index 5eaa1f5bd..4f5857e39 100644
--- a/main.cpp
+++ b/main.cpp
@@ -39,6 +39,9 @@ int main(int argc, char *argv[])
// instantiating QApplication so
// that GUI has correct l18n
+ // Override programs executable basename as application name.
+ a.setApplicationName ("WSJT-X");
+
bool multiple {false};
#if WSJT_STANDARD_FILE_LOCATIONS
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 630e77472..5b7ce0c84 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -44,15 +44,6 @@ wchar_t buffer[256];
QTextEdit* pShortcuts;
QTextEdit* pPrefixes;
-#if defined (CMAKE_BUILD)
-QString rev (" " WSJTX_STRINGIZE (SVNVERSION));
-QString Program_Title_Version ("WSJT-X v" WSJTX_STRINGIZE (WSJTX_VERSION_MAJOR) "." WSJTX_STRINGIZE (WSJTX_VERSION_MINOR) "." WSJTX_STRINGIZE (WSJTX_VERSION_PATCH) ", " WSJTX_STRINGIZE (SVNVERSION) " by K1JT");
-#else
-QString rev="$Rev$";
-QString Program_Title_Version=" WSJT-X v1.4, r" + rev.mid(6,4) +
- " by K1JT";
-#endif
-
namespace
{
Radio::Frequency constexpr default_frequency {14076000};
@@ -87,9 +78,18 @@ MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdme
m_multiple {multiple},
m_settings (settings),
ui(new Ui::MainWindow),
+
+#if defined (CMAKE_BUILD)
+ m_rev {" " WSJTX_STRINGIZE (SVNVERSION)},
+ m_windowTitle {QApplication::applicationName () + " v" WSJTX_STRINGIZE (WSJTX_VERSION_MAJOR) "." WSJTX_STRINGIZE (WSJTX_VERSION_MINOR) "." WSJTX_STRINGIZE (WSJTX_VERSION_PATCH) " by K1JT"},
+#else
+ m_rev {"$Rev$"},
+ m_windowTitle {"WSJT-X v1.4, r" + m_rev.mid(6,4) + " by K1JT"},
+#endif
+
m_config (thekey, settings, this),
m_wideGraph (new WideGraph (settings)),
- m_logDlg (new LogQSO (settings, &m_config, this)),
+ m_logDlg (new LogQSO (m_windowTitle, settings, &m_config, this)),
m_dialFreq {0},
m_detector (RX_SAMPLE_RATE, NTMAX / 2, 6912 / 2, downSampleFactor),
m_modulator (TX_SAMPLE_RATE, NTMAX / 2),
@@ -221,7 +221,7 @@ MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdme
setDecodedTextFont (font);
});
- setWindowTitle(Program_Title_Version);
+ setWindowTitle(m_windowTitle);
createStatusBar();
connect(&proc_jt9, SIGNAL(readyReadStandardOutput()),
@@ -727,7 +727,7 @@ void MainWindow::monitor (bool state)
void MainWindow::on_actionAbout_triggered() //Display "About"
{
- CAboutDlg dlg(this,Program_Title_Version);
+ CAboutDlg dlg(this);
dlg.exec();
}
@@ -2985,5 +2985,5 @@ void MainWindow::pskSetLocal ()
psk_Reporter->setLocalStation(
m_config.my_callsign ()
, m_config.my_grid ()
- , antenna_description, "WSJT-X r" + rev.mid(6,4));
+ , antenna_description, "WSJT-X r" + m_rev.mid(6,4));
}
diff --git a/mainwindow.h b/mainwindow.h
index e9d1801ca..1397f7317 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -199,6 +199,9 @@ private:
QScopedPointer ui;
+ QString m_rev;
+ QString m_windowTitle;
+
// other windows
Configuration m_config;
QMessageBox m_rigErrorMessageBox;