/[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 104 by capela, Fri Jun 4 14:42:45 2004 UTC revision 161 by capela, Tue Jun 29 21:55:30 2004 UTC
# Line 87  void qsamplerChannelForm::setup ( qsampl Line 87  void qsamplerChannelForm::setup ( qsampl
87              EngineNameComboBox->insertItem(ppszEngines[iEngine]);              EngineNameComboBox->insertItem(ppszEngines[iEngine]);
88      }      }
89      else m_pChannel->appendMessagesClient("lscp_get_available_engines");      else m_pChannel->appendMessagesClient("lscp_get_available_engines");
90  /*  
91      // Populate Audio output type list.      // Populate Audio output type list.
92      const char **ppszAudioDrivers = ::lscp_get_available_audio_drivers(m_pChannel->client());      const char **ppszAudioDrivers = ::lscp_get_available_audio_drivers(m_pChannel->client());
93      if (ppszAudioDrivers) {      if (ppszAudioDrivers) {
# Line 105  void qsamplerChannelForm::setup ( qsampl Line 105  void qsamplerChannelForm::setup ( qsampl
105              MidiDriverComboBox->insertItem(ppszMidiDrivers[iMidiDriver]);              MidiDriverComboBox->insertItem(ppszMidiDrivers[iMidiDriver]);
106      }      }
107      else m_pChannel->appendMessagesClient("lscp_get_available_midi_drivers");      else m_pChannel->appendMessagesClient("lscp_get_available_midi_drivers");
108  */  
109      // Read proper channel information,      // Read proper channel information,
110      // and populate the channel form fields.      // and populate the channel form fields.
111    
112      // Engine name...      // Engine name...
113      const QString& sEngineName = pChannel->engineName();      QString sEngineName = pChannel->engineName();
114      if (!sEngineName.isEmpty()) {      if (sEngineName.isEmpty())
115          if (EngineNameComboBox->listBox()->findItem(sEngineName, Qt::ExactMatch) == NULL)          sEngineName = tr("(No engine)");
116              EngineNameComboBox->insertItem(sEngineName);      if (EngineNameComboBox->listBox()->findItem(sEngineName, Qt::ExactMatch) == NULL)
117          EngineNameComboBox->setCurrentText(sEngineName);          EngineNameComboBox->insertItem(sEngineName);
118      }      EngineNameComboBox->setCurrentText(sEngineName);
119      // Instrument filename and index...      // Instrument filename and index...
120      InstrumentFileComboBox->setCurrentText(pChannel->instrumentFile());      QString sInstrumentFile = pChannel->instrumentFile();
121        if (sInstrumentFile.isEmpty())
122            sInstrumentFile = tr("(No instrument)");
123        InstrumentFileComboBox->setCurrentText(sInstrumentFile);
124      InstrumentNrSpinBox->setValue(pChannel->instrumentNr());      InstrumentNrSpinBox->setValue(pChannel->instrumentNr());
125      // MIDI input...      // MIDI input...
126      const QString& sMidiDriver = pChannel->midiDriver();      const QString& sMidiDriver = pChannel->midiDriver();
# Line 135  void qsamplerChannelForm::setup ( qsampl Line 138  void qsamplerChannelForm::setup ( qsampl
138              AudioDriverComboBox->insertItem(sAudioDriver);              AudioDriverComboBox->insertItem(sAudioDriver);
139          AudioDriverComboBox->setCurrentText(sAudioDriver);          AudioDriverComboBox->setCurrentText(sAudioDriver);
140      }      }
     // FIXME: Disable this while we don't know what to do.  
     MidiPortTextLabel->setEnabled(false);  
     MidiPortSpinBox->setEnabled(false);  
141      // Done.      // Done.
142      m_iDirtySetup--;      m_iDirtySetup--;
143      stabilizeForm();      stabilizeForm();
# Line 157  void qsamplerChannelForm::accept (void) Line 157  void qsamplerChannelForm::accept (void)
157      // We'll go for it!      // We'll go for it!
158      if (m_iDirtyCount > 0) {      if (m_iDirtyCount > 0) {
159          int iErrors = 0;          int iErrors = 0;
160          // Engine name...          // Audio output driver type...
161          if (!m_pChannel->loadEngine(EngineNameComboBox->currentText()))          if (!m_pChannel->setAudioDriver(AudioDriverComboBox->currentText()))
162              iErrors++;              iErrors++;
163          // MIDI input driver type...          // MIDI input driver type...
164          if (!m_pChannel->setMidiDriver(MidiDriverComboBox->currentText()))          if (!m_pChannel->setMidiDriver(MidiDriverComboBox->currentText()))
# Line 169  void qsamplerChannelForm::accept (void) Line 169  void qsamplerChannelForm::accept (void)
169          // MIDI input channel...          // MIDI input channel...
170          if (!m_pChannel->setMidiChannel(MidiChannelSpinBox->value()))          if (!m_pChannel->setMidiChannel(MidiChannelSpinBox->value()))
171              iErrors++;              iErrors++;
172          // Audio output driver type...          // Engine name...
173          if (!m_pChannel->setAudioDriver(AudioDriverComboBox->currentText()))          if (!m_pChannel->loadEngine(EngineNameComboBox->currentText()))
174              iErrors++;              iErrors++;
175          // Instrument file and index...          // Instrument file and index...
176          if (!m_pChannel->loadInstrument(InstrumentFileComboBox->currentText(), InstrumentNrSpinBox->value()))          if (!m_pChannel->loadInstrument(InstrumentFileComboBox->currentText(), InstrumentNrSpinBox->value()))
# Line 265  void qsamplerChannelForm::optionsChanged Line 265  void qsamplerChannelForm::optionsChanged
265  // Stabilize current form state.  // Stabilize current form state.
266  void qsamplerChannelForm::stabilizeForm (void)  void qsamplerChannelForm::stabilizeForm (void)
267  {  {
268      const QString sFilename = InstrumentFileComboBox->currentText();      const QString& sFilename = InstrumentFileComboBox->currentText();
269      OkPushButton->setEnabled(m_iDirtyCount > 0 && !sFilename.isEmpty() && QFileInfo(sFilename).exists());      OkPushButton->setEnabled(m_iDirtyCount > 0 && !sFilename.isEmpty() && QFileInfo(sFilename).exists());
270  }  }
271    

Legend:
Removed from v.104  
changed lines
  Added in v.161

  ViewVC Help
Powered by ViewVC