Mercurial > hg > svgui
diff widgets/ItemEditDialog.cpp @ 944:78c152e4db95
Merge from branch tonioni
author | Chris Cannam |
---|---|
date | Mon, 20 Apr 2015 09:12:17 +0100 |
parents | 2564d0865feb |
children | c8a6fd3f9dff |
line wrap: on
line diff
--- a/widgets/ItemEditDialog.cpp Thu Jan 15 10:42:00 2015 +0000 +++ b/widgets/ItemEditDialog.cpp Mon Apr 20 09:12:17 2015 +0100 @@ -28,7 +28,7 @@ #include <float.h> // for FLT_MIN/MAX -ItemEditDialog::ItemEditDialog(int sampleRate, int options, +ItemEditDialog::ItemEditDialog(sv_samplerate_t sampleRate, int options, QString valueUnits, QWidget *parent) : QDialog(parent), m_sampleRate(sampleRate), @@ -193,19 +193,19 @@ } void -ItemEditDialog::setFrameTime(int frame) +ItemEditDialog::setFrameTime(sv_frame_t frame) { if (!m_frameTimeSpinBox) return; RealTime rt(RealTime::frame2RealTime(frame, m_sampleRate)); m_realTimeSecsSpinBox->setValue(rt.sec); m_realTimeUSecsSpinBox->setValue(rt.usec()); - m_frameTimeSpinBox->setValue(frame); + m_frameTimeSpinBox->setValue(int(frame)); m_defaultFrame = frame; m_resetButton->setEnabled(false); } -int +sv_frame_t ItemEditDialog::getFrameTime() const { return m_frameTimeSpinBox->value(); @@ -224,19 +224,19 @@ } void -ItemEditDialog::setFrameDuration(int duration) +ItemEditDialog::setFrameDuration(sv_frame_t duration) { if (!m_frameDurationSpinBox) return; RealTime rt(RealTime::frame2RealTime(duration, m_sampleRate)); m_realDurationSecsSpinBox->setValue(rt.sec); m_realDurationUSecsSpinBox->setValue(rt.usec()); - m_frameDurationSpinBox->setValue(duration); + m_frameDurationSpinBox->setValue(int(duration)); m_defaultDuration = duration; m_resetButton->setEnabled(false); } -int +sv_frame_t ItemEditDialog::getFrameDuration() const { return m_frameDurationSpinBox->value(); @@ -267,7 +267,7 @@ float ItemEditDialog::getValue() const { - return m_valueSpinBox->value(); + return float(m_valueSpinBox->value()); } void @@ -306,8 +306,8 @@ { RealTime rt = getRealTime(); rt.sec = i; - int frame = RealTime::realTime2Frame(rt, m_sampleRate); - m_frameTimeSpinBox->setValue(frame); + sv_frame_t frame = RealTime::realTime2Frame(rt, m_sampleRate); + m_frameTimeSpinBox->setValue(int(frame)); m_resetButton->setEnabled(true); } @@ -316,8 +316,8 @@ { RealTime rt = getRealTime(); rt.nsec = i * 1000; - int frame = RealTime::realTime2Frame(rt, m_sampleRate); - m_frameTimeSpinBox->setValue(frame); + sv_frame_t frame = RealTime::realTime2Frame(rt, m_sampleRate); + m_frameTimeSpinBox->setValue(int(frame)); m_resetButton->setEnabled(true); } @@ -341,8 +341,8 @@ { RealTime rt = getRealDuration(); rt.sec = i; - int frame = RealTime::realTime2Frame(rt, m_sampleRate); - m_frameDurationSpinBox->setValue(frame); + sv_frame_t frame = RealTime::realTime2Frame(rt, m_sampleRate); + m_frameDurationSpinBox->setValue(int(frame)); m_resetButton->setEnabled(true); } @@ -351,8 +351,8 @@ { RealTime rt = getRealDuration(); rt.nsec = i * 1000; - int frame = RealTime::realTime2Frame(rt, m_sampleRate); - m_frameDurationSpinBox->setValue(frame); + sv_frame_t frame = RealTime::realTime2Frame(rt, m_sampleRate); + m_frameDurationSpinBox->setValue(int(frame)); m_resetButton->setEnabled(true); }