Commit graph

23 commits

Author SHA1 Message Date
Morph
30498f3ce8 applets: Append qt_ prefix to Qt frontend applets 2021-07-14 01:07:09 -04:00
Morph
ed52a83511 applets/swkbd: Make use of std::move where applicable
Avoids redundant string copies
2021-05-27 23:45:56 -04:00
Morph
54d9cd162d applets/swkbd: Make use of QueuedConnection in returnPressed signal
Some users have reported rare crashes when pressing the Enter key on the keyboard to confirm input in the normal software keyboard, particularly in Super Smash Bros. Ultimate while entering the name of a ruleset or controller layout.

It is suspected that the QLineEdit::returnPressed signal is causing a race condition as confirming input through other means does not produce the crash. Since Qt::QueuedConnection posts an event to the event queue of the callee's thread instead of executing it directly on the caller's thread, this eliminates any potential race conditions from occurring in this scenario.
2021-05-22 03:28:54 -04:00
Morph
798908da34 applets/swkbd: Send the correct text string on TextCheck::Confirm
Previously the text string for the inline software keyboard was being sent instead of the normal software keyboard, leading to empty text being sent all the time.
2021-05-19 00:26:32 -04:00
Its-Rei
6b2bdb75bd applets/swkbd: Fix software keyboard button hint scaling
Fixes the scaling of the button hints using background images. Now they scale like the rest of the elements.
2021-04-24 13:47:33 -04:00
Morph
d00a4873bf applets/swkbd: Implement the Qt Software Keyboard frontend
The Qt Software Keyboard frontend attempts to mimic the software keyboard rendered by the Nintendo Switch.
This frontend implements multiple keyboard types, such as the normal software keyboard, the numeric pad software keyboard and the inline software keyboard.
Keyboard and controller input is also supported in this frontend.
Keyboard input is handled as native keyboard input, and so the on-screen keyboard cannot be navigated with the keyboard arrow keys as the arrow keys are used to move the text cursor.
Controller input is translated into mouse hover movements on the onscreen keyboard or their respective button actions (B for backspace, A for entering the selected button, L/R for moving the text cursor, etc).
The text check dialogs can also be confirmed with controller input through the use of the OverlayDialog

Massive thanks to Rei for creating all the UI for the various keyboards and OverlayDialog. This would not have been possible without his excellent work.

Co-authored-by: Its-Rei <kupfel@gmail.com>
2021-04-15 01:53:17 -04:00
Morph
ac87713cb8 applets: Remove the previous software keyboard applet implementation 2021-04-15 01:53:16 -04:00
Morph
6efd390668 applets: Resolve variable shadowing 2020-12-05 08:37:13 -05:00
Lioncash
a4d4b67322 yuzu/software_keyboard: Remove unnecessary GetStatus() member function
Like with the profile selection dialog, we can just use the result of
QDialog's exec() function to determine whether or not a dialog was
accepted.
2019-05-29 00:56:45 -04:00
Lioncash
c991a5d2b0 yuzu/applets/software_keyboard: std::move argument in MainWindowFinishedText()
Given the std::optional can contain an object type that heap allocates,
we can use std::move to avoid an unnecessary copy/allocation from
occurring.
2019-05-24 21:27:12 -04:00
Lioncash
63eed87b61 yuzu/applets/software_keyboard: Resolve sign mismatch comparison
Qt uses a signed value to represent container sizes, so this was causing
a sign mismatch warning.
2019-05-24 21:27:12 -04:00
Lioncash
cd72443889 yuzu/applets/software_keyboard: Specify string conversions explicitly
Allows the software keyboard applet code to compile with implicit string
conversions disabled.
2019-05-24 21:27:12 -04:00
Lioncash
746e7ee4df yuzu/applets/software_keyboard: Use QDialogButtonBox standard buttons instead of custom buttons
Like the previous change, this allows Qt to handle proper translations
of the UI buttons, rather than us needing to handle it.
2019-04-03 11:17:10 -04:00
Lioncash
eb88e9d088 general: Use deducation guides for std::lock_guard and std::unique_lock
Since C++17, the introduction of deduction guides for locking facilities
means that we no longer need to hardcode the mutex type into the locks
themselves, making it easier to switch mutex types, should it ever be
necessary in the future.
2019-04-01 12:53:47 -04:00
Lioncash
22af607a8d yuzu/applets/software_keyboard: Override accept() and reject() instead of providing own differently named member functions
Uses Qt's built-in interface instead of rolling our own separate one on
top of it. This also fixes a bug in reject() where we were calling
accept() instead of reject().
2018-11-20 11:36:50 -05:00
Lioncash
870fa5e657 yuzu/applets/software_keyboard: std::move std::function instances where applicable
std::function instances can potentially allocate. std::moveing them
prevents an avoidable allocation in that case.
2018-11-20 11:34:19 -05:00
Zach Hilman
945fdd9361 software_keyboard: Add max and current length display to dialog 2018-11-18 10:53:47 -05:00
Zach Hilman
948e1b2f42 applet: Add operation completed callback 2018-11-18 10:53:47 -05:00
Zach Hilman
f0d2246b6a software_keyboard: Make GetText asynchronous
a
2018-11-18 10:53:47 -05:00
Zach Hilman
04bc2fafbc am: Allow applets to push multiple and different channels of data 2018-11-18 10:53:47 -05:00
Zach Hilman
efced53d38 am: Deglobalize software keyboard applet 2018-11-18 10:53:47 -05:00
Zach Hilman
b9c5a8bcf6 qt/main: Register Qt Software Keyboard frontend with AM
Allows using Qt provider over default.
2018-11-18 10:53:47 -05:00
Zach Hilman
56c85c996a qt/applets: Provide Qt frontend implementation of software keyboard
Implements all of the features of the keyboard, including length, default text, character validation, and UTF-16 character support.
2018-11-18 10:53:47 -05:00