|
hydrogen 1.2.6
|
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 bool | canDragElements () |
| Can elements be dragged as well as being selected? This may change to suit widget's current state. | |
| virtual bool | checkDeselectElements (std::vector< SelectionIndex > &elements) |
| Inform the client that we're deselecting elements. | |
| virtual std::vector< SelectionIndex > | elementsIntersecting (QRect r)=0 |
| Find list of elements which intersect a rectangular area. | |
| virtual QScrollArea * | findScrollArea () |
| Find the QScrollArea, if any, which contains the widget. | |
| virtual QRect | getKeyboardCursorRect ()=0 |
| Calculate screen space occupied by keyboard cursor. | |
| virtual void | updateWidget ()=0 |
| Selection or selection-related visual elements have changed, widget needs to be updated. | |
| virtual void | validateSelection ()=0 |
| Ensure that the Selection contains only valid elements. | |
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.
Definition at line 49 of file Selection.h.
| typedef Elem SelectionIndex |
Definition at line 52 of file Selection.h.
|
inlinevirtual |
Can elements be dragged as well as being selected? This may change to suit widget's current state.
Reimplemented in SongEditor.
Definition at line 59 of file Selection.h.
|
inlinevirtual |
Inform the client that we're deselecting elements.
Definition at line 72 of file Selection.h.
|
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.
Definition at line 101 of file Selection.h.
|
inlinevirtual |
Find the QScrollArea, if any, which contains the widget.
This will be used to scroll the widget during drag operations.
Definition at line 106 of file Selection.h.
|
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 NotePropertiesRuler, PatternEditor, and SongEditor.
|
pure virtual |
Implemented in DrumPatternEditor, NotePropertiesRuler, PatternEditor, PianoRollEditor, and SongEditor.
|
pure virtual |
Implemented in DrumPatternEditor, NotePropertiesRuler, PatternEditor, PianoRollEditor, and SongEditor.
|
inlinevirtual |
Reimplemented in NotePropertiesRuler.
Definition at line 93 of file Selection.h.
|
pure virtual |
Implemented in DrumPatternEditor, NotePropertiesRuler, PianoRollEditor, and SongEditor.
|
inlinevirtual |
Reimplemented in NotePropertiesRuler.
Definition at line 91 of file Selection.h.
|
inlinevirtual |
Reimplemented in PatternEditor, and SongEditor.
Definition at line 99 of file Selection.h.
|
inlinevirtual |
Reimplemented in PatternEditor.
Definition at line 100 of file Selection.h.
|
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.