/[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 1461 by schoenebeck, Sun Oct 28 23:30:36 2007 UTC revision 2387 by capela, Sat Dec 29 00:21:11 2012 UTC
# Line 1  Line 1 
1  #ifndef QSAMPLER_CHANNEL_STRIP_H  // qsamplerChannelStrip.h
2  #define QSAMPLER_CHANNEL_STRIP_H  //
3    /****************************************************************************
4       Copyright (C) 2004-2012, rncbc aka Rui Nuno Capela. All rights reserved.
5       Copyright (C) 2007, 2008 Christian Schoenebeck
6    
7       This program is free software; you can redistribute it and/or
8       modify it under the terms of the GNU General Public License
9       as published by the Free Software Foundation; either version 2
10       of the License, or (at your option) any later version.
11    
12       This program is distributed in the hope that it will be useful,
13       but WITHOUT ANY WARRANTY; without even the implied warranty of
14       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15       GNU General Public License for more details.
16    
17       You should have received a copy of the GNU General Public License along
18       with this program; if not, write to the Free Software Foundation, Inc.,
19       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20    
21    *****************************************************************************/
22    
23    #ifndef __qsamplerChannelStrip_h
24    #define __qsamplerChannelStrip_h
25    
26  #include "ui_qsamplerChannelStrip.h"  #include "ui_qsamplerChannelStrip.h"
27    
28  #include "qsamplerChannel.h"  #include "qsamplerChannel.h"
29    
30  #include <QDragEnterEvent>  class QDragEnterEvent;
31    class QTimer;
32    
33    
34  namespace QSampler {  namespace QSampler {
35    
36  class ChannelStrip : public QWidget {  //-------------------------------------------------------------------------
37  Q_OBJECT  // QSampler::ChannelStrip -- Channel strip form interface.
38    //
39    
40    class ChannelStrip : public QWidget
41    {
42            Q_OBJECT
43    
44  public:  public:
     ChannelStrip(QWidget* parent = 0, Qt::WFlags f = 0);  
    ~ChannelStrip();  
45    
46      void setup(qsamplerChannel* pChannel);          ChannelStrip(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0);
47      qsamplerChannel* channel();          ~ChannelStrip();
48      QFont displayFont();  
49      void setDisplayFont(const QFont& font);          void setup(Channel *pChannel);
50      void setDisplayEffect(bool bDisplayEffect);  
51      void setDisplayBackground(const QPixmap& pm);          Channel *channel() const;
52      void setMaxVolume(int iMaxVolume);  
53      bool updateInstrumentName(bool bForce);          void setDisplayFont(const QFont& font);
54      bool updateChannelVolume();          QFont displayFont() const;
55      bool updateChannelInfo();  
56      bool updateChannelUsage();          void setDisplayEffect(bool bDisplayEffect);
57      void resetErrorCount();  
58            void setMaxVolume(int iMaxVolume);
59    
60            bool updateInstrumentName(bool bForce);
61            bool updateChannelVolume();
62            bool updateChannelInfo();
63            bool updateChannelUsage();
64    
65            void resetErrorCount();
66    
67            // Channel strip activation/selection.
68            void setSelected(bool bSelected);
69            bool isSelected() const;
70    
71  signals:  signals:
72      void channelChanged(ChannelStrip*);  
73            void channelChanged(ChannelStrip*);
74    
75  public slots:  public slots:
76      bool channelSetup();  
77      bool channelMute(bool bMute);          bool channelSetup();
78      bool channelSolo(bool bSolo);          bool channelMute(bool bMute);
79      void channelEdit();          bool channelSolo(bool bSolo);
80      bool channelReset();          void channelEdit();
81      void volumeChanged(int iVolume);          bool channelFxEdit();
82            bool channelReset();
83            void volumeChanged(int iVolume);
84    
85            void midiActivityLedOn();
86    
87  protected:  protected:
88      bool decodeDragFile(const QMimeSource* pEvent, QString& sInstrumentFile);  
89      void dragEnterEvent(QDragEnterEvent* pDragEnterEvent);          void dragEnterEvent(QDragEnterEvent* pDragEnterEvent);
90      void dropEvent(QDropEvent* pDropEvent);          void dropEvent(QDropEvent* pDropEvent);
91      void contextMenuEvent(QContextMenuEvent* pEvent);          void contextMenuEvent(QContextMenuEvent* pEvent);
92    
93    protected slots:
94    
95            void midiActivityLedOff();
96    
97  private:  private:
     Ui::qsamplerChannelStrip ui;  
98    
99      qsamplerChannel* m_pChannel;          Ui::qsamplerChannelStrip m_ui;
100      int m_iDirtyChange;  
101      int m_iErrorCount;          Channel *m_pChannel;
102            int m_iDirtyChange;
103            int m_iErrorCount;
104    
105            QTimer  *m_pMidiActivityTimer;
106    
107            // MIDI activity pixmap common resources.
108            static int      g_iMidiActivityRefCount;
109            static QPixmap *g_pMidiActivityLedOn;
110            static QPixmap *g_pMidiActivityLedOff;
111    
112            // Channel strip activation/selection.
113            static ChannelStrip *g_pSelectedStrip;
114  };  };
115    
116  } // namespace QSampler  } // namespace QSampler
117    
118  #endif // QSAMPLER_CHANNEL_STRIP_H  #endif // __qsamplerChannelStrip_h
119    
120    
121    // end of qsamplerChannelStrip.h

Legend:
Removed from v.1461  
changed lines
  Added in v.2387

  ViewVC Help
Powered by ViewVC