summaryrefslogtreecommitdiffhomepage
path: root/proto-mouse/ftnoir_protocol_mouse_dialog.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-01-16 06:21:48 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-01-16 07:49:13 +0100
commitbdbab6bbfef596011302b595cab9b09aec147c55 (patch)
tree05696f23bad81498bf131f9fe5a93d0ef6bc5809 /proto-mouse/ftnoir_protocol_mouse_dialog.cpp
parentb8ea949f768e47624d938d73a5de58b230d59f71 (diff)
proto/mouse: add legacy input method
Diffstat (limited to 'proto-mouse/ftnoir_protocol_mouse_dialog.cpp')
-rw-r--r--proto-mouse/ftnoir_protocol_mouse_dialog.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/proto-mouse/ftnoir_protocol_mouse_dialog.cpp b/proto-mouse/ftnoir_protocol_mouse_dialog.cpp
index 77b1ff2e..5646718c 100644
--- a/proto-mouse/ftnoir_protocol_mouse_dialog.cpp
+++ b/proto-mouse/ftnoir_protocol_mouse_dialog.cpp
@@ -3,19 +3,25 @@
MOUSEControls::MOUSEControls()
{
- ui.setupUi( this );
+ ui.setupUi(this);
- connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
- connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
+ connect(ui.buttonBox, &QDialogButtonBox::accepted, this, &MOUSEControls::doOK);
+ connect(ui.buttonBox, &QDialogButtonBox::rejected, this, &MOUSEControls::doCancel);
- tie_setting(s.Mouse_X, ui.cbxSelectMouse_X);
- tie_setting(s.Mouse_Y, ui.cbxSelectMouse_Y);
+ tie_setting(s.mouse_x, ui.axis_x);
+ tie_setting(s.mouse_y, ui.axis_y);
tie_setting(s.sensitivity_x, ui.sensitivity_x);
tie_setting(s.sensitivity_y, ui.sensitivity_y);
+
+ const int data[] = { input_direct, input_legacy };
+ for (unsigned k = 0; k < std::size(data); k++)
+ ui.input_method->setItemData(k, data[k]);
+ tie_setting(s.input_method, ui.input_method);
}
-void MOUSEControls::doOK() {
+void MOUSEControls::doOK()
+{
s.b->save();
close();
}
@@ -24,4 +30,3 @@ void MOUSEControls::doCancel()
{
close();
}
-