This PR contains multiple changes and overall it is focused on improving lmms functionality communication with the user and on immediate feedback to the user.
These changes are the following:
The StringPairDrag system and the StringPair system now uses a unified enum as key instead of custom strings. Before this, key names weren't documented and they were scattered across multiple files.
A new class was added that implements handling shortcuts and highlighting widgets:
This class was designed to encourage developers to implement shortcuts and pasting data into the widget.
Shortcuts:
Shortcuts support all QT keys and modifiers and they can differentiate between how many times a shortcut was pressed. Each shortcut has a description.
Shortcuts aim to be easy to work with.
If the user moves the mouse over the widget, then the available shortcuts will automatically be displayed.
In the future settings could be added that could allow the user to change the shortcuts.
Highlighting:
The idea behind highlighting is to show users which widget can accept which StringPair key while dragging or copying. If the user starts to drag a clip, the other clips will be highlighted to show that they can accept the datatype associated with the drag event.
Highlighting will be active for 10 seconds after the user starts to ctrl + drag a widget or when a widget is copied.
Highlighting will stop after a successful paste, but the user can keep pasting into other widgets.
The new class is implemented inside Knobs (FloatModelEditorBase) and all clips. I plan to implement it in other widgets in the future (if this gets merged).
Problems:
For shortcuts to work the new InteractiveModelView widgets redirect PianoView's PianoView::keyPressEvent to themself. This solution works but it isn't ideal.
ClipView::getClipStringPairType and TrackView::getTrackStringPairType does not implement Special types of tracks (video, event)
I removed ClipView::dropEvent copying code because I found that this condition is never true:
// Defer to rubberband paste if we're in that mode
if (m_trackView->trackContainerView()->allowRubberband() == true)
Picture showing highlighting (for knobs and clips separately):
This PR contains multiple changes and overall it is focused on improving lmms functionality communication with the user and on immediate feedback to the user.
These changes are the following:
StringPairDrag
system and theStringPair
system now uses a unifiedenum
as key instead of custom strings. Before this, key names weren't documented and they were scattered across multiple files.StringPair
key while dragging or copying. If the user starts to drag a clip, the other clips will be highlighted to show that they can accept the datatype associated with the drag event.FloatModelEditorBase
) and all clips. I plan to implement it in other widgets in the future (if this gets merged).Problems:
InteractiveModelView
widgets redirectPianoView
'sPianoView::keyPressEvent
to themself. This solution works but it isn't ideal.ClipView::getClipStringPairType
andTrackView::getTrackStringPairType
does not implement Special types of tracks (video, event)ClipView::dropEvent
copying code because I found that this condition is never true:Picture showing highlighting (for knobs and clips separately):