void HPiano::setMaximum(bool top_level) { int margin = 16; if (!top_level) setMaximumSize(QSize((KEY_WIDTH * 52 + margin/2) * scaleVal, 1000)); else setMaximumSize(QSize((KEY_WIDTH * 52 + margin/2) * scaleVal, (KEY_HEIGHT + margin) * scaleVal)); updateAllKeys(); }
void HPiano::releasePitch(int pitch) { _pressedPitches.remove(pitch); updateAllKeys(); }
void HPiano::pressPitch(int pitch) { _pressedPitches.insert(pitch); updateAllKeys(); }
void HPiano::setPressedPitches(QSet<int> pitches) { _pressedPitches = pitches; updateAllKeys(); }