mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-28 20:32:28 -04: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
12b2b2c163
commit
a893d42288
24
about.cpp
24
about.cpp
@ -1,26 +1,26 @@
|
|||||||
#include "about.h"
|
#include "about.h"
|
||||||
|
|
||||||
|
#include "svnversion.h"
|
||||||
|
|
||||||
#include "ui_about.h"
|
#include "ui_about.h"
|
||||||
|
|
||||||
#include "moc_about.cpp"
|
#include "moc_about.cpp"
|
||||||
|
|
||||||
CAboutDlg::CAboutDlg(QWidget *parent, QString Revision) :
|
CAboutDlg::CAboutDlg(QWidget *parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
m_Revision(Revision),
|
|
||||||
ui(new Ui::CAboutDlg)
|
ui(new Ui::CAboutDlg)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->labelTxt->clear();
|
|
||||||
m_Str = "<html><h2>" + m_Revision + "</h2>\n\n";
|
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"
|
||||||
m_Str += "WSJT-X implements digital modes JT9 and JT65 for <br>";
|
"WSJT-X implements digital modes JT9 and JT65 for <br>"
|
||||||
m_Str += "Amateur Radio communication. <br><br>";
|
"Amateur Radio communication. <br><br>"
|
||||||
m_Str += "Copyright 2001-2014 by Joe Taylor, K1JT, with grateful <br>";
|
"© 2001-2014 by Joe Taylor, K1JT, with grateful <br>"
|
||||||
m_Str += "acknowledgment for contributions from AC6SL, AE4JY, <br>";
|
"acknowledgment for contributions from AC6SL, AE4JY, <br>"
|
||||||
m_Str += "DJ0OT, G4KLA, G4WJS, K3WYC, KA6MAL, KA9Q, KB1ZMX, <br>";
|
"DJ0OT, G4KLA, G4WJS, K3WYC, KA6MAL, KA9Q, KB1ZMX, <br>"
|
||||||
m_Str += "KK1D, PY2SDR, VK3ACF, VK4BDJ, W4TI, and W4TV.<br>";
|
"KK1D, PY2SDR, VK3ACF, VK4BDJ, W4TI, and W4TV.<br>");
|
||||||
ui->labelTxt->setText(m_Str);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CAboutDlg::~CAboutDlg()
|
CAboutDlg::~CAboutDlg()
|
||||||
{
|
{
|
||||||
delete ui;
|
|
||||||
}
|
}
|
||||||
|
15
about.h
15
about.h
@ -2,23 +2,22 @@
|
|||||||
#define ABOUTDLG_H
|
#define ABOUTDLG_H
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
#include <QScopedPointer>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class CAboutDlg;
|
class CAboutDlg;
|
||||||
}
|
}
|
||||||
|
|
||||||
class CAboutDlg : public QDialog
|
class CAboutDlg : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CAboutDlg(QWidget *parent=0, QString Revision="");
|
explicit CAboutDlg(QWidget *parent = nullptr);
|
||||||
~CAboutDlg();
|
~CAboutDlg ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_Revision;
|
QScopedPointer<Ui::CAboutDlg> ui;
|
||||||
Ui::CAboutDlg *ui;
|
|
||||||
QString m_Str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ABOUTDLG_H
|
#endif // ABOUTDLG_H
|
||||||
|
2
about.ui
2
about.ui
@ -31,7 +31,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -12,14 +12,14 @@
|
|||||||
|
|
||||||
#include "moc_logqso.cpp"
|
#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),
|
QDialog(parent),
|
||||||
ui(new Ui::LogQSO),
|
ui(new Ui::LogQSO),
|
||||||
m_settings (settings),
|
m_settings (settings),
|
||||||
m_configuration (configuration)
|
m_configuration (configuration)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
setWindowTitle(programTitle + " Log QSO");
|
||||||
loadSettings ();
|
loadSettings ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
logqso.h
2
logqso.h
@ -21,7 +21,7 @@ class LogQSO : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit LogQSO(QSettings *, Configuration const *, QWidget *parent = 0);
|
explicit LogQSO(QString const& programTitle, QSettings *, Configuration const *, QWidget *parent = 0);
|
||||||
~LogQSO();
|
~LogQSO();
|
||||||
void initLogQSO(QString hisCall, QString hisGrid, QString mode,
|
void initLogQSO(QString hisCall, QString hisGrid, QString mode,
|
||||||
QString rptSent, QString rptRcvd, QDateTime dateTime,
|
QString rptSent, QString rptRcvd, QDateTime dateTime,
|
||||||
|
@ -16,9 +16,6 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Log QSO</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
3
main.cpp
3
main.cpp
@ -39,6 +39,9 @@ int main(int argc, char *argv[])
|
|||||||
// instantiating QApplication so
|
// instantiating QApplication so
|
||||||
// that GUI has correct l18n
|
// that GUI has correct l18n
|
||||||
|
|
||||||
|
// Override programs executable basename as application name.
|
||||||
|
a.setApplicationName ("WSJT-X");
|
||||||
|
|
||||||
bool multiple {false};
|
bool multiple {false};
|
||||||
|
|
||||||
#if WSJT_STANDARD_FILE_LOCATIONS
|
#if WSJT_STANDARD_FILE_LOCATIONS
|
||||||
|
@ -44,15 +44,6 @@ wchar_t buffer[256];
|
|||||||
QTextEdit* pShortcuts;
|
QTextEdit* pShortcuts;
|
||||||
QTextEdit* pPrefixes;
|
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
|
namespace
|
||||||
{
|
{
|
||||||
Radio::Frequency constexpr default_frequency {14076000};
|
Radio::Frequency constexpr default_frequency {14076000};
|
||||||
@ -87,9 +78,18 @@ MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdme
|
|||||||
m_multiple {multiple},
|
m_multiple {multiple},
|
||||||
m_settings (settings),
|
m_settings (settings),
|
||||||
ui(new Ui::MainWindow),
|
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_config (thekey, settings, this),
|
||||||
m_wideGraph (new WideGraph (settings)),
|
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_dialFreq {0},
|
||||||
m_detector (RX_SAMPLE_RATE, NTMAX / 2, 6912 / 2, downSampleFactor),
|
m_detector (RX_SAMPLE_RATE, NTMAX / 2, 6912 / 2, downSampleFactor),
|
||||||
m_modulator (TX_SAMPLE_RATE, NTMAX / 2),
|
m_modulator (TX_SAMPLE_RATE, NTMAX / 2),
|
||||||
@ -221,7 +221,7 @@ MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdme
|
|||||||
setDecodedTextFont (font);
|
setDecodedTextFont (font);
|
||||||
});
|
});
|
||||||
|
|
||||||
setWindowTitle(Program_Title_Version);
|
setWindowTitle(m_windowTitle);
|
||||||
createStatusBar();
|
createStatusBar();
|
||||||
|
|
||||||
connect(&proc_jt9, SIGNAL(readyReadStandardOutput()),
|
connect(&proc_jt9, SIGNAL(readyReadStandardOutput()),
|
||||||
@ -727,7 +727,7 @@ void MainWindow::monitor (bool state)
|
|||||||
|
|
||||||
void MainWindow::on_actionAbout_triggered() //Display "About"
|
void MainWindow::on_actionAbout_triggered() //Display "About"
|
||||||
{
|
{
|
||||||
CAboutDlg dlg(this,Program_Title_Version);
|
CAboutDlg dlg(this);
|
||||||
dlg.exec();
|
dlg.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2985,5 +2985,5 @@ void MainWindow::pskSetLocal ()
|
|||||||
psk_Reporter->setLocalStation(
|
psk_Reporter->setLocalStation(
|
||||||
m_config.my_callsign ()
|
m_config.my_callsign ()
|
||||||
, m_config.my_grid ()
|
, 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;
|
QScopedPointer<Ui::MainWindow> ui;
|
||||||
|
|
||||||
|
QString m_rev;
|
||||||
|
QString m_windowTitle;
|
||||||
|
|
||||||
// other windows
|
// other windows
|
||||||
Configuration m_config;
|
Configuration m_config;
|
||||||
QMessageBox m_rigErrorMessageBox;
|
QMessageBox m_rigErrorMessageBox;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user