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

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

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

revision 1464 by capela, Thu Nov 1 17:14:21 2007 UTC revision 1667 by schoenebeck, Mon Feb 4 23:24:19 2008 UTC
# Line 2  Line 2 
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.
5     Copyright (C) 2007, Christian Schoenebeck     Copyright (C) 2007, 2008 Christian Schoenebeck
6    
7     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License     modify it under the terms of the GNU General Public License
# Line 27  Line 27 
27    
28  #include "qsamplerChannel.h"  #include "qsamplerChannel.h"
29    
30  #include <QDragEnterEvent>  class QDragEnterEvent;
31    
32    
33  namespace QSampler {  namespace QSampler {
34    
35  class ChannelStrip : public QWidget {  //-------------------------------------------------------------------------
36  Q_OBJECT  // QSampler::ChannelStrip -- Channel strip form interface.
37    //
38    
39    class ChannelStrip : public QWidget
40    {
41            Q_OBJECT
42    
43  public:  public:
     ChannelStrip(QWidget* parent = 0, Qt::WFlags f = 0);  
    ~ChannelStrip();  
44    
45      void setup(qsamplerChannel* pChannel);          ChannelStrip(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0);
46      qsamplerChannel* channel();          ~ChannelStrip();
47      QFont displayFont();  
48      void setDisplayFont(const QFont& font);          void setup(Channel *pChannel);
49      void setDisplayEffect(bool bDisplayEffect);  
50      void setDisplayBackground(const QPixmap& pm);          Channel *channel() const;
51      void setMaxVolume(int iMaxVolume);  
52      bool updateInstrumentName(bool bForce);          void setDisplayFont(const QFont& font);
53      bool updateChannelVolume();          QFont displayFont() const;
54      bool updateChannelInfo();  
55      bool updateChannelUsage();          void setDisplayEffect(bool bDisplayEffect);
56      void resetErrorCount();  
57            void setMaxVolume(int iMaxVolume);
58    
59            bool updateInstrumentName(bool bForce);
60            bool updateChannelVolume();
61            bool updateChannelInfo();
62            bool updateChannelUsage();
63    
64            void resetErrorCount();
65    
66            // Channel strip activation/selection.
67            void setSelected(bool bSelected);
68            bool isSelected() const;
69    
70  signals:  signals:
71      void channelChanged(ChannelStrip*);  
72            void channelChanged(ChannelStrip*);
73    
74  public slots:  public slots:
75      bool channelSetup();  
76      bool channelMute(bool bMute);          bool channelSetup();
77      bool channelSolo(bool bSolo);          bool channelMute(bool bMute);
78      void channelEdit();          bool channelSolo(bool bSolo);
79      bool channelReset();          void channelEdit();
80      void volumeChanged(int iVolume);          bool channelFxEdit();
81            bool channelReset();
82            void volumeChanged(int iVolume);
83    
84  protected:  protected:
85      bool decodeDragFile(const QMimeSource* pEvent, QString& sInstrumentFile);  
86      void dragEnterEvent(QDragEnterEvent* pDragEnterEvent);          void dragEnterEvent(QDragEnterEvent* pDragEnterEvent);
87      void dropEvent(QDropEvent* pDropEvent);          void dropEvent(QDropEvent* pDropEvent);
88      void contextMenuEvent(QContextMenuEvent* pEvent);          void contextMenuEvent(QContextMenuEvent* pEvent);
89    
90  private:  private:
     Ui::qsamplerChannelStrip ui;  
91    
92      qsamplerChannel* m_pChannel;          Ui::qsamplerChannelStrip m_ui;
93      int m_iDirtyChange;  
94      int m_iErrorCount;          Channel* m_pChannel;
95            int m_iDirtyChange;
96            int m_iErrorCount;
97    
98            // Channel strip activation/selection.
99            static ChannelStrip *g_pSelectedStrip;
100  };  };
101    
102  } // namespace QSampler  } // namespace QSampler

Legend:
Removed from v.1464  
changed lines
  Added in v.1667

  ViewVC Help
Powered by ViewVC