/[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 341 by capela, Tue Jan 18 11:29:01 2005 UTC revision 371 by capela, Fri Feb 11 15:36:06 2005 UTC
# Line 205  void qsamplerMainForm::setup ( qsamplerO Line 205  void qsamplerMainForm::setup ( qsamplerO
205      // We got options?      // We got options?
206      m_pOptions = pOptions;      m_pOptions = pOptions;
207    
         // Set initial instrument name display mode.  
     qsamplerChannel::setInstrumentNames(m_pOptions->bInstrumentNames);  
   
208      // Some child forms are to be created right now.      // Some child forms are to be created right now.
209      m_pMessages = new qsamplerMessages(this);      m_pMessages = new qsamplerMessages(this);
210      // Set message defaults...      // Set message defaults...
# Line 559  bool qsamplerMainForm::loadSessionFile ( Line 556  bool qsamplerMainForm::loadSessionFile (
556      if (piChannelIDs == NULL) {      if (piChannelIDs == NULL) {
557          appendMessagesClient("lscp_list_channels");          appendMessagesClient("lscp_list_channels");
558          appendMessagesError(tr("Could not get current list of channels.\n\nSorry."));          appendMessagesError(tr("Could not get current list of channels.\n\nSorry."));
559      }      } else {
560                        // Try to (re)create each channel.
561      // Try to (re)create each channel.                  m_pWorkspace->setUpdatesEnabled(false);
562      m_pWorkspace->setUpdatesEnabled(false);                  for (int iChannel = 0; piChannelIDs[iChannel] >= 0; iChannel++) {
563      for (int iChannel = 0; piChannelIDs[iChannel] >= 0; iChannel++) {                          createChannelStrip(new qsamplerChannel(this, piChannelIDs[iChannel]));
564          createChannelStrip(new qsamplerChannel(this, piChannelIDs[iChannel]));                          QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
565          QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);                  }
566      }                  m_pWorkspace->setUpdatesEnabled(true);
567      m_pWorkspace->setUpdatesEnabled(true);          }
568    
569      // Save as default session directory.      // Save as default session directory.
570      if (m_pOptions)      if (m_pOptions)
# Line 962  void qsamplerMainForm::viewOptions (void Line 959  void qsamplerMainForm::viewOptions (void
959          int     bOldMessagesLimit   = m_pOptions->bMessagesLimit;          int     bOldMessagesLimit   = m_pOptions->bMessagesLimit;
960          int     iOldMessagesLimitLines = m_pOptions->iMessagesLimitLines;          int     iOldMessagesLimitLines = m_pOptions->iMessagesLimitLines;
961          bool    bOldCompletePath    = m_pOptions->bCompletePath;          bool    bOldCompletePath    = m_pOptions->bCompletePath;
         int     iOldMaxRecentFiles  = m_pOptions->iMaxRecentFiles;  
962          bool    bOldInstrumentNames = m_pOptions->bInstrumentNames;          bool    bOldInstrumentNames = m_pOptions->bInstrumentNames;
963            int     iOldMaxRecentFiles  = m_pOptions->iMaxRecentFiles;
964          // Load the current setup settings.          // Load the current setup settings.
965          pOptionsForm->setup(m_pOptions);          pOptionsForm->setup(m_pOptions);
966          // Show the setup dialog...          // Show the setup dialog...
# Line 977  void qsamplerMainForm::viewOptions (void Line 974  void qsamplerMainForm::viewOptions (void
974                  updateMessagesCapture();                  updateMessagesCapture();
975              }              }
976              // Check wheather something immediate has changed.              // Check wheather something immediate has changed.
             if (( bOldInstrumentNames && !m_pOptions->bInstrumentNames) ||  
                 (!bOldInstrumentNames &&  m_pOptions->bInstrumentNames))  
                 qsamplerChannel::setInstrumentNames(m_pOptions->bInstrumentNames);  
977              if (( bOldCompletePath && !m_pOptions->bCompletePath) ||              if (( bOldCompletePath && !m_pOptions->bCompletePath) ||
978                  (!bOldCompletePath &&  m_pOptions->bCompletePath) ||                  (!bOldCompletePath &&  m_pOptions->bCompletePath) ||
979                  (iOldMaxRecentFiles != m_pOptions->iMaxRecentFiles))                  (iOldMaxRecentFiles != m_pOptions->iMaxRecentFiles))
980                  updateRecentFilesMenu();                  updateRecentFilesMenu();
981                if (( bOldInstrumentNames && !m_pOptions->bInstrumentNames) ||
982                    (!bOldInstrumentNames &&  m_pOptions->bInstrumentNames))
983                    updateInstrumentNames();
984              if (( bOldDisplayEffect && !m_pOptions->bDisplayEffect) ||              if (( bOldDisplayEffect && !m_pOptions->bDisplayEffect) ||
985                  (!bOldDisplayEffect &&  m_pOptions->bDisplayEffect))                  (!bOldDisplayEffect &&  m_pOptions->bDisplayEffect))
986                  updateDisplayEffect();                  updateDisplayEffect();
# Line 1227  void qsamplerMainForm::updateRecentFiles Line 1224  void qsamplerMainForm::updateRecentFiles
1224  }  }
1225    
1226    
1227    // Force update of the channels instrument names mode.
1228    void qsamplerMainForm::updateInstrumentNames (void)
1229    {
1230        // Full channel list update...
1231        QWidgetList wlist = m_pWorkspace->windowList();
1232        if (wlist.isEmpty())
1233            return;
1234    
1235        m_pWorkspace->setUpdatesEnabled(false);
1236        for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) {
1237            qsamplerChannelStrip *pChannelStrip = (qsamplerChannelStrip *) wlist.at(iChannel);
1238            if (pChannelStrip)
1239                pChannelStrip->updateInstrumentName(true);
1240        }
1241        m_pWorkspace->setUpdatesEnabled(true);
1242    }
1243    
1244    
1245  // Force update of the channels display font.  // Force update of the channels display font.
1246  void qsamplerMainForm::updateDisplayFont (void)  void qsamplerMainForm::updateDisplayFont (void)
1247  {  {

Legend:
Removed from v.341  
changed lines
  Added in v.371

  ViewVC Help
Powered by ViewVC