summaryrefslogtreecommitdiff
path: root/src/yuzu/applets/software_keyboard.h
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-11-11 16:39:25 -0500
committerZach Hilman <zachhilman@gmail.com>2018-11-18 10:53:47 -0500
commite696ed1f4d20f28f8b26c637498962938df7d96f (patch)
tree79222d795725ba7b19f0aa9326041e236f9a22d8 /src/yuzu/applets/software_keyboard.h
parenta81645400f9ba40b272163ef6f751ba3428b85a1 (diff)
am: Deglobalize software keyboard applet
Diffstat (limited to 'src/yuzu/applets/software_keyboard.h')
-rw-r--r--src/yuzu/applets/software_keyboard.h33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/yuzu/applets/software_keyboard.h b/src/yuzu/applets/software_keyboard.h
index 2a18419db4..1069c10ec8 100644
--- a/src/yuzu/applets/software_keyboard.h
+++ b/src/yuzu/applets/software_keyboard.h
@@ -3,11 +3,13 @@
// Refer to the license.txt file included.
#pragma once
+
#include <QDialog>
#include <QValidator>
#include "common/assert.h"
#include "core/frontend/applets/software_keyboard.h"
+class GMainWindow;
class QDialogButtonBox;
class QLabel;
class QLineEdit;
@@ -16,11 +18,11 @@ class QtSoftwareKeyboard;
class QtSoftwareKeyboardValidator final : public QValidator {
public:
- explicit QtSoftwareKeyboardValidator(Frontend::SoftwareKeyboardApplet::Parameters parameters);
- State validate(QString&, int&) const override;
+ explicit QtSoftwareKeyboardValidator(Core::Frontend::SoftwareKeyboardParameters parameters);
+ State validate(QString& input, int& pos) const override;
private:
- Frontend::SoftwareKeyboardApplet::Parameters parameters;
+ Core::Frontend::SoftwareKeyboardParameters parameters;
};
class QtSoftwareKeyboardDialog final : public QDialog {
@@ -28,10 +30,15 @@ class QtSoftwareKeyboardDialog final : public QDialog {
public:
QtSoftwareKeyboardDialog(QWidget* parent,
- Frontend::SoftwareKeyboardApplet::Parameters parameters);
+ Core::Frontend::SoftwareKeyboardParameters parameters);
+ ~QtSoftwareKeyboardDialog() override;
+
void Submit();
void Reject();
+ std::u16string GetText();
+ bool GetStatus();
+
private:
bool ok = false;
std::u16string text;
@@ -43,20 +50,18 @@ private:
QLineEdit* line_edit;
QVBoxLayout* layout;
- Frontend::SoftwareKeyboardApplet::Parameters parameters;
-
- friend class QtSoftwareKeyboard;
+ Core::Frontend::SoftwareKeyboardParameters parameters;
};
-class QtSoftwareKeyboard final : public QObject, public Frontend::SoftwareKeyboardApplet {
+class QtSoftwareKeyboard final : public QObject, public Core::Frontend::SoftwareKeyboardApplet {
public:
- explicit QtSoftwareKeyboard(QWidget& parent);
- bool GetText(Parameters parameters, std::u16string& text) override;
+ explicit QtSoftwareKeyboard(GMainWindow& parent);
+ ~QtSoftwareKeyboard() override;
- ~QtSoftwareKeyboard() {
- UNREACHABLE();
- }
+ bool GetText(Core::Frontend::SoftwareKeyboardParameters parameters,
+ std::u16string& text) const override;
+ void SendTextCheckDialog(std::u16string error_message) const override;
private:
- QWidget& parent;
+ GMainWindow& main_window;
};