Aharoni-Lab / Miniscope-DAQ-QT-Software

Software for streaming and controlling neural and behavioral data from freely behaving animals
GNU General Public License v3.0
119 stars 29 forks source link

collapse/resize params drawer #64

Open sneakers-the-rat opened 1 year ago

sneakers-the-rat commented 1 year ago

Got a verbal issue from someone at poster session yesterday, they say their main problem was that they want to hide the params pane while they are doing surgeries - gets in the way of the video.

sneakers-the-rat commented 1 year ago

For reference, this is the acquisition window:

image

The window can't be resized once it's opened, but @fnsangiul says you can change the window size before clicking "run" by editing the windowScale parameter in the user config: ( eg. here: https://github.com/Aharoni-Lab/Miniscope-DAQ-QT-Software/blob/a9482d4dc8ec960112be5e566347ddaf2d0406d4/userConfigs/UserConfigExample-primary.json#L141 ). so that might help some things in the short term?

So things that might be nice here:

Make the window resizeable

the window is initialized here: https://github.com/Aharoni-Lab/Miniscope-DAQ-QT-Software/blob/a9482d4dc8ec960112be5e566347ddaf2d0406d4/source/videodevice.cpp#L145

specifically: https://github.com/Aharoni-Lab/Miniscope-DAQ-QT-Software/blob/a9482d4dc8ec960112be5e566347ddaf2d0406d4/source/videodevice.cpp#L162-L164

Since windowScale is used there to change the window size without modifying the other qt widgets elsewhere, it seems like we should be able to just enable window resizing.

The default resizeMode makes the view object take the size of the root qml object: https://doc.qt.io/qt-6/qquickview.html#ResizeMode-enum and the qml object then takes the width and height of the parent: https://github.com/Aharoni-Lab/Miniscope-DAQ-QT-Software/blob/a9482d4dc8ec960112be5e566347ddaf2d0406d4/source/Miniscope_V4_BNO.qml#L10-L12

so I think we just need to set sizePolicy.Expanding on that item? idk i don't rly use or like qml/qtquick

move controls to a separate pane

currently the controls are overlaid on the image, which could get in the way. additionally important controls are hidden in the top drawer and not very discoverable. I think we should probably move those off to a panel on the side so they don't obscure the frame at all.

Also since ppl will be using this software while doing a surgery, we should probably also add hotkey bindings to some of the controls, particularly the focus plane, so people can mash at them without needing to use the mouse.