/[svn]/qsampler/trunk/src/qsamplerMainForm.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerMainForm.cpp

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

revision 1698 by schoenebeck, Sat Feb 16 19:41:05 2008 UTC revision 1699 by schoenebeck, Sun Feb 17 10:46:17 2008 UTC
# Line 482  bool MainForm::queryClose (void) Line 482  bool MainForm::queryClose (void)
482    
483  void MainForm::closeEvent ( QCloseEvent *pCloseEvent )  void MainForm::closeEvent ( QCloseEvent *pCloseEvent )
484  {  {
485          if (queryClose())          if (queryClose()) {
486                    DeviceStatusForm::deleteAllInstances();
487                  pCloseEvent->accept();                  pCloseEvent->accept();
488          else          } else
489                  pCloseEvent->ignore();                  pCloseEvent->ignore();
490  }  }
491    
# Line 561  void MainForm::customEvent(QEvent* pCust Line 562  void MainForm::customEvent(QEvent* pCust
562                                  break;                                  break;
563                          }                          }
564                          case LSCP_EVENT_MIDI_INPUT_DEVICE_COUNT:                          case LSCP_EVENT_MIDI_INPUT_DEVICE_COUNT:
565                                    if (m_pDeviceForm) m_pDeviceForm->refreshDevices();
566                                  DeviceStatusForm::onDevicesChanged();                                  DeviceStatusForm::onDevicesChanged();
567                                  updateViewMidiDeviceStatusMenu();                                  updateViewMidiDeviceStatusMenu();
568                                  break; //TODO: refresh device dialog as well                                  break;
569                            case LSCP_EVENT_MIDI_INPUT_DEVICE_INFO: {
570                                    if (m_pDeviceForm) m_pDeviceForm->refreshDevices();
571                                    const int iDeviceID = pEvent->data().section(' ', 0, 0).toInt();
572                                    DeviceStatusForm::onDeviceChanged(iDeviceID);
573                                    break;
574                            }
575  #if CONFIG_LSCP_CHANNEL_MIDI  #if CONFIG_LSCP_CHANNEL_MIDI
576                          case LSCP_EVENT_CHANNEL_MIDI: {                          case LSCP_EVENT_CHANNEL_MIDI: {
577                                  const int iChannelID = pEvent->data().section(' ', 0, 0).toInt();                                  const int iChannelID = pEvent->data().section(' ', 0, 0).toInt();
# Line 2654  bool MainForm::startClient (void) Line 2662  bool MainForm::startClient (void)
2662          updateViewMidiDeviceStatusMenu();          updateViewMidiDeviceStatusMenu();
2663          if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_MIDI_INPUT_DEVICE_COUNT) != LSCP_OK)          if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_MIDI_INPUT_DEVICE_COUNT) != LSCP_OK)
2664                  appendMessagesClient("lscp_client_subscribe(MIDI_INPUT_DEVICE_COUNT)");                  appendMessagesClient("lscp_client_subscribe(MIDI_INPUT_DEVICE_COUNT)");
2665            if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_MIDI_INPUT_DEVICE_INFO) != LSCP_OK)
2666                    appendMessagesClient("lscp_client_subscribe(MIDI_INPUT_DEVICE_INFO)");
2667    
2668  #if CONFIG_LSCP_CHANNEL_MIDI  #if CONFIG_LSCP_CHANNEL_MIDI
2669          // Subscribe to channel MIDI data notifications...          // Subscribe to channel MIDI data notifications...
# Line 2725  void MainForm::stopClient (void) Line 2735  void MainForm::stopClient (void)
2735  #if CONFIG_LSCP_CHANNEL_MIDI  #if CONFIG_LSCP_CHANNEL_MIDI
2736          ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_MIDI);          ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_MIDI);
2737  #endif  #endif
2738            ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_MIDI_INPUT_DEVICE_INFO);
2739          ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_MIDI_INPUT_DEVICE_COUNT);          ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_MIDI_INPUT_DEVICE_COUNT);
2740          ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_INFO);          ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_INFO);
2741          ::lscp_client_destroy(m_pClient);          ::lscp_client_destroy(m_pClient);

Legend:
Removed from v.1698  
changed lines
  Added in v.1699

  ViewVC Help
Powered by ViewVC