/[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 145 by capela, Thu Jun 24 18:26:57 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 157  void qsamplerChannelForm::accept (void) Line 160  void qsamplerChannelForm::accept (void)
160      // We'll go for it!      // We'll go for it!
161      if (m_iDirtyCount > 0) {      if (m_iDirtyCount > 0) {
162          int iErrors = 0;          int iErrors = 0;
163          // Engine name...          // Audio output driver type...
164          if (!m_pChannel->loadEngine(EngineNameComboBox->currentText()))          if (!m_pChannel->setAudioDriver(AudioDriverComboBox->currentText()))
165              iErrors++;              iErrors++;
166          // MIDI input driver type...          // MIDI input driver type...
167          if (!m_pChannel->setMidiDriver(MidiDriverComboBox->currentText()))          if (!m_pChannel->setMidiDriver(MidiDriverComboBox->currentText()))
# Line 169  void qsamplerChannelForm::accept (void) Line 172  void qsamplerChannelForm::accept (void)
172          // MIDI input channel...          // MIDI input channel...
173          if (!m_pChannel->setMidiChannel(MidiChannelSpinBox->value()))          if (!m_pChannel->setMidiChannel(MidiChannelSpinBox->value()))
174              iErrors++;              iErrors++;
175          // Audio output driver type...          // Engine name...
176          if (!m_pChannel->setAudioDriver(AudioDriverComboBox->currentText()))          if (!m_pChannel->loadEngine(EngineNameComboBox->currentText()))
177              iErrors++;              iErrors++;
178          // Instrument file and index...          // Instrument file and index...
179          if (!m_pChannel->loadInstrument(InstrumentFileComboBox->currentText(), InstrumentNrSpinBox->value()))          if (!m_pChannel->loadInstrument(InstrumentFileComboBox->currentText(), InstrumentNrSpinBox->value()))
# Line 265  void qsamplerChannelForm::optionsChanged Line 268  void qsamplerChannelForm::optionsChanged
268  // Stabilize current form state.  // Stabilize current form state.
269  void qsamplerChannelForm::stabilizeForm (void)  void qsamplerChannelForm::stabilizeForm (void)
270  {  {
271      const QString sFilename = InstrumentFileComboBox->currentText();      const QString& sFilename = InstrumentFileComboBox->currentText();
272      OkPushButton->setEnabled(m_iDirtyCount > 0 && !sFilename.isEmpty() && QFileInfo(sFilename).exists());      OkPushButton->setEnabled(m_iDirtyCount > 0 && !sFilename.isEmpty() && QFileInfo(sFilename).exists());
273  }  }
274    

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

  ViewVC Help
Powered by ViewVC