63d2db7b14
Updating main piano roll display to have 12 rows per octave. Updating piano keyboard to track main piano roll window. Moving PianoKeyboard to its own file. Better tracking of playhead during playback. Drawing beat lines within measure. Scrollbars now adjusted for stasis when zooming in the pianoview. Piano ruler now showing tick marks respecting zoom level. Fixing scroll issue during playback. Taking direct control of selection. PianoItem is no longer a Qt object. Preping for note group drag. Can now drag pitch changes. Adjusting viewport pos when staff set. Removing CMakeLists.txt Adding CMakeLists.txt back in. Cleaning things up for resubmission. Now displaying drumset names in PianoKeyboard when relevant. Updating tracking signal in Pianoroll Editor. Cleanup. Locator lines no longer Qt objects. Removing redundant note move on mouse up. Now adjusting final event for playback. Now showing note voice name. Using Tpc to use note name tha reflects accidentals. Better checking for Position when opening Pianoroll window. Adding note for ctrl-click on rest. Swithing velocity type will now also adjust to equivilent velocity value. Better checking for single note selection. Pianoroll window. Adding note for ctrl-click on rest. equivilent velocity value. Better checking for single note selection. Ctrl-click now adds note to selection. Note up/down now correct direction for drumroll Fixing calcuation for switching note velocity. Can now horiz resize piano keyboard. Setting up new PianoLevels control for setting note event values. Now drawing subbeat divisions. Can now cut notes. User can now select data type to display. Can now use mouse to adjust levels. Adding undo to note event changes. Now smoother transition between absolute and offset level values. Smoother update communication between controls. Adding labels to piano levels. Removing unneccary blocking of scene() in pianoview. Now handles adjusting level with 1px wide mouse sweep. mouse sweep. 'c8199ac5a'. fix #273601: Updated UI for pianoroll editor. Now handling setting null staff. Adding missing .h files to CMakeLists.txt Removing undo step to avoid selection problem. Adding tool tip display. Keyboard display now adjusting to reflect transposition of instrument. Now showing part name in Piano Roll editor. Moving color display options into preferences. Levels editor now using preferences too. Fixing incorrent note being highlighted in piano roll editor. Base color now used for coloring levels panel. Cleaning code Investigating cut/pasete actions. Adding popup menu. Encapsulating selection into a command. Creating minimal popup menu. Can now insert notes of arbitrary duraition to piano roll. Adding dark and light color schemes to piano roll editor. Can now set subbeats to non powers of 2. Fixing bad rebase. Holding shift will clamp values to mousedown position. Adding dropdown to modify which white lines are shown behind notes.
117 lines
3.1 KiB
C++
117 lines
3.1 KiB
C++
//=============================================================================
|
|
// MusE Score
|
|
// Linux Music Score Editor
|
|
// $Id:$
|
|
//
|
|
// Copyright (C) 2009 Werner Schweer and others
|
|
//
|
|
// This program is free software; you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License version 2.
|
|
//
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with this program; if not, write to the Free Software
|
|
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
//=============================================================================
|
|
|
|
#ifndef __PIANOLEVELS_H__
|
|
#define __PIANOLEVELS_H__
|
|
|
|
#include <QWidget>
|
|
|
|
#include "libmscore/pos.h"
|
|
|
|
namespace Ms {
|
|
|
|
class Score;
|
|
class Staff;
|
|
class Chord;
|
|
class Note;
|
|
class NoteEvent;
|
|
class PianoItem;
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
// PianoLevels
|
|
//---------------------------------------------------------
|
|
|
|
class PianoLevels : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
Score* _score;
|
|
int _xpos;
|
|
qreal _xZoom;
|
|
Pos _cursor;
|
|
Pos* _locator;
|
|
Staff* _staff;
|
|
int _tuplet;
|
|
int _subdiv;
|
|
int _levelsIndex;
|
|
int vMargin;
|
|
int levelLen;
|
|
|
|
bool mouseDown;
|
|
QPointF mouseDownPos;
|
|
QPointF lastMousePos;
|
|
int dragging;
|
|
|
|
int minBeatGap;
|
|
|
|
QList<Note*> noteList;
|
|
|
|
virtual void paintEvent(QPaintEvent*);
|
|
virtual void mousePressEvent(QMouseEvent*);
|
|
virtual void mouseReleaseEvent(QMouseEvent* event);
|
|
virtual void mouseMoveEvent(QMouseEvent* event);
|
|
virtual void leaveEvent(QEvent*);
|
|
|
|
int pixelXToTick(int pixX);
|
|
int tickToPixelX(int tick);
|
|
int valToPixelY(int value);
|
|
int pixelYToVal(int value);
|
|
int noteStartTick(Note* note, NoteEvent* evt);
|
|
void moveLocator(QMouseEvent*);
|
|
void addChord(Chord* chord, int voice);
|
|
void clearNoteData();
|
|
|
|
void adjustLevel(int tick0, int value0, int tick1, int value1, bool selectedOnly = true);
|
|
|
|
signals:
|
|
void posChanged(const Pos&);
|
|
void tupletChanged(int);
|
|
void subdivChanged(int);
|
|
void levelsIndexChanged(int);
|
|
void locatorMoved(int idx, const Pos&);
|
|
void noteLevelsChanged();
|
|
|
|
public slots:
|
|
void setXpos(int);
|
|
void setTuplet(int);
|
|
void setSubdiv(int);
|
|
void setXZoom(qreal);
|
|
void setPos(const Pos&);
|
|
void setLevelsIndex(int index);
|
|
|
|
public:
|
|
PianoLevels(QWidget *parent = 0);
|
|
~PianoLevels();
|
|
|
|
void setScore(Score*, Pos* locator);
|
|
Staff* staff() { return _staff; }
|
|
void setStaff(Staff*, Pos* locator);
|
|
void updateNotes();
|
|
int tuplet() const { return _tuplet; }
|
|
int subdiv() const { return _subdiv; }
|
|
|
|
int xpos() const { return _xpos; }
|
|
qreal xZoom() const { return _xZoom; }
|
|
};
|
|
|
|
}
|
|
#endif // __PIANOLEVELS_H__
|