Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double click functionality needed #116

Open
dmurashko-ms opened this issue May 20, 2024 · 4 comments
Open

Double click functionality needed #116

dmurashko-ms opened this issue May 20, 2024 · 4 comments

Comments

@dmurashko-ms
Copy link

It would be great to have a possibility to send DoubleClick event.
Is there any work around for that?

@ctmbl
Copy link
Contributor

ctmbl commented May 28, 2024

Hi @dmurashko-ms
I think you could do that from the client with a double call to mouseClick.

From what I could see on the repo faaxm is trying to keep Spix as minimal as possible so I don't think this is the kind of request thta will be accepted, but for sure I don't want to speak for the maintainer himself!

@auxxos
Copy link

auxxos commented Jun 3, 2024

Just sending two mouseClick events is not working and is not the same as a double click.

But usually, you are not checking if a double click is working, but if the triggered functionality is doing the expected work. So instead of simulating a double click extract the work into a function and test this function.

@faaxm
Copy link
Owner

faaxm commented Jul 7, 2024

Hi @dmurashko-ms

If there is a use case where a dedicated double-click event should be sent, I wouldn't mind having it added to spix.
Keep in mind that you only need that when directly sending QtEvents. If you use a python script to create system events externally, no changes in Spix would be required. See lib/src/TestServer.cpp

In case you want to take on that task, the place where that event would be sent would be here:
lib/src/Scene/Qt/QtEvents.cpp

Its parent class and the mock code would also have to be updated:
lib/src/Scene/Events.h
lib/src/Scene/Mock/MockEvents.h

Then you would need to add a new command class that will call the new method in Events. You can use this command as an example:
lib/src/Commands/ClickOnItem.cpp

When this is done, update the test servers so that they allow the user to trigger the new command:
lib/src/AnyRpcServer.cpp
lib/src/TestServer.cpp

@dmurashko-ms
Copy link
Author

If there is a use case where a dedicated double-click event should be sent, I wouldn't mind having it added to spix. Keep in mind that you only need that when directly sending QtEvents. If you use a python script to create system events externally, no changes in Spix would be required. See lib/src/TestServer.cpp

Thanks for the answer, unfortunately i didn't get your point about TestServer.cpp, did you mean to use command handler? There is no doubleClick functionality in TestServer.
Also there is interesting functions like click with point param. Are they somehow available from Python side?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants