Mercurial > hg > svapp
comparison framework/MainWindowBase.cpp @ 436:72c662fe7ea3 cxx11
Further dedicated-types fixes
author | Chris Cannam |
---|---|
date | Tue, 10 Mar 2015 17:02:52 +0000 |
parents | 618d5816b04d |
children | 7fa74786dec5 |
comparison
equal
deleted
inserted
replaced
435:618d5816b04d | 436:72c662fe7ea3 |
---|---|
176 connect(m_viewManager, SIGNAL(inProgressSelectionChanged()), | 176 connect(m_viewManager, SIGNAL(inProgressSelectionChanged()), |
177 this, SLOT(inProgressSelectionChanged())); | 177 this, SLOT(inProgressSelectionChanged())); |
178 | 178 |
179 // set a sensible default font size for views -- cannot do this | 179 // set a sensible default font size for views -- cannot do this |
180 // in Preferences, which is in base and not supposed to use QtGui | 180 // in Preferences, which is in base and not supposed to use QtGui |
181 int viewFontSize = QApplication::font().pointSize() * 0.9; | 181 int viewFontSize = int(QApplication::font().pointSize() * 0.9); |
182 QSettings settings; | 182 QSettings settings; |
183 settings.beginGroup("Preferences"); | 183 settings.beginGroup("Preferences"); |
184 viewFontSize = settings.value("view-font-size", viewFontSize).toInt(); | 184 viewFontSize = settings.value("view-font-size", viewFontSize).toInt(); |
185 settings.setValue("view-font-size", viewFontSize); | 185 settings.setValue("view-font-size", viewFontSize); |
186 settings.endGroup(); | 186 settings.endGroup(); |
216 this, SLOT(paneDeleteButtonClicked(Pane *))); | 216 this, SLOT(paneDeleteButtonClicked(Pane *))); |
217 | 217 |
218 m_playSource = new AudioCallbackPlaySource(m_viewManager, | 218 m_playSource = new AudioCallbackPlaySource(m_viewManager, |
219 QApplication::applicationName()); | 219 QApplication::applicationName()); |
220 | 220 |
221 connect(m_playSource, SIGNAL(sampleRateMismatch(int, int, bool)), | 221 connect(m_playSource, SIGNAL(sampleRateMismatch(sv_samplerate_t, sv_samplerate_t, bool)), |
222 this, SLOT(sampleRateMismatch(int, int, bool))); | 222 this, SLOT(sampleRateMismatch(sv_samplerate_t, sv_samplerate_t, bool))); |
223 connect(m_playSource, SIGNAL(audioOverloadPluginDisabled()), | 223 connect(m_playSource, SIGNAL(audioOverloadPluginDisabled()), |
224 this, SLOT(audioOverloadPluginDisabled())); | 224 this, SLOT(audioOverloadPluginDisabled())); |
225 connect(m_playSource, SIGNAL(audioTimeStretchMultiChannelDisabled()), | 225 connect(m_playSource, SIGNAL(audioTimeStretchMultiChannelDisabled()), |
226 this, SLOT(audioTimeStretchMultiChannelDisabled())); | 226 this, SLOT(audioTimeStretchMultiChannelDisabled())); |
227 | 227 |
2378 int sw = currentPane->getVerticalScaleWidth(); | 2378 int sw = currentPane->getVerticalScaleWidth(); |
2379 if (pixels > sw * 2) pixels -= sw * 2; | 2379 if (pixels > sw * 2) pixels -= sw * 2; |
2380 else pixels = 1; | 2380 else pixels = 1; |
2381 if (pixels > 4) pixels -= 4; | 2381 if (pixels > 4) pixels -= 4; |
2382 | 2382 |
2383 int zoomLevel = (end - start) / pixels; | 2383 int zoomLevel = int((end - start) / pixels); |
2384 if (zoomLevel < 1) zoomLevel = 1; | 2384 if (zoomLevel < 1) zoomLevel = 1; |
2385 | 2385 |
2386 currentPane->setZoomLevel(zoomLevel); | 2386 currentPane->setZoomLevel(zoomLevel); |
2387 currentPane->setCentreFrame((start + end) / 2); | 2387 currentPane->setCentreFrame((start + end) / 2); |
2388 } | 2388 } |