2 |
// |
// |
3 |
// ui.h extension file, included from the uic-generated form implementation. |
// ui.h extension file, included from the uic-generated form implementation. |
4 |
/**************************************************************************** |
/**************************************************************************** |
5 |
Copyright (C) 2004-2006, rncbc aka Rui Nuno Capela. All rights reserved. |
Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. |
6 |
|
|
7 |
This program is free software; you can redistribute it and/or |
This program is free software; you can redistribute it and/or |
8 |
modify it under the terms of the GNU General Public License |
modify it under the terms of the GNU General Public License |
130 |
// It might be no maps around... |
// It might be no maps around... |
131 |
bool bMapEnabled = (MapComboBox->count() > 0); |
bool bMapEnabled = (MapComboBox->count() > 0); |
132 |
MapTextLabel->setEnabled(bMapEnabled); |
MapTextLabel->setEnabled(bMapEnabled); |
133 |
MapComboBox->setEnabled(bNew && bMapEnabled); |
MapComboBox->setEnabled(bMapEnabled); |
134 |
|
|
135 |
// Instrument bank/program... |
// Instrument bank/program... |
136 |
int iBank = (bNew ? pOptions->iMidiBank : m_pInstrument->bank()); |
int iBank = (bNew ? pOptions->iMidiBank : m_pInstrument->bank()); |
141 |
} |
} |
142 |
BankSpinBox->setValue(iBank); |
BankSpinBox->setValue(iBank); |
143 |
ProgSpinBox->setValue(iProg); |
ProgSpinBox->setValue(iProg); |
|
// Spacial hack to avoid changes on the key... |
|
|
if (bNew) { |
|
|
BankSpinBox->setRange(0, 16383); |
|
|
ProgSpinBox->setRange(1, 128); |
|
|
} else { |
|
|
BankSpinBox->setRange(iBank, iBank); |
|
|
ProgSpinBox->setRange(iProg, iProg); |
|
|
} |
|
144 |
|
|
145 |
// Instrument name... |
// Instrument name... |
146 |
NameLineEdit->setText(m_pInstrument->name()); |
NameLineEdit->setText(m_pInstrument->name()); |
283 |
|
|
284 |
if (m_iDirtyCount > 0) { |
if (m_iDirtyCount > 0) { |
285 |
m_pInstrument->setMap(MapComboBox->currentItem()); |
m_pInstrument->setMap(MapComboBox->currentItem()); |
|
m_pInstrument->setMap(MapComboBox->currentItem()); |
|
286 |
m_pInstrument->setBank(BankSpinBox->value()); |
m_pInstrument->setBank(BankSpinBox->value()); |
287 |
m_pInstrument->setProg(ProgSpinBox->value() - 1); |
m_pInstrument->setProg(ProgSpinBox->value() - 1); |
288 |
m_pInstrument->setName(NameLineEdit->text()); |
m_pInstrument->setName(NameLineEdit->text()); |