Skip to content

Add copy/paste buttons to easily export / import device settings in the canvas tab #6

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

Open
bparks13 opened this issue Feb 3, 2025 · 2 comments
Assignees

Comments

@bparks13
Copy link
Member

bparks13 commented Feb 3, 2025

Since devices will eventually be separated from their tabs (see #5), it is possible for the settings to be in the wrong port and need to be swapped around. Add copy/paste buttons to the canvas so that all of the current settings for a particular device can be copied or pasted.

@bparks13 bparks13 added this to the Neuropixels 1.0f milestone Feb 3, 2025
@bparks13 bparks13 self-assigned this Feb 3, 2025
@bparks13 bparks13 removed this from the Neuropixels 1.0f and 2.0e milestone Apr 9, 2025
@bparks13
Copy link
Member Author

bparks13 commented Apr 9, 2025

After reading more about the clipboard, there is no cross-platform way to accomplish this. Instead, below are a couple of possibilities for how to implement this:

  1. Have these buttons write the current devices settings to a file, and then read from a file. However, there would need to be a lot of checks when reading to make sure that it is in a good format. We can co-opt the saveParameters(XmlElement*) and loadParameters(XmlElement*) methods by passing in our own XmlElement, and then read/write to a file. This would maintain the standard format with the regular file saved by the GUI, but would allow slightly more flexibility since this would be done on a per-device basis. But this comes at the cost of having to create and then read from multiple files, which could become annoying.
  2. Restrict this functionality such that it can only copy the settings when the same headstage is opened in both ports. That is, if there is a Neuropixels 2.0e in both Port A and Port B, then the settings could be copied device-by-device from A->B, or vice versa. This would solve the issue of a user accidentally choosing the wrong port, and then needing to move the settings en masse instead of manually. However, this precludes the user from doing so if they have two different headstages in both ports. This is a non-issue, since they should be able to just switch the physical ports, but is left here for posterity.

This brings up a larger discussion of whether or not this is a necessary function for this plugin, or if it is better left alone, since either option would require some additional work to make it easy to use.

@jsiegle
Copy link
Contributor

jsiegle commented Apr 10, 2025

I assume you've checked out the implementation in the Neuropixels plugin, which just temporarily stores the settings in memory: https://github.com/open-ephys-plugins/neuropixels-pxi/blob/42320c3ef340f586c23db3aa456a51314468b706/Source/UI/NeuropixInterface.cpp#L937-L946

Would that work here?

@bparks13 bparks13 added this to the Neuropixels 1.0e milestone Apr 16, 2025
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

2 participants