|
hydrogen 1.1.1
|
Pattern Editor. More...
#include <PatternEditor.h>
Public Slots | |
| virtual void | updateEditor (bool bPatternOnly=false)=0 |
| virtual void | selectAll ()=0 |
| virtual void | selectNone () |
| virtual void | deleteSelection ()=0 |
| virtual void | copy () |
| Copy selection to clipboard in XML. More... | |
| virtual void | paste ()=0 |
| virtual void | cut () |
| virtual void | selectInstrumentNotes (int nInstrument) |
| void | setCurrentInstrument (int nInstrument) |
Public Member Functions | |
| PatternEditor (QWidget *pParent, const char *sClassName, PatternEditorPanel *panel) | |
| void | setResolution (uint res, bool bUseTriplets) |
Set the editor grid resolution, dividing a whole note into res subdivisions. More... | |
| uint | getResolution () const |
| bool | isUsingTriplets () const |
| float | getGridWidth () const |
| unsigned | getGridHeight () const |
| void | zoomIn () |
| Zoom in / out on the time axis. More... | |
| void | zoomOut () |
| void | clearSelection () |
| Clear the pattern editor selection. More... | |
| void | mergeSelectionGroups (PatternEditor *pPatternEditor) |
| Merge together the selection groups of two PatternEditor objects to share a common selection. More... | |
| virtual void | validateSelection () override |
| Ensure that the Selection contains only valid elements. More... | |
| virtual void | updateModifiers (QInputEvent *ev) |
| Update the status of modifier keys in response to input events. More... | |
| virtual void | updateWidget () override |
| Update a widget in response to a change in selection. More... | |
| virtual bool | checkDeselectElements (std::vector< SelectionIndex > &elements) override |
| Deselecting notes. More... | |
| virtual void | startMouseLasso (QMouseEvent *ev) override |
| Change the mouse cursor during mouse gestures. More... | |
| virtual void | startMouseMove (QMouseEvent *ev) override |
| virtual void | endMouseGesture () override |
| bool | notesMatchExactly (H2Core::Note *pNoteA, H2Core::Note *pNoteB) const |
| Do two notes match exactly, from the pattern editor's point of view? They match if all user-editable properties are the same. More... | |
| void | deselectAndOverwriteNotes (std::vector< H2Core::Note * > &selected, std::vector< H2Core::Note * > &overwritten) |
| Deselect some notes, and "overwrite" some others. More... | |
| void | undoDeselectAndOverwriteNotes (std::vector< H2Core::Note * > &selected, std::vector< H2Core::Note * > &overwritten) |
| virtual void | mousePressEvent (QMouseEvent *ev) override |
| Raw Qt mouse events are passed to the Selection. More... | |
| virtual void | mouseMoveEvent (QMouseEvent *ev) override |
| virtual void | mouseReleaseEvent (QMouseEvent *ev) override |
Public Member Functions inherited from EventListener | |
| virtual void | stateChangedEvent (int nState) |
| virtual void | patternChangedEvent () |
| virtual void | patternModifiedEvent () |
| virtual void | songModifiedEvent () |
| virtual void | selectedPatternChangedEvent () |
| virtual void | selectedInstrumentChangedEvent () |
| virtual void | parametersInstrumentChangedEvent () |
| virtual void | midiActivityEvent () |
| virtual void | noteOnEvent (int nInstrument) |
| virtual void | XRunEvent () |
| virtual void | errorEvent (int nErrorCode) |
| virtual void | metronomeEvent (int nValue) |
| virtual void | rubberbandbpmchangeEvent () |
| virtual void | progressEvent (int nValue) |
| virtual void | jacksessionEvent (int nValue) |
| virtual void | playlistLoadSongEvent (int nIndex) |
| virtual void | undoRedoActionEvent (int nValue) |
| virtual void | tempoChangedEvent (int nValue) |
| virtual void | updateSongEvent (int nValue) |
| virtual void | quitEvent (int nValue) |
| virtual void | timelineActivationEvent (int nValue) |
| virtual void | timelineUpdateEvent (int nValue) |
| virtual void | jackTransportActivationEvent (int nValue) |
| virtual void | jackTimebaseActivationEvent (int nValue) |
| virtual void | songModeActivationEvent (int nValue) |
| virtual void | loopModeActivationEvent (int nValue) |
| virtual void | updatePreferencesEvent (int nValue) |
| virtual void | actionModeChangeEvent (int nValue) |
| virtual | ~EventListener () |
Public Member Functions inherited from Object | |
| ~Object () | |
| destructor More... | |
| Object (const Object &obj) | |
| copy constructor More... | |
| Object (const char *class_name) | |
| constructor More... | |
| const char * | class_name () const |
| return the class name More... | |
| virtual QString | toQString (const QString &sPrefix, bool bShort=true) const |
| Formatted string version for debugging purposes. More... | |
| void | Print (bool bShort=true) const |
| Prints content of toQString() via DEBUGLOG. More... | |
Public Member Functions inherited from SelectionWidget< H2Core::Note * > | |
| 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... | |
| 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 () |
Static Public Member Functions | |
| static QColor | computeNoteColor (float velocity) |
| Calculate colour to use for note representation based on note velocity. More... | |
Static Public Member Functions inherited from Object | |
| static void | set_count (bool flag) |
| enable/disable class instances counting More... | |
| static bool | count_active () |
| return true if class instances counting is enabled More... | |
| static unsigned | objects_count () |
| return the number of objects More... | |
| static void | write_objects_map_to (std::ostream &out) |
| output the full objects map to a given ostream More... | |
| static void | write_objects_map_to_cerr () |
| output objects map to stderr More... | |
| static int | bootstrap (Logger *logger, bool count=false) |
| must be called before any Object instantiation ! More... | |
| static Logger * | logger () |
| return the logger instance More... | |
Protected Member Functions | |
| int | granularity () const |
| Granularity of grid positioning (in ticks) More... | |
| int | getColumn (int x, bool bUseFineGrained=false) const |
| QPoint | movingGridOffset () const |
| void | drawGridLines (QPainter &p, Qt::PenStyle style=Qt::SolidLine) const |
| Draw lines for note grid. More... | |
| QColor | selectedNoteColor (const H2Core::UIStyle *pStyle) const |
| Colour to use for outlining selected notes. More... | |
| void | drawNoteSymbol (QPainter &p, QPoint pos, H2Core::Note *pNote) const |
| Draw a note. More... | |
| void | updatePatternInfo () |
| Update current pattern information. More... | |
Protected Attributes | |
| Selection< SelectionIndex > | m_selection |
| The Selection object. More... | |
| uint | m_nEditorHeight |
| uint | m_nEditorWidth |
| float | m_fGridWidth |
| unsigned | m_nGridHeight |
| int | m_nSelectedPatternNumber |
| H2Core::Pattern * | m_pPattern |
| const int | m_nMargin = 20 |
| uint | m_nResolution |
| bool | m_bUseTriplets |
| bool | m_bFineGrained |
| bool | m_bCopyNotMove |
| bool | m_bSelectNewNotes |
| H2Core::Note * | m_pDraggedNote |
| PatternEditorPanel * | m_pPatternEditorPanel |
| QMenu * | m_pPopupMenu |
Additional Inherited Members | |
Public Types inherited from SelectionWidget< H2Core::Note * > | |
| typedef H2Core::Note * | SelectionIndex |
Static Public Attributes inherited from Object | |
| static QString | sPrintIndention = " " |
| String used to format the debugging string output of some core classes. More... | |
Static Protected Attributes inherited from Object | |
| static Logger * | __logger = nullptr |
| logger instance pointer More... | |
Pattern Editor.
The PatternEditor class is an abstract base class for functionality common to Pattern Editor components (DrumPatternEditor, PianoRollEditor, NotePropertiesRuler).
This covers common elements such as some selection handling, timebase functions, and drawing grid lines.
| PatternEditor | ( | QWidget * | pParent, |
| const char * | sClassName, | ||
| PatternEditorPanel * | panel | ||
| ) |
|
overridevirtual |
Deselecting notes.
|
inline |
Clear the pattern editor selection.
|
static |
Calculate colour to use for note representation based on note velocity.
|
virtualslot |
Copy selection to clipboard in XML.
|
virtualslot |
|
pure virtualslot |
| void deselectAndOverwriteNotes | ( | std::vector< H2Core::Note * > & | selected, |
| std::vector< H2Core::Note * > & | overwritten | ||
| ) |
Deselect some notes, and "overwrite" some others.
|
protected |
Draw lines for note grid.
|
protected |
Draw a note.
|
inlineoverridevirtual |
Reimplemented from SelectionWidget< H2Core::Note * >.
|
protected |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
Granularity of grid positioning (in ticks)
|
inline |
|
inline |
Merge together the selection groups of two PatternEditor objects to share a common selection.
|
overridevirtual |
Reimplemented in NotePropertiesRuler.
|
overridevirtual |
Raw Qt mouse events are passed to the Selection.
|
overridevirtual |
|
protected |
| bool notesMatchExactly | ( | H2Core::Note * | pNoteA, |
| H2Core::Note * | pNoteB | ||
| ) | const |
Do two notes match exactly, from the pattern editor's point of view? They match if all user-editable properties are the same.
|
pure virtualslot |
|
pure virtualslot |
|
protected |
Colour to use for outlining selected notes.
|
virtualslot |
|
virtualslot |
|
slot |
| void setResolution | ( | uint | res, |
| bool | bUseTriplets | ||
| ) |
Set the editor grid resolution, dividing a whole note into res subdivisions.
|
inlineoverridevirtual |
Change the mouse cursor during mouse gestures.
Reimplemented from SelectionWidget< H2Core::Note * >.
|
inlineoverridevirtual |
Reimplemented from SelectionWidget< H2Core::Note * >.
| void undoDeselectAndOverwriteNotes | ( | std::vector< H2Core::Note * > & | selected, |
| std::vector< H2Core::Note * > & | overwritten | ||
| ) |
|
pure virtualslot |
|
virtual |
Update the status of modifier keys in response to input events.
|
protected |
Update current pattern information.
|
inlineoverridevirtual |
Update a widget in response to a change in selection.
Implements SelectionWidget< H2Core::Note * >.
|
overridevirtual |
Ensure that the Selection contains only valid elements.
Ensure selection only refers to valid notes, and does not contain any stale references to deleted notes.
Implements SelectionWidget< H2Core::Note * >.
| void zoomIn | ( | ) |
Zoom in / out on the time axis.
| void zoomOut | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
The Selection object.