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

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

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

revision 400 by capela, Mon Feb 21 15:02:58 2005 UTC revision 409 by capela, Thu Feb 24 12:10:54 2005 UTC
# Line 305  bool qsamplerMainForm::decodeDragFiles ( Line 305  bool qsamplerMainForm::decodeDragFiles (
305          if (bDecode) {          if (bDecode) {
306              files = QStringList::split('\n', sText);              files = QStringList::split('\n', sText);
307              for (QStringList::Iterator iter = files.begin(); iter != files.end(); iter++)              for (QStringList::Iterator iter = files.begin(); iter != files.end(); iter++)
308                  *iter = (*iter).stripWhiteSpace().replace(QRegExp("^file:"), QString::null);                  *iter = QUrl((*iter).stripWhiteSpace().replace(QRegExp("^file:"), QString::null)).path();
309          }          }
310      }      }
311    
# Line 329  void qsamplerMainForm::dropEvent ( QDrop Line 329  void qsamplerMainForm::dropEvent ( QDrop
329          return;          return;
330    
331      for (QStringList::Iterator iter = files.begin(); iter != files.end(); iter++) {      for (QStringList::Iterator iter = files.begin(); iter != files.end(); iter++) {
332                  const QString& sPath = QUrl(*iter).path();                  const QString& sPath = *iter;
333                  if (qsamplerChannel::isInstrumentFile(sPath)) {                  if (qsamplerChannel::isInstrumentFile(sPath)) {
334                          // Try to create a new channel from instrument file...                          // Try to create a new channel from instrument file...
335                      qsamplerChannel *pChannel = new qsamplerChannel(this);                      qsamplerChannel *pChannel = new qsamplerChannel(this);
# Line 647  bool qsamplerMainForm::saveSessionFile ( Line 647  bool qsamplerMainForm::saveSessionFile (
647          if (pChannelStrip) {          if (pChannelStrip) {
648              qsamplerChannel *pChannel = pChannelStrip->channel();              qsamplerChannel *pChannel = pChannelStrip->channel();
649              if (pChannel) {              if (pChannel) {
650                  int iChannelID = pChannel->channelID();                  ts << "# Channel " << iChannel << endl;
                 ts << "# " << pChannelStrip->caption() << endl;  
651                  ts << "ADD CHANNEL" << endl;                  ts << "ADD CHANNEL" << endl;
652                  ts << "SET CHANNEL AUDIO_OUTPUT_TYPE " << iChannelID << " " << pChannel->audioDriver() << endl;                  ts << "SET CHANNEL AUDIO_OUTPUT_TYPE " << iChannel << " " << pChannel->audioDriver() << endl;
653                  ts << "SET CHANNEL MIDI_INPUT_TYPE " << iChannelID << " " << pChannel->midiDriver() << endl;                  ts << "SET CHANNEL MIDI_INPUT_TYPE " << iChannel << " " << pChannel->midiDriver() << endl;
654                  ts << "SET CHANNEL MIDI_INPUT_PORT " << iChannelID << " " << pChannel->midiPort() << endl;              //  ts << "SET CHANNEL MIDI_INPUT_PORT " << iChannel << " " << pChannel->midiPort() << endl;
655                  ts << "SET CHANNEL MIDI_INPUT_CHANNEL " << iChannelID << " ";                  ts << "SET CHANNEL MIDI_INPUT_CHANNEL " << iChannel << " ";
656                  if (pChannel->midiChannel() == LSCP_MIDI_CHANNEL_ALL)                  if (pChannel->midiChannel() == LSCP_MIDI_CHANNEL_ALL)
657                      ts << "ALL";                      ts << "ALL";
658                  else                  else
659                      ts << pChannel->midiChannel();                      ts << pChannel->midiChannel();
660                  ts << endl;                  ts << endl;
661                  ts << "LOAD ENGINE " << pChannel->engineName() << " " << iChannelID << endl;                  ts << "LOAD ENGINE " << pChannel->engineName() << " " << iChannel << endl;
662                  ts << "LOAD INSTRUMENT NON_MODAL '" << pChannel->instrumentFile() << "' " << pChannel->instrumentNr() << " " << iChannelID << endl;                  ts << "LOAD INSTRUMENT NON_MODAL '" << pChannel->instrumentFile() << "' " << pChannel->instrumentNr() << " " << iChannel << endl;
663                  ts << "SET CHANNEL VOLUME " << iChannelID << " " << pChannel->volume() << endl;                  ts << "SET CHANNEL VOLUME " << iChannel << " " << pChannel->volume() << endl;
664                  ts << endl;                  ts << endl;
665              }              }
666          }          }
# Line 910  void qsamplerMainForm::editResetChannel Line 909  void qsamplerMainForm::editResetChannel
909  }  }
910    
911    
912    // Reset all sampler channels.
913    void qsamplerMainForm::editResetAllChannels (void)
914    {
915        if (m_pClient == NULL)
916            return;
917    
918        // Invoque the channel strip procedure,
919            // for all channels out there...
920        m_pWorkspace->setUpdatesEnabled(false);
921        QWidgetList wlist = m_pWorkspace->windowList();
922        for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) {
923            qsamplerChannelStrip *pChannelStrip = (qsamplerChannelStrip *) wlist.at(iChannel);
924            if (pChannelStrip)
925                    pChannelStrip->channelReset();
926        }
927        m_pWorkspace->setUpdatesEnabled(true);
928    }
929    
930    
931  //-------------------------------------------------------------------------  //-------------------------------------------------------------------------
932  // qsamplerMainForm -- View Action slots.  // qsamplerMainForm -- View Action slots.
933    
# Line 1169  void qsamplerMainForm::stabilizeForm (vo Line 1187  void qsamplerMainForm::stabilizeForm (vo
1187      editRemoveChannelAction->setEnabled(bHasChannel);      editRemoveChannelAction->setEnabled(bHasChannel);
1188      editSetupChannelAction->setEnabled(bHasChannel);      editSetupChannelAction->setEnabled(bHasChannel);
1189      editResetChannelAction->setEnabled(bHasChannel);      editResetChannelAction->setEnabled(bHasChannel);
1190        editResetAllChannelsAction->setEnabled(bHasChannel);
1191      channelsArrangeAction->setEnabled(bHasChannel);      channelsArrangeAction->setEnabled(bHasChannel);
1192      viewMessagesAction->setOn(m_pMessages && m_pMessages->isVisible());      viewMessagesAction->setOn(m_pMessages && m_pMessages->isVisible());
1193    

Legend:
Removed from v.400  
changed lines
  Added in v.409

  ViewVC Help
Powered by ViewVC