equal
deleted
inserted
replaced
66 logException(e); |
66 logException(e); |
67 return QString(); |
67 return QString(); |
68 } |
68 } |
69 } |
69 } |
70 |
70 |
71 void configure(bool liftOffDetection, bool smartScrolling, int frequency) { |
71 void configure(bool liftOffDetection, bool smartScrolling, bool remapWheelPress, bool remapGestureButton, int frequency) { |
72 std::wcout << L"configuring mouse" << std::endl; |
72 std::wcout << L"configuring mouse" << std::endl; |
73 try { |
73 try { |
74 CadMouseConfig config; |
74 CadMouseConfig config; |
75 config.setLiftOffDetection(liftOffDetection); |
75 config.setLiftOffDetection(liftOffDetection); |
76 config.setSmartScrolling(smartScrolling); |
76 config.setSmartScrolling(smartScrolling); |
|
77 config.setWheelPressRemapped(remapWheelPress); |
|
78 config.setRemapGestureButton(remapGestureButton); |
77 config.setFrequency(Common::parseFrequency(std::to_wstring(frequency))); |
79 config.setFrequency(Common::parseFrequency(std::to_wstring(frequency))); |
78 getMouse().sendFeatureReport(config.serialize()); |
80 getMouse().sendFeatureReport(config.serialize()); |
79 } catch (HIDException& e) { |
81 } catch (HIDException& e) { |
80 logException(e); |
82 logException(e); |
81 sendErrorReply(QDBusError::ErrorType::Failed, QString::fromStdWString(e.getMessage())); |
83 sendErrorReply(QDBusError::ErrorType::Failed, QString::fromStdWString(e.getMessage())); |