diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-12-07 08:43:03 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-12-08 21:30:48 +0100 |
commit | 709fe557a3a5c2dc8675472dac9325f8efdff004 (patch) | |
tree | fa257eae76fc50d3cbe7b69b5c423108c170af90 /proto-mouse | |
parent | 788cfe69a1668dfd7e6bca16907de696e6063fbe (diff) |
clean up a bit
Diffstat (limited to 'proto-mouse')
-rw-r--r-- | proto-mouse/ftnoir_protocol_mouse.h | 29 | ||||
-rw-r--r-- | proto-mouse/mouse-settings.hpp | 2 |
2 files changed, 16 insertions, 15 deletions
diff --git a/proto-mouse/ftnoir_protocol_mouse.h b/proto-mouse/ftnoir_protocol_mouse.h index 2b88ae1d..c8709604 100644 --- a/proto-mouse/ftnoir_protocol_mouse.h +++ b/proto-mouse/ftnoir_protocol_mouse.h @@ -20,39 +20,40 @@ class mouse : public TR, public IProtocol { Q_OBJECT + static int get_delta(int val, int prev); + static int get_value(double val, double sensitivity, bool is_rotation); + + int last_x = 0, last_y = 0; + mouse_settings s; + public: mouse() = default; module_status initialize() override { return status_ok(); } void pose(const double* headpose) override; QString game_name() override; - - int last_x = 0, last_y = 0; -private: - static int get_delta(int val, int prev); - static int get_value(double val, double sensitivity, bool is_rotation); - - struct mouse_settings s; }; class MOUSEControls: public IProtocolDialog { Q_OBJECT -public: - MOUSEControls(); - void register_protocol(IProtocol *) {} - void unregister_protocol() {} -private: + Ui::UICMOUSEControls ui; mouse_settings s; + private slots: void doOK(); void doCancel(); + +public: + MOUSEControls(); + void register_protocol(IProtocol *) override {} + void unregister_protocol() override {} }; class mouseDll : public Metadata { Q_OBJECT - QString name() { return tr("mouse emulation"); } - QIcon icon() { return QIcon(":/images/mouse.png"); } + QString name() override { return tr("mouse emulation"); } + QIcon icon() override { return QIcon(":/images/mouse.png"); } }; diff --git a/proto-mouse/mouse-settings.hpp b/proto-mouse/mouse-settings.hpp index 71726588..c485e534 100644 --- a/proto-mouse/mouse-settings.hpp +++ b/proto-mouse/mouse-settings.hpp @@ -20,4 +20,4 @@ struct mouse_settings : opts { } // ns mouse_impl -using mouse_impl::mouse_settings; +using mouse_settings = mouse_impl::mouse_settings; |