cadMousePro-daemon/src/Daemon.h
branchv_0
changeset 29 361687fe303a
parent 26 fff8e9a86e85
child 31 3cbac1956f05
equal deleted inserted replaced
28:1423c29694f8 29:361687fe303a
    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()));