Пример #1
0
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();
      }
Пример #2
0
void HPiano::releasePitch(int pitch)
      {
      _pressedPitches.remove(pitch);
      updateAllKeys();
      }
Пример #3
0
void HPiano::pressPitch(int pitch)
      {
      _pressedPitches.insert(pitch);
      updateAllKeys();
      }
Пример #4
0
void HPiano::setPressedPitches(QSet<int> pitches)
      {
      _pressedPitches = pitches;
      updateAllKeys();
      }