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

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

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

revision 265 by capela, Wed Sep 29 16:05:24 2004 UTC revision 295 by capela, Tue Nov 16 15:26:18 2004 UTC
# Line 25  Line 25 
25  #include <qfileinfo.h>  #include <qfileinfo.h>
26  #include <qtooltip.h>  #include <qtooltip.h>
27  #include <qpopupmenu.h>  #include <qpopupmenu.h>
28    #include <qobjectlist.h>
29    
30  #include <math.h>  #include <math.h>
31    
# Line 70  void qsamplerChannelStrip::setup ( qsamp Line 71  void qsamplerChannelStrip::setup ( qsamp
71      // Create a new one...      // Create a new one...
72      m_pChannel = new qsamplerChannel(pMainForm);      m_pChannel = new qsamplerChannel(pMainForm);
73      // And set appropriate settings.      // And set appropriate settings.
74      if (m_pChannel) {      if (m_pChannel && iChannelID >= 0) {
75          m_pChannel->setChannelID(iChannelID);          m_pChannel->setChannelID(iChannelID);
76          m_iDirtyChange = 0;          m_iDirtyChange = 0;
77      }      }
# Line 101  void qsamplerChannelStrip::setDisplayFon Line 102  void qsamplerChannelStrip::setDisplayFon
102  }  }
103    
104    
105  // Channel setup dialog slot.  // Channel display background effect.
106  void qsamplerChannelStrip::channelSetup (void)  void qsamplerChannelStrip::setDisplayEffect ( bool bDisplayEffect )
107  {  {
108      showChannelSetup(false);      QPixmap pm;
109        if (bDisplayEffect)
110            pm = QPixmap::fromMimeSource("displaybg1.png");
111        setDisplayBackground(pm);
112  }  }
113    
114    
115  // Channel setup dialog.  // Update main display background pixmap.
116  void qsamplerChannelStrip::showChannelSetup ( bool bNew )  void qsamplerChannelStrip::setDisplayBackground ( const QPixmap& pm )
117  {  {
118        // Set the main origin...
119        ChannelInfoFrame->setPaletteBackgroundPixmap(pm);
120    
121        // Iterate for every child text label...
122        QObjectList *pList = ChannelInfoFrame->queryList("QLabel");
123        if (pList) {
124            for (QLabel *pLabel = (QLabel *) pList->first(); pLabel; pLabel = (QLabel *) pList->next())
125                pLabel->setPaletteBackgroundPixmap(pm);
126            delete pList;
127        }
128        
129        // And this standalone too.
130        StreamVoiceCountTextLabel->setPaletteBackgroundPixmap(pm);
131    }
132    
133    
134    // Channel setup dialog slot.
135    bool qsamplerChannelStrip::channelSetup (void)
136    {
137        bool bResult = false;
138    
139      qsamplerChannelForm *pChannelForm = new qsamplerChannelForm(this);      qsamplerChannelForm *pChannelForm = new qsamplerChannelForm(this);
140      if (pChannelForm) {      if (pChannelForm) {
141          pChannelForm->setup(m_pChannel, bNew);          pChannelForm->setup(m_pChannel);
142          if (pChannelForm->exec()) {          bResult = pChannelForm->exec();
             updateChannelInfo();  
             emit channelChanged(this);  
         }  
143          delete pChannelForm;          delete pChannelForm;
144      }      }
145    
146        if (bResult) {
147            updateChannelInfo();
148            emit channelChanged(this);
149        }
150    
151        return bResult;
152  }  }
153    
154    
# Line 130  void qsamplerChannelStrip::updateChannel Line 159  void qsamplerChannelStrip::updateChannel
159          return;          return;
160                    
161      // Update strip caption.      // Update strip caption.
162      QString sText = tr("Channel %1").arg(m_pChannel->channelID());      QString sText = m_pChannel->channelName();
163      setCaption(sText);      setCaption(sText);
164      ChannelSetupPushButton->setText(sText);      ChannelSetupPushButton->setText(sText);
165    
# Line 168  void qsamplerChannelStrip::updateChannel Line 197  void qsamplerChannelStrip::updateChannel
197      }      }
198    
199      // MIDI Port/Channel...      // MIDI Port/Channel...
200      if (m_pChannel->midiChannel() > 0)      if (m_pChannel->midiChannel() == LSCP_MIDI_CHANNEL_ALL)
         MidiPortChannelTextLabel->setText(QString("%1 / %2").arg(m_pChannel->midiPort()).arg(m_pChannel->midiChannel()));  
     else  
201          MidiPortChannelTextLabel->setText(QString("%1 / *").arg(m_pChannel->midiPort()));          MidiPortChannelTextLabel->setText(QString("%1 / *").arg(m_pChannel->midiPort()));
202        else
203            MidiPortChannelTextLabel->setText(QString("%1 / %2").arg(m_pChannel->midiPort()).arg(m_pChannel->midiChannel() + 1));
204    
205      // And update the both GUI volume elements.      // And update the both GUI volume elements.
206      updateChannelVolume();      updateChannelVolume();

Legend:
Removed from v.265  
changed lines
  Added in v.295

  ViewVC Help
Powered by ViewVC