comparison widgets/ItemEditDialog.cpp @ 908:4a578a360011 cxx11

More type fixes
author Chris Cannam
date Tue, 10 Mar 2015 13:22:10 +0000
parents e0f08e108064
children 2564d0865feb
comparison
equal deleted inserted replaced
907:28d05ae8741c 908:4a578a360011
198 if (!m_frameTimeSpinBox) return; 198 if (!m_frameTimeSpinBox) return;
199 199
200 RealTime rt(RealTime::frame2RealTime(frame, m_sampleRate)); 200 RealTime rt(RealTime::frame2RealTime(frame, m_sampleRate));
201 m_realTimeSecsSpinBox->setValue(rt.sec); 201 m_realTimeSecsSpinBox->setValue(rt.sec);
202 m_realTimeUSecsSpinBox->setValue(rt.usec()); 202 m_realTimeUSecsSpinBox->setValue(rt.usec());
203 m_frameTimeSpinBox->setValue(frame); 203 m_frameTimeSpinBox->setValue(int(frame));
204 m_defaultFrame = frame; 204 m_defaultFrame = frame;
205 m_resetButton->setEnabled(false); 205 m_resetButton->setEnabled(false);
206 } 206 }
207 207
208 sv_frame_t 208 sv_frame_t
229 if (!m_frameDurationSpinBox) return; 229 if (!m_frameDurationSpinBox) return;
230 230
231 RealTime rt(RealTime::frame2RealTime(duration, m_sampleRate)); 231 RealTime rt(RealTime::frame2RealTime(duration, m_sampleRate));
232 m_realDurationSecsSpinBox->setValue(rt.sec); 232 m_realDurationSecsSpinBox->setValue(rt.sec);
233 m_realDurationUSecsSpinBox->setValue(rt.usec()); 233 m_realDurationUSecsSpinBox->setValue(rt.usec());
234 m_frameDurationSpinBox->setValue(duration); 234 m_frameDurationSpinBox->setValue(int(duration));
235 m_defaultDuration = duration; 235 m_defaultDuration = duration;
236 m_resetButton->setEnabled(false); 236 m_resetButton->setEnabled(false);
237 } 237 }
238 238
239 sv_frame_t 239 sv_frame_t
265 } 265 }
266 266
267 float 267 float
268 ItemEditDialog::getValue() const 268 ItemEditDialog::getValue() const
269 { 269 {
270 return m_valueSpinBox->value(); 270 return float(m_valueSpinBox->value());
271 } 271 }
272 272
273 void 273 void
274 ItemEditDialog::setText(QString text) 274 ItemEditDialog::setText(QString text)
275 { 275 {
305 ItemEditDialog::realTimeSecsChanged(int i) 305 ItemEditDialog::realTimeSecsChanged(int i)
306 { 306 {
307 RealTime rt = getRealTime(); 307 RealTime rt = getRealTime();
308 rt.sec = i; 308 rt.sec = i;
309 sv_frame_t frame = RealTime::realTime2Frame(rt, m_sampleRate); 309 sv_frame_t frame = RealTime::realTime2Frame(rt, m_sampleRate);
310 m_frameTimeSpinBox->setValue(frame); 310 m_frameTimeSpinBox->setValue(int(frame));
311 m_resetButton->setEnabled(true); 311 m_resetButton->setEnabled(true);
312 } 312 }
313 313
314 void 314 void
315 ItemEditDialog::realTimeUSecsChanged(int i) 315 ItemEditDialog::realTimeUSecsChanged(int i)
316 { 316 {
317 RealTime rt = getRealTime(); 317 RealTime rt = getRealTime();
318 rt.nsec = i * 1000; 318 rt.nsec = i * 1000;
319 sv_frame_t frame = RealTime::realTime2Frame(rt, m_sampleRate); 319 sv_frame_t frame = RealTime::realTime2Frame(rt, m_sampleRate);
320 m_frameTimeSpinBox->setValue(frame); 320 m_frameTimeSpinBox->setValue(int(frame));
321 m_resetButton->setEnabled(true); 321 m_resetButton->setEnabled(true);
322 } 322 }
323 323
324 void 324 void
325 ItemEditDialog::frameDurationChanged(sv_frame_t i) 325 ItemEditDialog::frameDurationChanged(sv_frame_t i)
340 ItemEditDialog::realDurationSecsChanged(int i) 340 ItemEditDialog::realDurationSecsChanged(int i)
341 { 341 {
342 RealTime rt = getRealDuration(); 342 RealTime rt = getRealDuration();
343 rt.sec = i; 343 rt.sec = i;
344 sv_frame_t frame = RealTime::realTime2Frame(rt, m_sampleRate); 344 sv_frame_t frame = RealTime::realTime2Frame(rt, m_sampleRate);
345 m_frameDurationSpinBox->setValue(frame); 345 m_frameDurationSpinBox->setValue(int(frame));
346 m_resetButton->setEnabled(true); 346 m_resetButton->setEnabled(true);
347 } 347 }
348 348
349 void 349 void
350 ItemEditDialog::realDurationUSecsChanged(int i) 350 ItemEditDialog::realDurationUSecsChanged(int i)
351 { 351 {
352 RealTime rt = getRealDuration(); 352 RealTime rt = getRealDuration();
353 rt.nsec = i * 1000; 353 rt.nsec = i * 1000;
354 sv_frame_t frame = RealTime::realTime2Frame(rt, m_sampleRate); 354 sv_frame_t frame = RealTime::realTime2Frame(rt, m_sampleRate);
355 m_frameDurationSpinBox->setValue(frame); 355 m_frameDurationSpinBox->setValue(int(frame));
356 m_resetButton->setEnabled(true); 356 m_resetButton->setEnabled(true);
357 } 357 }
358 358
359 void 359 void
360 ItemEditDialog::valueChanged(double) 360 ItemEditDialog::valueChanged(double)