/[svn]/qsampler/trunk/src/qsamplerInstrumentListForm.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerInstrumentListForm.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1509 by capela, Thu Nov 22 11:10:44 2007 UTC revision 1526 by capela, Mon Nov 26 10:58:23 2007 UTC
# Line 20  Line 20 
20    
21  *****************************************************************************/  *****************************************************************************/
22    
23    #include "qsamplerAbout.h"
24  #include "qsamplerInstrumentListForm.h"  #include "qsamplerInstrumentListForm.h"
25    
26  #include "qsamplerInstrumentForm.h"  #include "qsamplerInstrumentForm.h"
27  #include "qsamplerMainForm.h"  
28  #include "qsamplerOptions.h"  #include "qsamplerOptions.h"
29  #include "qsamplerInstrument.h"  #include "qsamplerInstrument.h"
30    #include "qsamplerMainForm.h"
31    
32    #include <QHeaderView>
33    
34    
35  namespace QSampler {  namespace QSampler {
# Line 50  InstrumentListForm::InstrumentListForm ( Line 54  InstrumentListForm::InstrumentListForm (
54          m_ui.InstrumentToolbar->addSeparator();          m_ui.InstrumentToolbar->addSeparator();
55          m_ui.InstrumentToolbar->addAction(m_ui.refreshInstrumentsAction);          m_ui.InstrumentToolbar->addAction(m_ui.refreshInstrumentsAction);
56    
57            int iRowHeight = m_ui.InstrumentTable->fontMetrics().height() + 4;
58            m_ui.InstrumentTable->verticalHeader()->setDefaultSectionSize(iRowHeight);
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();
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)),
# Line 206  void InstrumentListForm::editInstrument Line 227  void InstrumentListForm::editInstrument
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...

Legend:
Removed from v.1509  
changed lines
  Added in v.1526

  ViewVC Help
Powered by ViewVC