mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-02-03 09:44:24 -05:00
Uniform appearance of window titles.
Svn revision number displayed in about window and sent PSKReporter only. About box text centred and uses Copyright symbol. Window title on "Log QSO" dialog includes rig-name where multi-instance support is enabled. This is necessary since the "Log QSO" dialog is not modal. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3960 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
e4b69c7370
commit
42844e3104
24
about.cpp
24
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 = "<html><h2>" + m_Revision + "</h2>\n\n";
|
||||
m_Str += "WSJT-X implements digital modes JT9 and JT65 for <br>";
|
||||
m_Str += "Amateur Radio communication. <br><br>";
|
||||
m_Str += "Copyright 2001-2014 by Joe Taylor, K1JT, with grateful <br>";
|
||||
m_Str += "acknowledgment for contributions from AC6SL, AE4JY, <br>";
|
||||
m_Str += "DJ0OT, G4KLA, G4WJS, K3WYC, KA6MAL, KA9Q, KB1ZMX, <br>";
|
||||
m_Str += "KK1D, PY2SDR, VK3ACF, VK4BDJ, W4TI, and W4TV.<br>";
|
||||
ui->labelTxt->setText(m_Str);
|
||||
|
||||
ui->labelTxt->setText ("<html><h2>WSJT-X v" WSJTX_STRINGIZE (WSJTX_VERSION_MAJOR) "." WSJTX_STRINGIZE (WSJTX_VERSION_MINOR) "." WSJTX_STRINGIZE (WSJTX_VERSION_PATCH) ", " WSJTX_STRINGIZE (SVNVERSION) "</h2>\n\n"
|
||||
"WSJT-X implements digital modes JT9 and JT65 for <br>"
|
||||
"Amateur Radio communication. <br><br>"
|
||||
"© 2001-2014 by Joe Taylor, K1JT, with grateful <br>"
|
||||
"acknowledgment for contributions from AC6SL, AE4JY, <br>"
|
||||
"DJ0OT, G4KLA, G4WJS, K3WYC, KA6MAL, KA9Q, KB1ZMX, <br>"
|
||||
"KK1D, PY2SDR, VK3ACF, VK4BDJ, W4TI, and W4TV.<br>");
|
||||
}
|
||||
|
||||
CAboutDlg::~CAboutDlg()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
15
about.h
15
about.h
@ -2,23 +2,22 @@
|
||||
#define ABOUTDLG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QScopedPointer>
|
||||
|
||||
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::CAboutDlg> ui;
|
||||
};
|
||||
|
||||
#endif // ABOUTDLG_H
|
||||
|
2
about.ui
2
about.ui
@ -31,7 +31,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -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 ();
|
||||
}
|
||||
|
||||
|
2
logqso.h
2
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,
|
||||
|
@ -16,9 +16,6 @@
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Log QSO</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
|
3
main.cpp
3
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
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -199,6 +199,9 @@ private:
|
||||
|
||||
QScopedPointer<Ui::MainWindow> ui;
|
||||
|
||||
QString m_rev;
|
||||
QString m_windowTitle;
|
||||
|
||||
// other windows
|
||||
Configuration m_config;
|
||||
QMessageBox m_rigErrorMessageBox;
|
||||
|
Loading…
Reference in New Issue
Block a user