33 |
// Needed for lroundf() |
// Needed for lroundf() |
34 |
#include <math.h> |
#include <math.h> |
35 |
|
|
|
|
|
|
namespace QSampler { |
|
|
|
|
36 |
#ifndef CONFIG_ROUND |
#ifndef CONFIG_ROUND |
37 |
static inline long lroundf ( float x ) |
static inline long lroundf ( float x ) |
38 |
{ |
{ |
43 |
} |
} |
44 |
#endif |
#endif |
45 |
|
|
46 |
|
|
47 |
|
namespace QSampler { |
48 |
|
|
49 |
InstrumentForm::InstrumentForm ( QWidget* pParent ) |
InstrumentForm::InstrumentForm ( QWidget* pParent ) |
50 |
: QDialog(pParent) |
: QDialog(pParent) |
51 |
{ |
{ |
165 |
iMap = 0; |
iMap = 0; |
166 |
const QString& sMapName = qsamplerInstrument::getMapName(iMap); |
const QString& sMapName = qsamplerInstrument::getMapName(iMap); |
167 |
if (!sMapName.isEmpty()) { |
if (!sMapName.isEmpty()) { |
168 |
m_ui.MapComboBox->setItemText( |
m_ui.MapComboBox->setCurrentIndex( |
169 |
m_ui.MapComboBox->currentIndex(), |
m_ui.MapComboBox->findText(sMapName, |
170 |
sMapName); |
Qt::MatchExactly | Qt::MatchCaseSensitive)); |
171 |
} |
} |
172 |
|
|
173 |
// It might be no maps around... |
// It might be no maps around... |
174 |
bool bMapEnabled = (m_ui.MapComboBox->count() > 0); |
bool bMapEnabled = (m_ui.MapComboBox->count() > 0); |
175 |
m_ui.MapTextLabel->setEnabled(bMapEnabled); |
m_ui.MapTextLabel->setEnabled(bMapEnabled); |