/[svn]/qsampler/trunk/src/qsamplerChannelForm.ui.h
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerChannelForm.ui.h

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

revision 341 by capela, Tue Jan 18 11:29:01 2005 UTC revision 430 by capela, Tue Mar 8 17:23:29 2005 UTC
# Line 26  Line 26 
26  #include <qfileinfo.h>  #include <qfileinfo.h>
27  #include <qlistbox.h>  #include <qlistbox.h>
28    
29    #include "qsamplerDevice.h"
30    
31  #include "config.h"  #include "config.h"
32    
33    
# Line 88  void qsamplerChannelForm::setup ( qsampl Line 90  void qsamplerChannelForm::setup ( qsampl
90      else m_pChannel->appendMessagesClient("lscp_get_available_engines");      else m_pChannel->appendMessagesClient("lscp_get_available_engines");
91    
92      // Populate Audio output type list.      // Populate Audio output type list.
93      const char **ppszAudioDrivers = ::lscp_get_available_audio_drivers(m_pChannel->client());      AudioDriverComboBox->clear();
94      if (ppszAudioDrivers) {      AudioDriverComboBox->insertStringList(
95          AudioDriverComboBox->clear();                  qsamplerDevice::getDrivers(m_pChannel->client(), qsamplerDevice::Audio));
         for (int iAudioDriver = 0; ppszAudioDrivers[iAudioDriver]; iAudioDriver++)  
             AudioDriverComboBox->insertItem(ppszAudioDrivers[iAudioDriver]);  
     }  
     else m_pChannel->appendMessagesClient("lscp_get_available_audio_drivers");  
96    
97      // Populate MIDI input type list.      // Populate MIDI input type list.
98      const char **ppszMidiDrivers = ::lscp_get_available_midi_drivers(m_pChannel->client());      MidiDriverComboBox->clear();
99      if (ppszMidiDrivers) {      MidiDriverComboBox->insertStringList(
100          MidiDriverComboBox->clear();                  qsamplerDevice::getDrivers(m_pChannel->client(), qsamplerDevice::Midi));
         for (int iMidiDriver = 0; ppszMidiDrivers[iMidiDriver]; iMidiDriver++)  
             MidiDriverComboBox->insertItem(ppszMidiDrivers[iMidiDriver]);  
     }  
     else m_pChannel->appendMessagesClient("lscp_get_available_midi_drivers");  
101    
102      // Read proper channel information,      // Read proper channel information,
103      // and populate the channel form fields.      // and populate the channel form fields.
104    
105      // Engine name...      // Engine name...
106      QString sEngineName = pChannel->engineName();      QString sEngineName = pChannel->engineName();
107      if (sEngineName.isEmpty() && bNew)      if (sEngineName.isEmpty() || bNew)
108          sEngineName = pOptions->sEngineName;          sEngineName = pOptions->sEngineName;
109      if (sEngineName.isEmpty())      if (sEngineName.isEmpty())
110          sEngineName = tr("(No engine)");          sEngineName = qsamplerChannel::noEngineName();
111      if (EngineNameComboBox->listBox()->findItem(sEngineName, Qt::ExactMatch) == NULL)      if (EngineNameComboBox->listBox()->findItem(sEngineName, Qt::ExactMatch) == NULL)
112          EngineNameComboBox->insertItem(sEngineName);          EngineNameComboBox->insertItem(sEngineName);
113      EngineNameComboBox->setCurrentText(sEngineName);      EngineNameComboBox->setCurrentText(sEngineName);
114      // Instrument filename and index...      // Instrument filename and index...
115      QString sInstrumentFile = pChannel->instrumentFile();      QString sInstrumentFile = pChannel->instrumentFile();
116      if (sInstrumentFile.isEmpty())      if (sInstrumentFile.isEmpty())
117          sInstrumentFile = tr("(No instrument)");          sInstrumentFile = qsamplerChannel::noInstrumentName();
118      InstrumentFileComboBox->setCurrentText(sInstrumentFile);      InstrumentFileComboBox->setCurrentText(sInstrumentFile);
119      InstrumentNrComboBox->clear();      InstrumentNrComboBox->clear();
120      InstrumentNrComboBox->insertStringList(qsamplerChannel::getInstrumentList(sInstrumentFile));      InstrumentNrComboBox->insertStringList(
121                    qsamplerChannel::getInstrumentList(sInstrumentFile,
122                    pOptions->bInstrumentNames));
123      InstrumentNrComboBox->setCurrentItem(pChannel->instrumentNr());      InstrumentNrComboBox->setCurrentItem(pChannel->instrumentNr());
124      // MIDI input driver...      // MIDI input driver...
125      QString sMidiDriver = pChannel->midiDriver();      QString sMidiDriver = pChannel->midiDriver();
# Line 151  void qsamplerChannelForm::setup ( qsampl Line 147  void qsamplerChannelForm::setup ( qsampl
147              AudioDriverComboBox->insertItem(sAudioDriver);              AudioDriverComboBox->insertItem(sAudioDriver);
148          AudioDriverComboBox->setCurrentText(sAudioDriver);          AudioDriverComboBox->setCurrentText(sAudioDriver);
149      }      }
150            // As convenient, make it ready on stabilizeForm() for
151            // prompt acceptance, if we got the minimum required...
152            if (sEngineName != qsamplerChannel::noEngineName() &&
153                    sInstrumentFile != qsamplerChannel::noInstrumentName())
154                    m_iDirtyCount++;
155            // FIXME: These are better leave diabled...
156        MidiPortTextLabel->setEnabled(false);
157        MidiPortSpinBox->setEnabled(false);
158      // Done.      // Done.
159      m_iDirtySetup--;      m_iDirtySetup--;
160      stabilizeForm();      stabilizeForm();
# Line 268  void qsamplerChannelForm::updateInstrume Line 272  void qsamplerChannelForm::updateInstrume
272      // to retrieve the REAL instrument names.      // to retrieve the REAL instrument names.
273      InstrumentNrComboBox->clear();      InstrumentNrComboBox->clear();
274      InstrumentNrComboBox->insertStringList(      InstrumentNrComboBox->insertStringList(
275          qsamplerChannel::getInstrumentList(InstrumentFileComboBox->currentText())          qsamplerChannel::getInstrumentList(
276                            InstrumentFileComboBox->currentText(),
277                            pOptions->bInstrumentNames)
278      );      );
279    
280      optionsChanged();      optionsChanged();

Legend:
Removed from v.341  
changed lines
  Added in v.430

  ViewVC Help
Powered by ViewVC