/[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 1509 by capela, Thu Nov 22 11:10:44 2007 UTC revision 3555 by capela, Tue Aug 13 10:19:32 2019 UTC
# Line 1  Line 1 
1  // qsamplerChannelStrip.h  // qsamplerChannelStrip.h
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2019, rncbc aka Rui Nuno Capela. All rights reserved.
5     Copyright (C) 2007, Christian Schoenebeck     Copyright (C) 2007, 2008, 2014 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 28  Line 28 
28  #include "qsamplerChannel.h"  #include "qsamplerChannel.h"
29    
30  class QDragEnterEvent;  class QDragEnterEvent;
31    class QTimer;
32    class QMenu;
33    
34    
35  namespace QSampler {  namespace QSampler {
36    
37    //-------------------------------------------------------------------------
38    // QSampler::ChannelStrip -- Channel strip form interface.
39    //
40    
41  class ChannelStrip : public QWidget  class ChannelStrip : public QWidget
42  {  {
43          Q_OBJECT          Q_OBJECT
44    
45  public:  public:
46    
47      ChannelStrip(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0);          ChannelStrip(QWidget* pParent = nullptr, Qt::WindowFlags wflags = 0);
48     ~ChannelStrip();          ~ChannelStrip();
49    
50      void setup(qsamplerChannel* pChannel);          void setup(Channel *pChannel);
51    
52      qsamplerChannel *channel() const;          Channel *channel() const;
53    
54      void setDisplayFont(const QFont& font);          void setDisplayFont(const QFont& font);
55      QFont displayFont() const;          QFont displayFont() const;
56    
57      void setDisplayEffect(bool bDisplayEffect);          void setDisplayEffect(bool bDisplayEffect);
58    
59      void setMaxVolume(int iMaxVolume);          void setMaxVolume(int iMaxVolume);
60    
61      bool updateInstrumentName(bool bForce);          bool updateInstrumentName(bool bForce);
62      bool updateChannelVolume();          bool updateChannelVolume();
63      bool updateChannelInfo();          bool updateChannelInfo();
64      bool updateChannelUsage();          bool updateChannelUsage();
65    
66      void resetErrorCount();          void resetErrorCount();
67    
68            // Channel strip activation/selection.
69            void setSelected(bool bSelected);
70            bool isSelected() const;
71    
72  signals:  signals:
73    
74      void channelChanged(ChannelStrip*);          void channelChanged(ChannelStrip*);
75    
76  public slots:  public slots:
77    
78      bool channelSetup();          bool channelSetup();
79      bool channelMute(bool bMute);          bool channelMute(bool bMute);
80      bool channelSolo(bool bSolo);          bool channelSolo(bool bSolo);
81      void channelEdit();          void channelEdit();
82      bool channelReset();          bool channelFxEdit();
83      void volumeChanged(int iVolume);          bool channelReset();
84            void volumeChanged(int iVolume);
85    
86            void midiActivityLedOn();
87    
88  protected:  protected:
89    
90      void dragEnterEvent(QDragEnterEvent* pDragEnterEvent);          void dragEnterEvent(QDragEnterEvent* pDragEnterEvent);
91      void dropEvent(QDropEvent* pDropEvent);          void dropEvent(QDropEvent* pDropEvent);
92      void contextMenuEvent(QContextMenuEvent* pEvent);          void contextMenuEvent(QContextMenuEvent* pEvent);
93    
94    protected slots:
95    
96            void midiActivityLedOff();
97            void instrumentListPopupItemClicked(QAction* action);
98    
99  private:  private:
100    
101      Ui::qsamplerChannelStrip m_ui;          Ui::qsamplerChannelStrip m_ui;
102    
103            Channel *m_pChannel;
104            int m_iDirtyChange;
105            int m_iErrorCount;
106            QMenu* m_instrumentListPopupMenu;
107    
108            QTimer  *m_pMidiActivityTimer;
109    
110            // MIDI activity pixmap common resources.
111            static int      g_iMidiActivityRefCount;
112            static QPixmap *g_pMidiActivityLedOn;
113            static QPixmap *g_pMidiActivityLedOff;
114    
115      qsamplerChannel* m_pChannel;          // Channel strip activation/selection.
116      int m_iDirtyChange;          static ChannelStrip *g_pSelectedStrip;
     int m_iErrorCount;  
117  };  };
118    
119  } // namespace QSampler  } // namespace QSampler

Legend:
Removed from v.1509  
changed lines
  Added in v.3555

  ViewVC Help
Powered by ViewVC