Change zoom in SongEditor to a Slider Zoom (#6664)
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com> Co-authored-by: Alex <allejok96@gmail.com>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#ifndef LMMS_GUI_SONG_EDITOR_H
|
||||
#define LMMS_GUI_SONG_EDITOR_H
|
||||
|
||||
#include "AutomatableModel.h"
|
||||
#include "Editor.h"
|
||||
#include "TrackContainerView.h"
|
||||
|
||||
@@ -69,7 +70,6 @@ public:
|
||||
void saveSettings( QDomDocument& doc, QDomElement& element ) override;
|
||||
void loadSettings( const QDomElement& element ) override;
|
||||
|
||||
ComboBoxModel *zoomingModel() const;
|
||||
ComboBoxModel *snappingModel() const;
|
||||
float getSnapSize() const;
|
||||
QString getSnapSizeString() const;
|
||||
@@ -120,10 +120,12 @@ private:
|
||||
bool allowRubberband() const override;
|
||||
bool knifeMode() const override;
|
||||
|
||||
int calculatePixelsPerBar() const;
|
||||
int calculateZoomSliderValue(int pixelsPerBar) const;
|
||||
|
||||
int trackIndexFromSelectionPoint(int yPos);
|
||||
int indexOfTrackView(const TrackView* tv);
|
||||
|
||||
|
||||
Song * m_song;
|
||||
|
||||
QScrollBar * m_leftRightScroll;
|
||||
@@ -141,12 +143,10 @@ private:
|
||||
|
||||
PositionLine * m_positionLine;
|
||||
|
||||
ComboBoxModel* m_zoomingModel;
|
||||
IntModel* m_zoomingModel;
|
||||
ComboBoxModel* m_snappingModel;
|
||||
bool m_proportionalSnap;
|
||||
|
||||
static const QVector<float> m_zoomLevels;
|
||||
|
||||
bool m_scrollBack;
|
||||
bool m_smoothScroll;
|
||||
|
||||
@@ -158,14 +158,14 @@ private:
|
||||
QPoint m_mousePos;
|
||||
int m_rubberBandStartTrackview;
|
||||
TimePos m_rubberbandStartTimePos;
|
||||
int m_currentZoomingValue;
|
||||
int m_rubberbandPixelsPerBar; //!< pixels per bar when selection starts
|
||||
int m_trackHeadWidth;
|
||||
bool m_selectRegion;
|
||||
|
||||
friend class SongEditorWindow;
|
||||
|
||||
signals:
|
||||
void zoomingValueChanged( float );
|
||||
void pixelsPerBarChanged(float);
|
||||
} ;
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ private:
|
||||
QAction* m_selectModeAction;
|
||||
QAction* m_crtlAction;
|
||||
|
||||
ComboBox * m_zoomingComboBox;
|
||||
AutomatableSlider * m_zoomingSlider;
|
||||
ComboBox * m_snappingComboBox;
|
||||
QLabel* m_snapSizeLabel;
|
||||
|
||||
@@ -221,7 +221,6 @@ private:
|
||||
QAction* m_removeBarAction;
|
||||
};
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
Reference in New Issue
Block a user