/[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 1461 by schoenebeck, Sun Oct 28 23:30:36 2007 UTC revision 1473 by capela, Mon Nov 5 19:07:26 2007 UTC
# Line 1  Line 1 
1    // qsamplerInstrumentListForm.cpp
2    //
3    /****************************************************************************
4       Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved.
5       Copyright (C) 2007, Christian Schoenebeck
6    
7       This program is free software; you can redistribute it and/or
8       modify it under the terms of the GNU General Public License
9       as published by the Free Software Foundation; either version 2
10       of the License, or (at your option) any later version.
11    
12       This program is distributed in the hope that it will be useful,
13       but WITHOUT ANY WARRANTY; without even the implied warranty of
14       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15       GNU General Public License for more details.
16    
17       You should have received a copy of the GNU General Public License
18       along with this program; if not, write to the Free Software
19       Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20    
21    *****************************************************************************/
22    
23  #include "qsamplerInstrumentListForm.h"  #include "qsamplerInstrumentListForm.h"
24    
25  #include "qsamplerMainForm.h"  #include "qsamplerMainForm.h"
# Line 8  Line 30 
30    
31  namespace QSampler {  namespace QSampler {
32    
33  InstrumentListForm::InstrumentListForm(QWidget* parent, Qt::WindowFlags flags) : QMainWindow(parent, flags) {  InstrumentListForm::InstrumentListForm ( QWidget* parent, Qt::WindowFlags flags )
34            : QMainWindow(parent, flags)
35    {
36      ui.setupUi(this);      ui.setupUi(this);
37    
38      ui.newInstrumentAction->setText(tr("New &Instrument..."));      ui.newInstrumentAction->setText(tr("New &Instrument..."));
# Line 21  InstrumentListForm::InstrumentListForm(Q Line 45  InstrumentListForm::InstrumentListForm(Q
45      ui.refreshInstrumentsAction->setShortcut(Qt::Key_F5);      ui.refreshInstrumentsAction->setShortcut(Qt::Key_F5);
46    
47      // Setup toolbar widgets.      // Setup toolbar widgets.
48      InstrumentToolbar = addToolBar(tr("MIDI Instruments"));      m_pMapComboBox = new QComboBox(ui.InstrumentToolbar);
     m_pMapComboBox = new QComboBox(InstrumentToolbar);  
49      m_pMapComboBox->setMinimumWidth(120);      m_pMapComboBox->setMinimumWidth(120);
50      m_pMapComboBox->setEnabled(false);      m_pMapComboBox->setEnabled(false);
51      QToolTip::add(m_pMapComboBox, tr("Instrument Map"));      QToolTip::add(m_pMapComboBox, tr("Instrument Map"));
52        ui.InstrumentToolbar->addWidget(m_pMapComboBox);
53    
54      InstrumentToolbar->addSeparator();      ui.InstrumentToolbar->addSeparator();
55      ui.newInstrumentAction->addTo(InstrumentToolbar);      ui.newInstrumentAction->addTo(ui.InstrumentToolbar);
56      ui.editInstrumentAction->addTo(InstrumentToolbar);      ui.editInstrumentAction->addTo(ui.InstrumentToolbar);
57      ui.deleteInstrumentAction->addTo(InstrumentToolbar);      ui.deleteInstrumentAction->addTo(ui.InstrumentToolbar);
58      InstrumentToolbar->addSeparator();      ui.InstrumentToolbar->addSeparator();
59      ui.refreshInstrumentsAction->addTo(InstrumentToolbar);      ui.refreshInstrumentsAction->addTo(ui.InstrumentToolbar);
60    
61      ui.InstrumentTable->setModel(&model);      ui.InstrumentTable->setModel(&model);
62      //ui.InstrumentTable->setDelegate(delegate);      //ui.InstrumentTable->setDelegate(delegate);
# Line 41  InstrumentListForm::InstrumentListForm(Q Line 65  InstrumentListForm::InstrumentListForm(Q
65                  SIGNAL(activated(int)),                  SIGNAL(activated(int)),
66                  SLOT(activateMap(int)));                  SLOT(activateMap(int)));
67    
68      connect(          QObject::connect(
69          ui.refreshInstrumentsAction,                  ui.refreshInstrumentsAction,
70          SIGNAL(triggered()), SLOT(refreshInstruments(void))                  SIGNAL(triggered()),
71                    SLOT(refreshInstruments(void))
72      );      );
73  }  }
74    
# Line 125  void InstrumentListForm::activateMap ( i Line 150  void InstrumentListForm::activateMap ( i
150  }  }
151    
152  } // namespace QSampler  } // namespace QSampler
153    
154    
155    // end of qsamplerInstrumentListForm.cpp

Legend:
Removed from v.1461  
changed lines
  Added in v.1473

  ViewVC Help
Powered by ViewVC