--- qsampler/trunk/src/qsamplerInstrumentForm.cpp 2007/10/28 23:30:36 1461 +++ qsampler/trunk/src/qsamplerInstrumentForm.cpp 2007/11/05 20:47:38 1474 @@ -1,3 +1,25 @@ +// qsamplerInstrumentForm.cpp +// +/**************************************************************************** + Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. + Copyright (C) 2007, Christian Schoenebeck + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*****************************************************************************/ + #include "qsamplerInstrumentForm.h" #include "qsamplerAbout.h" @@ -30,6 +52,44 @@ // Try to restore normal window positioning. adjustSize(); + + + QObject::connect(ui.MapComboBox, + SIGNAL(activated(int)), + SLOT(changed())); + QObject::connect(ui.BankSpinBox, + SIGNAL(valueChanged(int)), + SLOT(changed())); + QObject::connect(ui.ProgSpinBox, + SIGNAL(valueChanged(int)), + SLOT(changed())); + QObject::connect(ui.NameLineEdit, + SIGNAL(textChanged(const QString&)), + SLOT(nameChanged(const QString&))); + QObject::connect(ui.EngineNameComboBox, + SIGNAL(activated(int)), + SLOT(changed())); + QObject::connect(ui.InstrumentFileComboBox, + SIGNAL(activated(const QString&)), + SLOT(updateInstrumentName())); + QObject::connect(ui.InstrumentFileToolButton, + SIGNAL(clicked()), + SLOT(openInstrumentFile())); + QObject::connect(ui.InstrumentNrComboBox, + SIGNAL(activated(int)), + SLOT(instrumentNrChanged())); + QObject::connect(ui.VolumeSpinBox, + SIGNAL(valueChanged(int)), + SLOT(changed())); + QObject::connect(ui.LoadModeComboBox, + SIGNAL(activated(int)), + SLOT(changed())); + QObject::connect(ui.OkPushButton, + SIGNAL(clicked()), + SLOT(accept())); + QObject::connect(ui.CancelPushButton, + SIGNAL(clicked()), + SLOT(reject())); } InstrumentForm::~InstrumentForm() { @@ -119,7 +179,7 @@ if (sEngineName.isEmpty()) sEngineName = qsamplerChannel::noEngineName(); if (ui.EngineNameComboBox->findText(sEngineName, - Qt::MatchExactly | Qt::MatchCaseSensitive) == 0) { + Qt::MatchExactly | Qt::MatchCaseSensitive) < 0) { ui.EngineNameComboBox->insertItem(sEngineName); } ui.EngineNameComboBox->setCurrentText(sEngineName); @@ -326,3 +386,6 @@ } } // namespace QSampler + + +// end of qsamplerInstrumentForm.cpp