sigviewer
sigviewer copied to clipboard
Hotkeydialog
Fix #98
@cbrnr Ready! Please let me know what do you think! :)
Thanks @Yida-Lin.
- I would call the dialog "Keyboard and Mouse Shortcuts"
- There should be a new menu entry in the Help menu
- The action should always be enabled, not just if a file is open
- The keyboard shortcuts are currently hard-coded in the dialog - can you extract them directly from the actions?
- Zoom in/out all channels is missing
- The help icon in the toolbar should be the rightmost icon
@cbrnr Hi Clemens,
Ready, except 2 issues:
- I don't know how to extract mouse wheel event from QKeySequence
- I don't know how to enable it when not opening a file
Extracting the key sequences doesn't work like that - the dialog still shows Windows shortcuts on a Mac. I think you could use the shortcut
and text
methods of a QAction
to extract the keyboard shortcut and the name of the action.
@cbrnr hmm QAction
s are scattered everywhere... It would be difficult to include a bunch of headers just for the dialog. :/ Plus GuiActionCommand::getQActions ()
is abstract... which makes it even more complicated (need to instantiate a bunch of objects to get all actions, I assume).
I currently use:
#if defined(Q_OS_MACOS)
QString ctrl = "Cmd";
QString alt = "Option";
#else
QString ctrl = "Ctrl";
QString alt = "Alt";
#endif
Could you please let me know whether it works on a mac?
Yes, this works on a Mac. Can you please fix these final issues before I merge:
- "Scale all channels up" and "Scale all channels down" are missing (Shift+Mousewheel Up/Down)
- Decrease the dialog width and make sure everything fits into the dialog without having to scroll. Currently, there is a horizontal scrollbar because the table view is too wide.
- The "Close File" shortcut is missing (Cmd+W on a Mac).
- "Undo" and "Redo" shortcuts are missing (Cmd+Z, Shift+Cmd+Z).
- The "Exit" shortcut is Cmd+Q on a Mac and not Cmd+F4.
- Selection in the dialog should be disabled (no need to highlight anything).
- The dialog should be always enabled (even when there is no file open).
@cbrnr Hi Clemens! :)
All finished and ready to merge! Right before the Graz BCI Conference :)
Thanks @Yida-Lin. I think we shouldn't make the dialogs fixed size though (see my comment in #104).
@cbrnr Hi Clemens,
Sure. I didn't realize they weren't resizable. Just fixed the problem.