summaryrefslogtreecommitdiff
path: root/widgets/SplashScreen.cpp
diff options
context:
space:
mode:
authorhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
committerhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
commitc25cbdf6fb6d946175f4335fab77bfea601b56db (patch)
tree6f7a94b7b81f999e434f61b73d47e337dfd26bf2 /widgets/SplashScreen.cpp
parent71f5689252c9f13e70e1c24856904475b2307809 (diff)
parent0685fcada9f95fe90f70b387cd7d757da8209624 (diff)
Merge tag 'debian/3.2.0_rc1+dfsg-2' into debian/trixie-backportsdebian/trixie-backports
tagging wsjtx 3.2.0~rc1+dfsg-2
Diffstat (limited to 'widgets/SplashScreen.cpp')
-rw-r--r--widgets/SplashScreen.cpp32
1 files changed, 31 insertions, 1 deletions
diff --git a/widgets/SplashScreen.cpp b/widgets/SplashScreen.cpp
index 827153dc..365fbafa 100644
--- a/widgets/SplashScreen.cpp
+++ b/widgets/SplashScreen.cpp
@@ -4,6 +4,8 @@
#include <QVBoxLayout>
#include <QCheckBox>
#include <QCoreApplication>
+#include <QEvent>
+#include <QKeyEvent>
#include "revision_utils.hpp"
#include "pimpl_impl.hpp"
@@ -28,7 +30,24 @@ SplashScreen::SplashScreen ()
: QSplashScreen {QPixmap {":/splash.png"}, Qt::WindowStaysOnTopHint}
{
setLayout (&m_->main_layout_);
- showMessage ("<h2>" + QString {"WSJT-X v" +
+
+ setObjectName ("SplashScreen");
+ setWindowTitle (QCoreApplication::translate ("SplashScreen", "WSJT-X™ — Welcome"));
+ setAccessibleName (windowTitle ());
+ setAccessibleDescription (
+ QCoreApplication::translate ("SplashScreen",
+ "WSJT-X startup information. Press Escape to close."));
+ m_->checkbox_.setObjectName ("doNotShowSplashAgain");
+ m_->checkbox_.setAccessibleName (m_->checkbox_.text ());
+
+ // A QSplashScreen is a non-activating window and never becomes the key
+ // window, so a key press event override would never fire. Filter the
+ // application instead so Escape dismisses the splash regardless of which
+ // window holds focus, giving keyboard and assistive-tech users a dismiss
+ // path that the mouse-only click-to-dismiss does not.
+ QCoreApplication::instance ()->installEventFilter (this);
+
+ showMessage ("<h2>" + QString {"WSJT-X™ v" +
QCoreApplication::applicationVersion() + " " +
revision ()}.simplified () + "</h2>"
"Send issue reports to https://wsjtx.groups.io, and be sure to save .wav<br />"
@@ -44,3 +63,14 @@ SplashScreen::SplashScreen ()
SplashScreen::~SplashScreen ()
{
}
+
+bool SplashScreen::eventFilter (QObject * object, QEvent * event)
+{
+ if (isVisible () && QEvent::KeyPress == event->type ()
+ && Qt::Key_Escape == static_cast<QKeyEvent *> (event)->key ())
+ {
+ close ();
+ return true;
+ }
+ return QSplashScreen::eventFilter (object, event);
+}