|
hydrogen 1.1.1
|
SelectionWidget defines the interface used by the Selection manager to communicate with a widget implementing selection, and provides for event translation, testing for intersection with selectable objects, keyboard input cursor geometry, and screen refresh. More...
#include <Selection.h>
Public Types | |
| typedef Elem | SelectionIndex |
Public Member Functions | |
| virtual std::vector< SelectionIndex > | elementsIntersecting (QRect r)=0 |
| Find list of elements which intersect a rectangular area. More... | |
| virtual bool | canDragElements () |
| Can elements be dragged as well as being selected? This may change to suit widget's current state. More... | |
| virtual QRect | getKeyboardCursorRect ()=0 |
| Calculate screen space occupied by keyboard cursor. More... | |
| virtual void | validateSelection ()=0 |
| Ensure that the Selection contains only valid elements. More... | |
| virtual void | updateWidget ()=0 |
| Selection or selection-related visual elements have changed, widget needs to be updated. More... | |
| virtual bool | checkDeselectElements (std::vector< SelectionIndex > &elements) |
| Inform the client that we're deselecting elements. More... | |
| virtual QScrollArea * | findScrollArea () |
| Find the QScrollArea, if any, which contains the widget. More... | |
User-level mouse events | |
Inform client of user-level mouse actions.
Additionally, dragging a selection is managed by the Selection class and only an 'end' event is delivered to the client. | |
| virtual void | mouseClickEvent (QMouseEvent *ev)=0 |
| virtual void | mouseDragStartEvent (QMouseEvent *ev)=0 |
| virtual void | mouseDragUpdateEvent (QMouseEvent *ev)=0 |
| virtual void | mouseDragEndEvent (QMouseEvent *ev)=0 |
| virtual void | selectionMoveUpdateEvent (QMouseEvent *ev) |
| virtual void | selectionMoveEndEvent (QInputEvent *ev)=0 |
| virtual void | selectionMoveCancelEvent () |
Mouse gesture hooks | |
Hooks for extra actons (eg. changing the mouse cursor) at the beginning and end of mouse gestures. | |
| virtual void | startMouseLasso (QMouseEvent *ev) |
| virtual void | startMouseMove (QMouseEvent *ev) |
| virtual void | endMouseGesture () |
SelectionWidget defines the interface used by the Selection manager to communicate with a widget implementing selection, and provides for event translation, testing for intersection with selectable objects, keyboard input cursor geometry, and screen refresh.
It must be subclassed and implemented by any widget which uses the Selection class.
| typedef Elem SelectionIndex |
|
inlinevirtual |
Can elements be dragged as well as being selected? This may change to suit widget's current state.
Reimplemented in SongEditor.
|
inlinevirtual |
Inform the client that we're deselecting elements.
|
pure virtual |
Find list of elements which intersect a rectangular area.
This may be a selection lasso rectangle, or a single point such as a mouse click. This should concern itself only with the geometry.
Implemented in DrumPatternEditor, NotePropertiesRuler, PianoRollEditor, and SongEditor.
|
inlinevirtual |
Reimplemented in PatternEditor, and SongEditor.
|
inlinevirtual |
Find the QScrollArea, if any, which contains the widget.
This will be used to scroll the widget during drag operations.
|
pure virtual |
Calculate screen space occupied by keyboard cursor.
Implemented in DrumPatternEditor, NotePropertiesRuler, PianoRollEditor, and SongEditor.
|
pure virtual |
Implemented in DrumPatternEditor, NotePropertiesRuler, PianoRollEditor, and SongEditor.
|
pure virtual |
Implemented in DrumPatternEditor, NotePropertiesRuler, PianoRollEditor, and SongEditor.
|
pure virtual |
Implemented in DrumPatternEditor, NotePropertiesRuler, PianoRollEditor, and SongEditor.
|
pure virtual |
Implemented in DrumPatternEditor, NotePropertiesRuler, PianoRollEditor, and SongEditor.
|
inlinevirtual |
Reimplemented in NotePropertiesRuler.
|
pure virtual |
Implemented in DrumPatternEditor, NotePropertiesRuler, PianoRollEditor, and SongEditor.
|
inlinevirtual |
Reimplemented in NotePropertiesRuler.
|
inlinevirtual |
Reimplemented in PatternEditor, and SongEditor.
|
inlinevirtual |
Reimplemented in PatternEditor.
|
pure virtual |
Selection or selection-related visual elements have changed, widget needs to be updated.
At a minimum, the widget's own update() method should be called.
Implemented in PatternEditor, and SongEditor.
|
pure virtual |
Ensure that the Selection contains only valid elements.
Implemented in PatternEditor, and SongEditor.