/[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 302 by capela, Wed Nov 17 17:17:18 2004 UTC revision 303 by capela, Fri Nov 19 10:18:59 2004 UTC
# Line 39  Line 39 
39  void qsamplerChannelStrip::init (void)  void qsamplerChannelStrip::init (void)
40  {  {
41      // Initialize locals.      // Initialize locals.
     m_pMainForm    = NULL;  
42      m_pChannel     = NULL;      m_pChannel     = NULL;
43      m_iDirtyChange = 0;      m_iDirtyChange = 0;
44    
# Line 59  void qsamplerChannelStrip::destroy (void Line 58  void qsamplerChannelStrip::destroy (void
58    
59    
60  // Channel strip setup formal initializer.  // Channel strip setup formal initializer.
61  void qsamplerChannelStrip::setup ( qsamplerMainForm *pMainForm, int iChannelID )  void qsamplerChannelStrip::setup ( qsamplerChannel *pChannel )
62  {  {
63      // Set main form reference.      // Destroy any previous channel descriptor;
64      m_pMainForm = pMainForm;      // (remember that once setup we own it!)
       
     // Destroy any previous channel descriptor.  
65      if (m_pChannel)      if (m_pChannel)
66          delete m_pChannel;          delete m_pChannel;
67    
68      // Create a new one...      // Set the new one...
69      m_pChannel = new qsamplerChannel(pMainForm);      m_pChannel = pChannel;
     // And set appropriate settings.  
     if (m_pChannel && iChannelID >= 0) {  
         m_pChannel->setChannelID(iChannelID);  
         m_iDirtyChange = 0;  
     }  
70    
71      // Stabilize this around.      // Stabilize this around.
72      updateChannelInfo();      updateChannelInfo();
# Line 134  void qsamplerChannelStrip::setDisplayBac Line 126  void qsamplerChannelStrip::setDisplayBac
126  // Channel setup dialog slot.  // Channel setup dialog slot.
127  bool qsamplerChannelStrip::channelSetup (void)  bool qsamplerChannelStrip::channelSetup (void)
128  {  {
129      bool bResult = false;      bool bResult = m_pChannel->channelSetup(this);
   
     qsamplerChannelForm *pChannelForm = new qsamplerChannelForm(this);  
     if (pChannelForm) {  
         pChannelForm->setup(m_pChannel);  
         bResult = pChannelForm->exec();  
         delete pChannelForm;  
     }  
130    
131      if (bResult)      if (bResult)
132          emit channelChanged(this);          emit channelChanged(this);
# Line 306  void qsamplerChannelStrip::volumeChanged Line 291  void qsamplerChannelStrip::volumeChanged
291  // Context menu event handler.  // Context menu event handler.
292  void qsamplerChannelStrip::contextMenuEvent( QContextMenuEvent *pEvent )  void qsamplerChannelStrip::contextMenuEvent( QContextMenuEvent *pEvent )
293  {  {
294      if (m_pMainForm == NULL)      if (m_pChannel == NULL)
295          return;          return;
296                    
297      // We'll just show up the main form's edit menu.      // We'll just show up the main form's edit menu (thru qsamplerChannel).
298      m_pMainForm->contextMenuEvent(pEvent);      m_pChannel->contextMenuEvent(pEvent);
299  }  }
300    
301    

Legend:
Removed from v.302  
changed lines
  Added in v.303

  ViewVC Help
Powered by ViewVC