mirror of
https://github.com/LMMS/lmms.git
synced 2026-05-11 16:23:52 -04:00
Gui editors: Use float for zoom precision (#6008)
This fixes build errors with casts.
This commit is contained in:
@@ -174,7 +174,7 @@ private:
|
||||
ComboBoxModel m_zoomingYModel;
|
||||
ComboBoxModel m_quantizeModel;
|
||||
|
||||
static const QVector<double> m_zoomXLevels;
|
||||
static const QVector<float> m_zoomXLevels;
|
||||
|
||||
FloatModel * m_tensionModel;
|
||||
|
||||
|
||||
@@ -346,8 +346,8 @@ private:
|
||||
ComboBoxModel m_chordModel;
|
||||
ComboBoxModel m_snapModel;
|
||||
|
||||
static const QVector<double> m_zoomLevels;
|
||||
static const QVector<double> m_zoomYLevels;
|
||||
static const QVector<float> m_zoomLevels;
|
||||
static const QVector<float> m_zoomYLevels;
|
||||
|
||||
Pattern* m_pattern;
|
||||
NoteVector m_ghostNotes;
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
PositionLine(QWidget* parent);
|
||||
|
||||
public slots:
|
||||
void zoomChange(double zoom);
|
||||
void zoomChange(float zoom);
|
||||
|
||||
private:
|
||||
void paintEvent(QPaintEvent* pe) override;
|
||||
@@ -46,4 +46,4 @@ private:
|
||||
QColor m_lineColor;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -141,7 +141,7 @@ private:
|
||||
ComboBoxModel* m_snappingModel;
|
||||
bool m_proportionalSnap;
|
||||
|
||||
static const QVector<double> m_zoomLevels;
|
||||
static const QVector<float> m_zoomLevels;
|
||||
|
||||
bool m_scrollBack;
|
||||
bool m_smoothScroll;
|
||||
@@ -161,7 +161,7 @@ private:
|
||||
friend class SongEditorWindow;
|
||||
|
||||
signals:
|
||||
void zoomingValueChanged( double );
|
||||
void zoomingValueChanged( float );
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ QPixmap * AutomationEditor::s_toolMove = nullptr;
|
||||
QPixmap * AutomationEditor::s_toolYFlip = nullptr;
|
||||
QPixmap * AutomationEditor::s_toolXFlip = nullptr;
|
||||
|
||||
const QVector<double> AutomationEditor::m_zoomXLevels =
|
||||
const QVector<float> AutomationEditor::m_zoomXLevels =
|
||||
{ 0.125f, 0.25f, 0.5f, 1.0f, 2.0f, 4.0f, 8.0f };
|
||||
|
||||
|
||||
|
||||
@@ -140,10 +140,10 @@ PianoRoll::PianoRollKeyTypes PianoRoll::prKeyOrder[] =
|
||||
|
||||
const int DEFAULT_PR_PPB = DEFAULT_CELL_WIDTH * DefaultStepsPerBar;
|
||||
|
||||
const QVector<double> PianoRoll::m_zoomLevels =
|
||||
const QVector<float> PianoRoll::m_zoomLevels =
|
||||
{0.125f, 0.25f, 0.5f, 1.0f, 1.5f, 2.0f, 4.0f, 8.0f};
|
||||
|
||||
const QVector<double> PianoRoll::m_zoomYLevels =
|
||||
const QVector<float> PianoRoll::m_zoomYLevels =
|
||||
{0.25f, 0.5f, 1.0f, 1.5f, 2.0f, 2.5f, 3.0f, 4.0f};
|
||||
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
#include "ToolTip.h"
|
||||
#include "Track.h"
|
||||
|
||||
const QVector<double> SongEditor::m_zoomLevels =
|
||||
const QVector<float> SongEditor::m_zoomLevels =
|
||||
{ 0.125f, 0.25f, 0.5f, 1.0f, 2.0f, 4.0f, 8.0f, 16.0f };
|
||||
|
||||
SongEditor::SongEditor( Song * song ) :
|
||||
@@ -99,8 +99,8 @@ SongEditor::SongEditor( Song * song ) :
|
||||
|
||||
connect( m_song, SIGNAL( playbackStateChanged() ),
|
||||
m_positionLine, SLOT( update() ) );
|
||||
connect( this, SIGNAL( zoomingValueChanged( double ) ),
|
||||
m_positionLine, SLOT( zoomChange( double ) ) );
|
||||
connect( this, SIGNAL( zoomingValueChanged( float ) ),
|
||||
m_positionLine, SLOT( zoomChange( float ) ) );
|
||||
|
||||
|
||||
// add some essential widgets to global tool-bar
|
||||
|
||||
@@ -87,7 +87,7 @@ void PositionLine::paintEvent(QPaintEvent* pe)
|
||||
|
||||
// NOTE: the move() implementation fixes a bug where the position line would appear
|
||||
// in an unexpected location when positioned at the start of the track
|
||||
void PositionLine::zoomChange(double zoom)
|
||||
void PositionLine::zoomChange(float zoom)
|
||||
{
|
||||
int playHeadPos = x() + width() - 1;
|
||||
|
||||
@@ -95,4 +95,4 @@ void PositionLine::zoomChange(double zoom)
|
||||
move(playHeadPos - width() + 1, y());
|
||||
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user