56 |
|
|
57 |
int iRowHeight = m_ui.InstrumentTable->fontMetrics().height() + 4; |
int iRowHeight = m_ui.InstrumentTable->fontMetrics().height() + 4; |
58 |
m_ui.InstrumentTable->verticalHeader()->setDefaultSectionSize(iRowHeight); |
m_ui.InstrumentTable->verticalHeader()->setDefaultSectionSize(iRowHeight); |
|
m_ui.InstrumentTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); |
|
59 |
|
|
60 |
m_ui.InstrumentTable->setModel(&m_model); |
m_ui.InstrumentTable->setModel(&m_model); |
61 |
m_ui.InstrumentTable->setItemDelegate(&m_delegate); |
m_ui.InstrumentTable->setItemDelegate(&m_delegate); |
62 |
m_ui.InstrumentTable->verticalHeader()->hide(); |
m_ui.InstrumentTable->verticalHeader()->hide(); |
63 |
|
|
64 |
|
QHeaderView *pHeader = m_ui.InstrumentTable->horizontalHeader(); |
65 |
|
pHeader->setDefaultAlignment(Qt::AlignLeft); |
66 |
|
pHeader->setMovable(false); |
67 |
|
pHeader->setStretchLastSection(true); |
68 |
|
pHeader->resizeSection(0, 120); // Name |
69 |
|
m_ui.InstrumentTable->resizeColumnToContents(1); // Map |
70 |
|
m_ui.InstrumentTable->resizeColumnToContents(2); // Bank |
71 |
|
m_ui.InstrumentTable->resizeColumnToContents(3); // Prog |
72 |
|
m_ui.InstrumentTable->resizeColumnToContents(4); // Engine |
73 |
|
pHeader->resizeSection(5, 240); // File |
74 |
|
m_ui.InstrumentTable->resizeColumnToContents(6); // Nr |
75 |
|
pHeader->resizeSection(7, 60); // vol |
76 |
|
|
77 |
QObject::connect(m_pMapComboBox, |
QObject::connect(m_pMapComboBox, |
78 |
SIGNAL(activated(int)), |
SIGNAL(activated(int)), |
79 |
SLOT(activateMap(int))); |
SLOT(activateMap(int))); |
227 |
if (oldInstrument.map() == pInstrument->map() && |
if (oldInstrument.map() == pInstrument->map() && |
228 |
oldInstrument.bank() == pInstrument->bank() && |
oldInstrument.bank() == pInstrument->bank() && |
229 |
oldInstrument.prog() == pInstrument->prog()) { |
oldInstrument.prog() == pInstrument->prog()) { |
230 |
// just update tree item... |
// Just update tree item... |
231 |
//pItem->update(); |
//pItem->update(); |
232 |
} else { |
} else { |
233 |
// Unmap old instance... |
// Unmap old instance... |