piano roll improvements, especially with moving notes around. see changelog.
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1871 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -91,7 +91,11 @@ public:
|
||||
note( const note & _note );
|
||||
virtual ~note();
|
||||
|
||||
void setSelected( const bool selected );
|
||||
void setSelected( const bool _selected );
|
||||
void setOldKey( const int _oldKey );
|
||||
void setOldPos( const midiTime & _oldPos );
|
||||
void setOldLength( const midiTime & _oldLength );
|
||||
|
||||
void setLength( const midiTime & _length );
|
||||
void setPos( const midiTime & _pos );
|
||||
void setKey( const int _key );
|
||||
@@ -107,10 +111,25 @@ public:
|
||||
return (bool) ((int) ( *lhs ).pos() < (int) ( *rhs ).pos());
|
||||
}
|
||||
|
||||
inline bool getSelected( void ) const
|
||||
inline bool selected( void ) const
|
||||
{
|
||||
return m_selected;
|
||||
}
|
||||
|
||||
inline int oldKey( void ) const
|
||||
{
|
||||
return m_oldKey;
|
||||
}
|
||||
|
||||
inline midiTime oldPos( void ) const
|
||||
{
|
||||
return m_oldPos;
|
||||
}
|
||||
|
||||
inline midiTime oldLength( void ) const
|
||||
{
|
||||
return m_oldLength;
|
||||
}
|
||||
|
||||
inline midiTime endPos( void ) const
|
||||
{
|
||||
@@ -190,7 +209,12 @@ private:
|
||||
ChangePosition
|
||||
} ;*/
|
||||
|
||||
bool m_selected; // for piano roll editing
|
||||
// for piano roll editing
|
||||
bool m_selected;
|
||||
int m_oldKey;
|
||||
midiTime m_oldPos;
|
||||
midiTime m_oldLength;
|
||||
|
||||
int m_key;
|
||||
volume m_volume;
|
||||
panning m_panning;
|
||||
|
||||
@@ -118,7 +118,6 @@ protected slots:
|
||||
void drawButtonToggled( void );
|
||||
void eraseButtonToggled( void );
|
||||
void selectButtonToggled( void );
|
||||
void moveButtonToggled( void );
|
||||
|
||||
void copySelectedNotes( void );
|
||||
void cutSelectedNotes( void );
|
||||
@@ -170,6 +169,8 @@ private:
|
||||
void shiftPos(int amount);
|
||||
void shiftSemiTone(int amount);
|
||||
bool isSelection() const;
|
||||
|
||||
void dragNotes( int x, int y, bool alt );
|
||||
|
||||
static const int cm_scrollAmtHoriz = 10;
|
||||
static const int cm_scrollAmtVert = 1;
|
||||
@@ -225,10 +226,25 @@ private:
|
||||
int m_selectedTick;
|
||||
int m_selectStartKey;
|
||||
int m_selectedKeys;
|
||||
|
||||
int m_moveStartKey;
|
||||
int m_moveStartTick;
|
||||
int m_moveXOffset;
|
||||
|
||||
// boundary box around all selected notes when dragging
|
||||
int m_moveBoundaryLeft;
|
||||
int m_moveBoundaryTop;
|
||||
int m_moveBoundaryRight;
|
||||
int m_moveBoundaryBottom;
|
||||
|
||||
// remember where the scrolling started when dragging so that
|
||||
// we can handle dragging while scrolling with arrow keys
|
||||
int m_mouseDownKey;
|
||||
int m_mouseDownTick;
|
||||
|
||||
// remember the last x and y of a mouse movement
|
||||
int m_lastMouseX;
|
||||
int m_lastMouseY;
|
||||
|
||||
// x,y of when the user starts a drag
|
||||
int m_moveStartX;
|
||||
int m_moveStartY;
|
||||
|
||||
int m_notesEditHeight;
|
||||
int m_ppt;
|
||||
@@ -239,9 +255,6 @@ private:
|
||||
int m_startKey; // first key when drawing
|
||||
int m_lastKey;
|
||||
|
||||
noteVector m_selNotesForMove;
|
||||
|
||||
|
||||
editModes m_editMode;
|
||||
editModes m_ctrlMode; // mode they were in before they hit ctrl
|
||||
|
||||
|
||||
Reference in New Issue
Block a user