Fix missing scroll back when stop in Song Editor (#2423)

* Fix missing scroll back on stop in Song Editor

* Fix missing scroll back on stop in Song Editor

* Avoid scrolling the Song Editor when scrolling is disabled.

* Handle the smooth scroll in scroll back

* Remove leading underscore from fonction parameters name

* Put back spaces around parameters (Removed by mistake)
This commit is contained in:
midi-pascal
2016-05-01 04:59:52 -04:00
committed by Umcaruje
parent 96a011d396
commit 63ac551c70
3 changed files with 70 additions and 63 deletions

View File

@@ -45,10 +45,10 @@ class TimeLineWidget;
class positionLine : public QWidget
{
public:
positionLine( QWidget * _parent );
positionLine( QWidget * parent );
private:
virtual void paintEvent( QPaintEvent * _pe );
virtual void paintEvent( QPaintEvent * pe );
} ;
@@ -63,43 +63,44 @@ public:
SelectMode
};
SongEditor( Song * _song );
SongEditor( Song * song );
~SongEditor();
void saveSettings( QDomDocument& doc, QDomElement& element );
void loadSettings( const QDomElement& element );
public slots:
void scrolled( int _new_pos );
void scrolled( int new_pos );
void setEditMode(EditMode mode);
void setEditMode( EditMode mode );
void setEditModeDraw();
void setEditModeSelect();
void updatePosition( const MidiTime & t );
protected:
virtual void closeEvent( QCloseEvent * _ce );
virtual void closeEvent( QCloseEvent * ce );
private slots:
void setHighQuality( bool );
void setMasterVolume( int _new_val );
void setMasterVolume( int new_val );
void showMasterVolumeFloat();
void updateMasterVolumeFloat( int _new_val );
void updateMasterVolumeFloat( int new_val );
void hideMasterVolumeFloat();
void setMasterPitch( int _new_val );
void setMasterPitch( int new_val );
void showMasterPitchFloat();
void updateMasterPitchFloat( int _new_val );
void updateMasterPitchFloat( int new_val );
void hideMasterPitchFloat();
void updateScrollBar( int );
void updatePosition( const MidiTime & _t );
void updateScrollBar(int len);
void zoomingChanged();
private:
virtual void keyPressEvent( QKeyEvent * _ke );
virtual void wheelEvent( QWheelEvent * _we );
virtual void keyPressEvent( QKeyEvent * ke );
virtual void wheelEvent( QWheelEvent * we );
virtual bool allowRubberband() const;
@@ -136,7 +137,7 @@ class SongEditorWindow : public Editor
{
Q_OBJECT
public:
SongEditorWindow(Song* song);
SongEditorWindow( Song* song );
QSize sizeHint() const;