/[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 605 by capela, Fri Jun 3 10:19:42 2005 UTC revision 664 by capela, Sat Jun 18 22:44:56 2005 UTC
# Line 390  void qsamplerMainForm::customEvent ( QCu Line 390  void qsamplerMainForm::customEvent ( QCu
390          appendMessagesColor(tr("Notify event: %1 data: %2")          appendMessagesColor(tr("Notify event: %1 data: %2")
391              .arg(::lscp_event_to_text(pEvent->event()))              .arg(::lscp_event_to_text(pEvent->event()))
392              .arg(pEvent->data()), "#996699");              .arg(pEvent->data()), "#996699");
393                    if (pEvent->event() == LSCP_EVENT_CHANNEL_INFO) {
394                            int iChannelID = pEvent->data().toInt();
395                            qsamplerChannelStrip *pChannelStrip = channelStrip(iChannelID);
396                            if (pChannelStrip)
397                                    channelStripChanged(pChannelStrip);
398                    }
399      }      }
400  }  }
401    
# Line 1633  void qsamplerMainForm::updateMessagesLim Line 1639  void qsamplerMainForm::updateMessagesLim
1639          if (m_pOptions->bMessagesLimit)          if (m_pOptions->bMessagesLimit)
1640              m_pMessages->setMessagesLimit(m_pOptions->iMessagesLimitLines);              m_pMessages->setMessagesLimit(m_pOptions->iMessagesLimitLines);
1641          else          else
1642              m_pMessages->setMessagesLimit(0);              m_pMessages->setMessagesLimit(-1);
1643      }      }
1644  }  }
1645    
# Line 1817  void qsamplerMainForm::timerSlot (void) Line 1823  void qsamplerMainForm::timerSlot (void)
1823          }          }
1824      }      }
1825    
1826          // Refresh each channel usage, on each period...          if (m_pClient) {
1827          if (m_pClient && (m_changedStrips.count() > 0 || m_pOptions->bAutoRefresh)) {                  // Update the channel information for each pending strip...
1828                  m_iTimerSlot += QSAMPLER_TIMER_MSECS;                  if (m_changedStrips.count() > 0) {
                 if (m_iTimerSlot >= m_pOptions->iAutoRefreshTime && m_pWorkspace->isUpdatesEnabled())  {  
                         m_iTimerSlot = 0;  
                         // Update the channel information for each pending strip...  
1829                          for (qsamplerChannelStrip *pChannelStrip = m_changedStrips.first();                          for (qsamplerChannelStrip *pChannelStrip = m_changedStrips.first();
1830                                          pChannelStrip;                                          pChannelStrip; pChannelStrip = m_changedStrips.next()) {
                                                 pChannelStrip = m_changedStrips.next()) {  
1831                                  // If successfull, remove from pending list...                                  // If successfull, remove from pending list...
1832                                  if (pChannelStrip->updateChannelInfo())                                  if (pChannelStrip->updateChannelInfo())
1833                                          m_changedStrips.remove(pChannelStrip);                                          m_changedStrips.remove(pChannelStrip);
1834                          }                          }
1835                          // Update the channel stream usage for each strip...                  }
1836                          QWidgetList wlist = m_pWorkspace->windowList();                  // Refresh each channel usage, on each period...
1837                          for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) {                  if (m_pOptions->bAutoRefresh) {
1838                                  qsamplerChannelStrip *pChannelStrip = (qsamplerChannelStrip *) wlist.at(iChannel);                          m_iTimerSlot += QSAMPLER_TIMER_MSECS;
1839                                  if (pChannelStrip && pChannelStrip->isVisible())                          if (m_iTimerSlot >= m_pOptions->iAutoRefreshTime)  {
1840                                          pChannelStrip->updateChannelUsage();                                  m_iTimerSlot = 0;
1841                                    // Update the channel stream usage for each strip...
1842                                    QWidgetList wlist = m_pWorkspace->windowList();
1843                                    for (int iChannel = 0;
1844                                                    iChannel < (int) wlist.count(); iChannel++) {
1845                                            qsamplerChannelStrip *pChannelStrip
1846                                                    = (qsamplerChannelStrip *) wlist.at(iChannel);
1847                                            if (pChannelStrip && pChannelStrip->isVisible())
1848                                                    pChannelStrip->updateChannelUsage();
1849                                    }
1850                          }                          }
1851                  }                  }
1852          }          }
# Line 2019  bool qsamplerMainForm::startClient (void Line 2030  bool qsamplerMainForm::startClient (void
2030      ::lscp_client_set_timeout(m_pClient, m_pOptions->iServerTimeout);      ::lscp_client_set_timeout(m_pClient, m_pOptions->iServerTimeout);
2031      appendMessages(tr("Client receive timeout is set to %1 msec.").arg(::lscp_client_get_timeout(m_pClient)));      appendMessages(tr("Client receive timeout is set to %1 msec.").arg(::lscp_client_get_timeout(m_pClient)));
2032    
2033            // Subscribe to channel info change notifications...
2034            if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_CHANNEL_INFO) != LSCP_OK)
2035                    appendMessagesClient("lscp_client_subscribe");
2036    
2037      // We may stop scheduling around.      // We may stop scheduling around.
2038      stopSchedule();      stopSchedule();
2039    
# Line 2032  bool qsamplerMainForm::startClient (void Line 2047  bool qsamplerMainForm::startClient (void
2047          // if visible, that we're ready...          // if visible, that we're ready...
2048          if (m_pDeviceForm && m_pDeviceForm->isVisible())          if (m_pDeviceForm && m_pDeviceForm->isVisible())
2049              m_pDeviceForm->setClient(m_pClient);              m_pDeviceForm->setClient(m_pClient);
2050                
2051      // Is any session pending to be loaded?      // Is any session pending to be loaded?
2052      if (!m_pOptions->sSessionFile.isEmpty()) {      if (!m_pOptions->sSessionFile.isEmpty()) {
2053          // Just load the prabably startup session...          // Just load the prabably startup session...
# Line 2074  void qsamplerMainForm::stopClient (void) Line 2089  void qsamplerMainForm::stopClient (void)
2089      closeSession(false);      closeSession(false);
2090    
2091      // Close us as a client...      // Close us as a client...
2092      lscp_client_destroy(m_pClient);          ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_INFO);
2093        ::lscp_client_destroy(m_pClient);
2094      m_pClient = NULL;      m_pClient = NULL;
2095    
2096      // Log final here.      // Log final here.

Legend:
Removed from v.605  
changed lines
  Added in v.664

  ViewVC Help
Powered by ViewVC