72 setFocusPolicy( Qt::StrongFocus );
81 setMouseTracking(
true );
102#if QT_VERSION >= QT_VERSION_CHECK( 5, 14, 0 )
109 if ( ev->modifiers() == Qt::ControlModifier || ev->modifiers() == Qt::AltModifier ) {
114 if ( ev->angleDelta().y() < 0 ) {
115 fDelta = fDelta * -1.0;
118#if QT_VERSION >= QT_VERSION_CHECK( 5, 14, 0 )
119 int nColumn =
getColumn( ev->position().x() );
127 bool bOldCursorHidden = pHydrogenApp->hideKeyboardCursor();
128 pHydrogenApp->setHideKeyboardCursor(
true );
131 if ( pSelectedInstrument ==
nullptr ) {
132 ERRORLOG(
"No instrument selected" );
137 std::list< Note *> notes;
140 notes.push_back( pNote );
144 notes.push_back( it->second );
148 bool bValueChanged =
false;
149 for (
Note *pNote : notes ) {
151 if ( pNote->get_instrument() != pSelectedInstrument && !
m_selection.isSelected( pNote ) ) {
154 bValueChanged =
true;
158 if ( bOldCursorHidden != pHydrogenApp->hideKeyboardCursor() ) {
161 if ( ! bValueChanged ) {
166 if ( bValueChanged ) {
175 if ( ev->button() == Qt::RightButton ) {
197 bool bOldCursorHidden = pHydrogenApp->hideKeyboardCursor();
198 pHydrogenApp->setHideKeyboardCursor(
true );
201 if ( bOldCursorHidden != pHydrogenApp->hideKeyboardCursor() ) {
208 if ( ! pHydrogenApp->hideKeyboardCursor() ) {
209 int nColumn =
getColumn( ev->x(),
true );
249 if ( pSelectedInstrument ==
nullptr ) {
250 ERRORLOG(
"No instrument selected" );
258 fDelta = (float)-movingOffset.y() / 10;
260 fDelta = (float)-movingOffset.y() / height();
265 bool bSendStatusMsg =
false;
271 bSendStatusMsg =
true;
274 bool bValueChanged =
false;
276 if ( pNote->get_instrument() == pSelectedInstrument ||
m_selection.isSelected( pNote ) ) {
284 bValueChanged =
true;
288 if ( bValueChanged ) {
311 Note *pNote = it.first, *pOldNote = it.second;
317 pNote->
setPan( pOldNote->getPan() );
323 pNote->
set_key_octave( pOldNote->get_key(), pOldNote->get_octave() );
349 if ( ev->buttons() == Qt::NoButton ) {
357 setCursor( Qt::PointingHandCursor );
370 setCursor( Qt::CrossCursor );
388 if ( pSelectedInstrument ==
nullptr ) {
389 ERRORLOG(
"No instrument selected" );
396 if ( pNote->get_instrument() == pSelectedInstrument ||
m_selection.isSelected( pNote ) ) {
406 Note *pNote = it->second;
430 bool bOldCursorHidden = pHydrogenApp->hideKeyboardCursor();
431 pHydrogenApp->setHideKeyboardCursor(
true );
439 float val = height() - ev->y();
440 if (val > height()) {
443 else if (val < 0.0) {
447 val = val / height();
448 auto pSelectedInstrument = pHydrogen->getSelectedInstrument();
449 if ( pSelectedInstrument ==
nullptr ) {
450 ERRORLOG(
"No instrument selected" );
454 bool bValueSet =
false;
457 Note *pNote = it->second;
469 if ( (ev->button() == Qt::MiddleButton)
470 || (ev->modifiers() == Qt::ControlModifier && ev->button() == Qt::LeftButton) ) {
479 if ( (ev->button() == Qt::MiddleButton) ||
480 (ev->modifiers() == Qt::ControlModifier &&
481 ev->button() == Qt::LeftButton) ) {
493 if ( ev->button() != Qt::MiddleButton &&
494 ! ( ev->modifiers() == Qt::ControlModifier &&
495 ev->button() == Qt::LeftButton ) ) {
499 if( keyval >= 6 && keyval <= 125 ) {
500 k = ( keyval - 6 ) / 10;
502 else if( keyval >= 135 && keyval <= 205 ) {
503 o = ( keyval - 166 ) / 10;
527 if ( bOldCursorHidden != pHydrogenApp->hideKeyboardCursor() ) {
555 bool bValueSet =
false;
584 float fProbability = qBound( 0.0f, pOldNote->
get_probability() + fDelta, 1.0f );
625 bool bOldCursorHidden = pHydrogenApp->hideKeyboardCursor();
627 const int nWordSize = 5;
628 bool bIsSelectionKey =
m_selection.keyPressEvent( ev );
629 bool bUnhideCursor =
true;
631 bool bValueChanged =
false;
633 if ( bIsSelectionKey ) {
635 }
else if ( ev->matches( QKeySequence::MoveToNextChar ) || ev->matches( QKeySequence::SelectNextChar ) ) {
639 }
else if ( ev->matches( QKeySequence::MoveToNextWord ) || ev->matches( QKeySequence::SelectNextWord ) ) {
643 }
else if ( ev->matches( QKeySequence::MoveToEndOfLine ) || ev->matches( QKeySequence::SelectEndOfLine ) ) {
647 }
else if ( ev->matches( QKeySequence::MoveToPreviousChar ) || ev->matches( QKeySequence::SelectPreviousChar ) ) {
651 }
else if ( ev->matches( QKeySequence::MoveToPreviousWord ) || ev->matches( QKeySequence::SelectPreviousWord ) ) {
655 }
else if ( ev->matches( QKeySequence::MoveToStartOfLine ) || ev->matches( QKeySequence::SelectStartOfLine ) ) {
663 bool bRepeatLastValue =
false;
665 if ( ev->matches( QKeySequence::MoveToPreviousLine ) ) {
669 }
else if ( ev->key() == Qt::Key_Up && ev->modifiers() & Qt::AltModifier ) {
673 }
else if ( ev->matches( QKeySequence::MoveToNextLine ) ) {
677 }
else if ( ev->key() == Qt::Key_Down && ev->modifiers() & Qt::AltModifier ) {
681 }
else if ( ev->matches( QKeySequence::MoveToStartOfDocument ) ) {
685 }
else if ( ev->matches( QKeySequence::MoveToEndOfDocument ) ) {
689 }
else if ( ev->key() == Qt::Key_Enter || ev->key() == Qt::Key_Return ) {
692 bRepeatLastValue =
true;
695 }
else if ( ev->matches( QKeySequence::SelectAll ) ) {
697 bUnhideCursor =
false;
700 }
else if ( ev->matches( QKeySequence::Deselect ) ) {
702 bUnhideCursor =
false;
707 if ( fDelta != 0.0 || bRepeatLastValue ) {
710 auto pSelectedInstrument = pHydrogen->getSelectedInstrument();
711 if ( pSelectedInstrument ==
nullptr ) {
712 ERRORLOG(
"No instrument selected" );
719 std::list< Note *> notes;
723 notes.push_back( pNote );
727 Note *pNote = it->second;
732 notes.push_back( pNote );
739 if ( fDelta > 0.0 ) {
741 }
else if ( fDelta < 0.0 ) {
748 for (
Note *pNote : notes ) {
749 bValueChanged =
true;
751 if ( !bRepeatLastValue ) {
758 bool bValueSet =
false;
763 if ( !pNote->get_note_off() ) {
769 if ( !pNote->get_note_off() ) {
771 printf(
"reached m_fLastSetValue > 1 in NotePropertiesRuler.cpp\n" );
782 if ( !pNote->get_note_off() ) {
804 pHydrogenApp->setHideKeyboardCursor(
true );
808 if ( bOldCursorHidden != pHydrogenApp->hideKeyboardCursor() ) {
816 if ( bUnhideCursor ) {
817 pHydrogenApp->setHideKeyboardCursor(
false );
822 bOldCursorHidden != pHydrogenApp->hideKeyboardCursor() ) {
829 if ( bValueChanged ) {
851 pUndoStack->beginMacro( QString( tr(
"Edit [%1] property of [%2] notes" ) )
856 Note *pNewNote = it.first, *pOldNote = it.second;
862 pOldNote->get_velocity(),
866 pOldNote->get_lead_lag(),
868 pOldNote->get_probability(),
872 pOldNote->get_octave() ) );
875 pUndoStack->endMacro();
889 qreal pixelRatio = devicePixelRatio();
895 QPainter painter(
this);
897 QRectF( pixelRatio * ev->rect().x(),
898 pixelRatio * ev->rect().y(),
899 pixelRatio * ev->rect().width(),
900 pixelRatio * ev->rect().height() ) );
910 painter.drawLine( nX, 0, nX, height() );
921 QPen pen( pPref->getColorTheme()->m_cursorColor );
923 painter.setPen( pen );
924 painter.setBrush( Qt::NoBrush );
925 painter.setRenderHint( QPainter::Antialiasing );
938 QColor color = pPref->getColorTheme()->m_highlightColor;
943 if ( ! hasFocus() ) {
944 color.setAlpha( 125 );
947 const QScrollArea* pScrollArea;
968 int nStartY = pScrollArea->verticalScrollBar()->value();
969 int nStartX = pScrollArea->horizontalScrollBar()->value();
970 int nEndY = nStartY + pScrollArea->viewport()->size().height();
972 int nEndX = std::min( nStartX + pScrollArea->viewport()->size().width(),
985 painter.setPen( pen );
986 painter.drawLine( QPoint( nStartX, nStartY ), QPoint( nEndX, nStartY ) );
987 painter.drawLine( QPoint( nStartX, nStartY ), QPoint( nStartX, nEndY ) );
988 painter.drawLine( QPoint( nEndX, nEndY ), QPoint( nStartX, nEndY ) );
996 painter.setPen( pen );
998 painter.drawLine( QPoint( nEndX +
nMargin, nStartY ), QPoint( nEndX +
nMargin, nEndY ) );
1023 const QColor borderColor( pPref->getColorTheme()->m_patternEditor_lineColor );
1024 const QColor lineColor( pPref->getColorTheme()->m_patternEditor_line5Color );
1025 const QColor lineInactiveColor( pPref->getColorTheme()->m_windowTextColor.darker( 170 ) );
1026 const QColor backgroundColor( pPref->getColorTheme()->m_patternEditor_backgroundColor );
1027 const QColor backgroundInactiveColor( pPref->getColorTheme()->m_windowColor );
1029 if ( nHeight == 0 ) {
1032 if ( nIncrement == 0 ) {
1033 nIncrement = nHeight / 10;
1036 painter.fillRect( 0, 0,
m_nActiveWidth, height(), backgroundColor );
1038 height(), backgroundInactiveColor );
1042 painter.setPen( lineColor );
1043 for (
unsigned y = 0; y < nHeight; y += nIncrement ) {
1047 painter.setPen( borderColor );
1052 painter.setPen( lineInactiveColor );
1053 for (
unsigned y = 0; y < nHeight; y += nIncrement ) {
1068 QColor borderColor( pPref->getColorTheme()->m_patternEditor_lineColor );
1069 const QColor lineInactiveColor( pPref->getColorTheme()->m_windowTextColor.darker( 170 ) );
1070 QPainter p( pixmap );
1076 auto pSelectedInstrument = pHydrogen->getSelectedInstrument();
1077 if ( pSelectedInstrument ==
nullptr ) {
1078 ERRORLOG(
"No instrument selected" );
1083 selectedPen.setWidth( 2 );
1087 Note *pposNote = it->second;
1092 Note *pNote = coit->second;
1099 uint line_end = height();
1109 uint line_start = line_end - value;
1113 p.fillRect( x_pos - 1 + xoffset, line_start,
1114 nLineWidth, line_end - line_start,
1116 p.setPen( QPen( Qt::black, 1 ) );
1117 p.setRenderHint( QPainter::Antialiasing );
1118 p.drawRoundedRect( x_pos - 1 - 1 + xoffset, line_start - 1,
1119 nLineWidth + 2, line_end - line_start + 2, 2, 2 );
1122 p.setPen( selectedPen );
1123 p.setRenderHint( QPainter::Antialiasing );
1124 p.drawRoundedRect( x_pos - 1 -2 + xoffset, line_start - 2,
1125 nLineWidth + 4, line_end - line_start + 4 ,
1133 p.setPen( borderColor );
1134 p.setRenderHint( QPainter::Antialiasing );
1136 p.setPen( QPen( borderColor, 2 ) );
1140 p.setPen( lineInactiveColor );
1142 p.setPen( QPen( lineInactiveColor, 2 ) );
1153 QColor baseLineColor( pPref->getColorTheme()->m_patternEditor_lineColor );
1154 QColor borderColor( pPref->getColorTheme()->m_patternEditor_lineColor );
1155 const QColor lineInactiveColor( pPref->getColorTheme()->m_windowTextColor.darker( 170 ) );
1157 QPainter p( pixmap );
1162 p.setPen( baseLineColor );
1165 p.setPen( lineInactiveColor );
1171 auto pSelectedInstrument = pHydrogen->getSelectedInstrument();
1172 if ( pSelectedInstrument ==
nullptr ) {
1173 ERRORLOG(
"No instrument selected" );
1178 selectedPen.setWidth( 2 );
1182 Note *pposNote = it->second;
1187 Note *pNote = coit->second;
1190 != pSelectedInstrument
1197 p.setPen( Qt::NoPen );
1201 fValue = pNote->
getPan();
1210 fValue = std::round( fValue );
1214 p.setPen( QPen( Qt::black, 1 ) );
1215 p.setRenderHint( QPainter::Antialiasing );
1216 if ( fValue == 0.f ) {
1218 int y_pos = (int)( height() * 0.5 );
1219 p.setBrush(QColor( noteColor ));
1220 p.drawEllipse( x_pos-4 + xoffset, y_pos-4, 8, 8);
1221 p.setBrush( Qt::NoBrush );
1224 p.setPen( selectedPen );
1225 p.setRenderHint( QPainter::Antialiasing );
1226 p.drawEllipse( x_pos - 6 + xoffset, y_pos - 6,
1232 int nHeight = 0.5 * height() * std::abs( fValue ) + 5;
1233 int nStartY = height() * 0.5 - 2;
1234 if ( fValue >= 0 ) {
1235 nStartY = nStartY - nHeight + 5;
1238 p.fillRect( x_pos - 1 + xoffset, nStartY,
1239 nLineWidth, nHeight, QColor( noteColor ) );
1240 p.drawRoundedRect( x_pos - 1 + xoffset - 1, nStartY - 1,
1241 nLineWidth + 2, nHeight + 2, 2, 2 );
1244 p.setPen( selectedPen );
1245 p.drawRoundedRect( x_pos - 1 - 2 + xoffset, nStartY - 2,
1246 nLineWidth + 4, nHeight + 4,
1256 p.setPen( borderColor );
1257 p.setRenderHint( QPainter::Antialiasing );
1259 p.setPen( QPen( borderColor, 2 ) );
1263 p.setPen( lineInactiveColor );
1265 p.setPen( QPen( lineInactiveColor, 2 ) );
1274 QColor backgroundColor = pPref->getColorTheme()->m_patternEditor_backgroundColor;
1275 const QColor backgroundInactiveColor( pPref->getColorTheme()->m_windowColor );
1276 QColor alternateRowColor = pPref->getColorTheme()->m_patternEditor_alternateRowColor;
1277 QColor octaveColor = pPref->getColorTheme()->m_patternEditor_octaveRowColor;
1278 QColor lineColor( pPref->getColorTheme()->m_patternEditor_lineColor );
1279 const QColor lineInactiveColor( pPref->getColorTheme()->m_windowTextColor.darker( 170 ) );
1280 QColor textColor( pPref->getColorTheme()->m_patternEditor_textColor );
1282 QPainter p( pixmap );
1287 for (
unsigned y = 90; y < 210; y = y + 10 ) {
1289 if ( y == 100 || y == 120 || y == 140 || y == 170 || y == 190) {
1290 p.setPen( QPen( alternateRowColor,
1291 9, Qt::SolidLine, Qt::FlatCap ) );
1294 p.setPen( QPen( octaveColor, 9, Qt::SolidLine, Qt::FlatCap) );
1301 static QString noteNames[] = { tr(
"B" ), tr(
"A#" ), tr(
"A" ), tr(
"G#" ), tr(
"G" ), tr(
"F#" ),
1302 tr(
"F" ), tr(
"E" ), tr(
"D#" ), tr(
"D" ), tr(
"C#" ), tr(
"C" ) };
1304 QFont font( pPref->getApplicationFontFamily(),
getPointSize( pPref->getFontSize() ) );
1307 p.setPen( textColor );
1308 for (
int n = 0; n < 12; n++ ) {
1309 p.drawText( 3, 90 + 10 * n +3, noteNames[n] );
1313 p.setPen( QPen( lineColor, 1, Qt::SolidLine));
1314 for (
unsigned y = 90; y <= 210; y = y + 10 ) {
1319 p.setPen( lineInactiveColor );
1320 for (
unsigned y = 90; y <= 210; y = y + 10 ) {
1327 if ( pSelectedInstrument ==
nullptr ) {
1328 DEBUGLOG(
"No instrument selected" );
1332 selectedPen.setWidth( 2 );
1336 Note *pNote = it->second;
1347 p.drawEllipse( x_pos, y_pos, 6, 6);
1353 y_pos = 200-(k*10)-4;
1358 p.setPen( QPen( Qt::black, 1 ) );
1360 p.drawEllipse( x_pos, y_pos, d, d);
1365 p.setPen( selectedPen );
1366 p.setBrush( Qt::NoBrush );
1367 p.setRenderHint( QPainter::Antialiasing );
1368 p.drawRoundedRect( x_pos - 1 -2 +3, 2,
1369 nLineWidth + 4 + 4, height() - 4,
1376 p.setPen( lineColor );
1377 p.setRenderHint( QPainter::Antialiasing );
1379 p.setPen( QPen( lineColor, 2 ) );
1383 p.setPen( lineInactiveColor );
1385 p.setPen( QPen( lineInactiveColor, 2 ) );
1397 if ( (nSelectedPatternNumber != -1) && ( (uint)nSelectedPatternNumber < pPatternList->size() ) ) {
1414 qreal pixelRatio = devicePixelRatio();
1455 std::vector<SelectionIndex> result;
1457 return std::move( result );
1463 auto pSelectedInstrument = pHydrogen->getSelectedInstrument();
1464 if ( pSelectedInstrument ==
nullptr ) {
1465 ERRORLOG(
"No instrument selected" );
1466 return std::move( result );
1473 if ( r.top() == r.bottom() && r.left() == r.right() ) {
1474 r += QMargins( 2, 2, 2, 2 );
1476 r += QMargins( 4, 4, 4, 4 );
1479 if ( it->second->get_instrument() != pSelectedInstrument
1484 int pos = it->first;
1486 if ( r.intersects( QRect( x_pos, 0, 1, height() ) ) ) {
1487 result.push_back( it->second );
1495 return std::move(result);
#define FOREACH_NOTE_CST_IT_BOUND_LENGTH(_notes, _it, _bound, _pattern)
Iterate over all notes in column _bound in an immutable way if it is contained in _pattern.
#define FOREACH_NOTE_CST_IT_BEGIN_LENGTH(_notes, _it, _pattern)
Iterate over all accessible notes between position 0 and length of _pattern in an immutable way.
std::shared_ptr< Song > getSong() const
Get the current song.
int getSelectedPatternNumber() const
static Hydrogen * get_instance()
Returns the current Hydrogen instance __instance.
std::shared_ptr< Instrument > getSelectedInstrument() const
void setIsModified(bool bIsModified)
Wrapper around Song::setIsModified() that checks whether a song is set.
A note plays an associated instrument with a velocity left and right pan.
int get_position() const
__position accessor
float getPanWithRangeFrom0To1() const
get pan of the note, scaling and translating the range from [-1;1] to [0;1]
void set_lead_lag(float value)
__lead_lag setter
void set_key_octave(const QString &str)
parse str and set __key and __octave
Octave get_octave()
__octave accessor
void set_probability(float value)
std::shared_ptr< Instrument > get_instrument()
__instrument accessor
float get_lead_lag() const
__lead_lag accessor
float get_notekey_pitch() const
note key pitch accessor
float get_velocity() const
__velocity accessor
void setPanWithRangeFrom0To1(float fVal)
set pan of the note, assuming the input range in [0;1]
bool get_note_off() const
__note_off accessor
void setPan(float val)
set pan of the note.
void set_velocity(float value)
__velocity setter
Key get_key()
__key accessor
float get_probability() const
float getPan() const
get pan of the note.
PatternList is a collection of patterns.
Pattern * get(int idx)
get a pattern from the list
std::multimap< int, Note * > notes_t
< multimap note type
static Preferences * get_instance()
Returns a pointer to the current Preferences singleton stored in __instance.
Changes
Bitwise or-able options showing which part of the Preferences were altered using the PreferencesDialo...
@ Font
Either the font size or font family have changed.
@ Colors
At least one of the colors has changed.
void addEventListener(EventListener *pListener)
static HydrogenApp * get_instance()
Returns the instance of HydrogenApp class.
QUndoStack * m_pUndoStack
PatternEditorPanel * getPatternEditorPanel()
void preferencesChanged(H2Core::Preferences::Changes changes)
Propagates a change in the Preferences through the GUI.
virtual void mouseDragUpdateEvent(QMouseEvent *ev) override
std::map< H2Core::Note *, H2Core::Note * > m_oldNotes
Map of notes currently in the pattern -> old notes with their properties.
virtual void mouseMoveEvent(QMouseEvent *ev) override
int m_nSelectedPatternNumber
virtual void updateEditor(bool bPatternOnly=false) override
virtual void mousePressEvent(QMouseEvent *ev) override
Raw Qt mouse events are passed to the Selection.
virtual void selectionMoveEndEvent(QInputEvent *ev) override
virtual QRect getKeyboardCursorRect() override
The screen area occupied by the keyboard cursor.
void prepareUndoAction(int x)
Preserve current note properties at position x (or in selection, if any) for use in later UndoAction.
int m_nDragPreviousColumn
void adjustNotePropertyDelta(H2Core::Note *pNote, float fDelta, bool bMessage=false)
Adjust a note's property by applying a delta to the current value, and clipping to the appropriate ra...
virtual void selectionMoveUpdateEvent(QMouseEvent *ev) override
virtual void selectAll() override
void onPreferencesChanged(H2Core::Preferences::Changes changes)
virtual void songModeActivationEvent() override
void leaveEvent(QEvent *ev) override
void wheelEvent(QWheelEvent *ev) override
Scroll wheel gestures will adjust the property of notes under the mouse cursor (or selected notes,...
void createNoteKeyBackground(QPixmap *pixmap)
void keyPressEvent(QKeyEvent *ev) override
void createNormalizedBackground(QPixmap *pixmap)
virtual void mouseDragStartEvent(QMouseEvent *ev) override
void propertyDragUpdate(QMouseEvent *ev)
Update notes for a property adjust drag, in response to the mouse moving.
void createBackground() override
Updates m_pBackgroundPixmap to show the latest content.
virtual void selectedInstrumentChangedEvent() override
void drawDefaultBackground(QPainter &painter, int nHeight=0, int nIncrement=0)
virtual void mouseDragEndEvent(QMouseEvent *ev) override
virtual void mouseClickEvent(QMouseEvent *ev) override
void paintEvent(QPaintEvent *ev) override
void createCenteredBackground(QPixmap *pixmap)
virtual void selectionMoveCancelEvent() override
Move of selection is cancelled. Revert notes to preserved state.
virtual void selectedPatternChangedEvent() override
void drawFocus(QPainter &painter)
void propertyDragStart(QMouseEvent *ev)
void enterEvent(QEvent *ev) override
virtual std::vector< SelectionIndex > elementsIntersecting(QRect r) override
Find list of elements which intersect a rectangular area.
const QScrollArea * getNotePanScrollArea() const
const QScrollArea * getNoteLeadLagScrollArea() const
const QScrollArea * getNoteNoteKeyScrollArea() const
const QScrollArea * getNoteVelocityScrollArea() const
const QScrollArea * getNoteProbabilityScrollArea() const
static QString modeToQString(Mode mode)
virtual void selectInstrumentNotes(int nInstrument)
virtual void mouseMoveEvent(QMouseEvent *ev) override
static QColor computeNoteColor(float velocity)
Calculate colour to use for note representation based on note velocity.
virtual void mousePressEvent(QMouseEvent *ev) override
Raw Qt mouse events are passed to the Selection.
virtual void selectNone()
QColor selectedNoteColor() const
Colour to use for outlining selected notes.
static void triggerStatusMessage(H2Core::Note *pNote, Mode mode)
static constexpr int nMargin
PatternEditorPanel * m_pPatternEditorPanel
QPixmap * m_pBackgroundPixmap
PatternEditor(QWidget *pParent, PatternEditorPanel *panel)
int getColumn(int x, bool bUseFineGrained=false) const
H2Core::Pattern * m_pPattern
void invalidateBackground()
void updateWidth()
Adjusts m_nActiveWidth and m_nEditorWidth to the current state of the editor.
Selection< SelectionIndex > m_selection
The Selection object.
bool m_bBackgroundInvalid
void drawGridLines(QPainter &p, Qt::PenStyle style=Qt::SolidLine) const
Draw lines for note grid.
static void setPlayheadPen(QPainter *p, bool bHovered=false)
static int getPlayheadShaftOffset()
#define MAX_INSTRUMENTS
Maximum number of instruments allowed in Hydrogen.
#define MAX_NOTES
Maximum number of notes.