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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3849 - (hide annotations) (download) (as text)
Thu Jan 7 16:18:02 2021 UTC (3 years, 3 months ago) by capela
File MIME type: text/x-c++hdr
File size: 3073 byte(s)
- Use <cmath> instead of <math.h> et al.
1 capela 1464 // qsamplerChannelStrip.h
2     //
3     /****************************************************************************
4 capela 3849 Copyright (C) 2004-2021, rncbc aka Rui Nuno Capela. All rights reserved.
5 schoenebeck 2569 Copyright (C) 2007, 2008, 2014 Christian Schoenebeck
6 schoenebeck 1461
7 capela 1464 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 schoenebeck 1461 #include "ui_qsamplerChannelStrip.h"
27    
28     #include "qsamplerChannel.h"
29    
30 capela 1499 class QDragEnterEvent;
31 capela 2036 class QTimer;
32 schoenebeck 2569 class QMenu;
33 schoenebeck 1461
34 capela 1499
35 schoenebeck 1461 namespace QSampler {
36    
37 capela 1558 //-------------------------------------------------------------------------
38     // QSampler::ChannelStrip -- Channel strip form interface.
39     //
40    
41 capela 1509 class ChannelStrip : public QWidget
42     {
43     Q_OBJECT
44    
45 schoenebeck 1461 public:
46 capela 1509
47 capela 3758 ChannelStrip( QWidget *pParent = nullptr, Qt::WindowFlags wflags = Qt::WindowFlags());
48 capela 1510 ~ChannelStrip();
49 schoenebeck 1461
50 capela 1558 void setup(Channel *pChannel);
51 capela 1509
52 capela 1558 Channel *channel() const;
53 capela 1509
54 capela 1510 void setDisplayFont(const QFont& font);
55     QFont displayFont() const;
56 capela 1509
57 capela 1510 void setDisplayEffect(bool bDisplayEffect);
58 capela 1509
59 capela 1510 void setMaxVolume(int iMaxVolume);
60 capela 1509
61 capela 1510 bool updateInstrumentName(bool bForce);
62     bool updateChannelVolume();
63     bool updateChannelInfo();
64     bool updateChannelUsage();
65 capela 1509
66 capela 1510 void resetErrorCount();
67 schoenebeck 1461
68 capela 1514 // Channel strip activation/selection.
69     void setSelected(bool bSelected);
70     bool isSelected() const;
71    
72 schoenebeck 1461 signals:
73 capela 1509
74 capela 1510 void channelChanged(ChannelStrip*);
75 schoenebeck 1461
76     public slots:
77 capela 1509
78 capela 1510 bool channelSetup();
79     bool channelMute(bool bMute);
80     bool channelSolo(bool bSolo);
81     void channelEdit();
82 schoenebeck 1667 bool channelFxEdit();
83 capela 1510 bool channelReset();
84     void volumeChanged(int iVolume);
85 schoenebeck 1461
86 capela 2036 void midiActivityLedOn();
87    
88 schoenebeck 1461 protected:
89 capela 1509
90 capela 1510 void dragEnterEvent(QDragEnterEvent* pDragEnterEvent);
91     void dropEvent(QDropEvent* pDropEvent);
92     void contextMenuEvent(QContextMenuEvent* pEvent);
93 schoenebeck 1461
94 schoenebeck 1691 protected slots:
95    
96 capela 2036 void midiActivityLedOff();
97 schoenebeck 2569 void instrumentListPopupItemClicked(QAction* action);
98 schoenebeck 1691
99 schoenebeck 1461 private:
100    
101 capela 1510 Ui::qsamplerChannelStrip m_ui;
102 capela 1509
103 capela 2036 Channel *m_pChannel;
104 capela 1510 int m_iDirtyChange;
105     int m_iErrorCount;
106 schoenebeck 2569 QMenu* m_instrumentListPopupMenu;
107 capela 1514
108 capela 2036 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 capela 1514 // Channel strip activation/selection.
116     static ChannelStrip *g_pSelectedStrip;
117 schoenebeck 1461 };
118    
119     } // namespace QSampler
120    
121 capela 1464 #endif // __qsamplerChannelStrip_h
122    
123    
124     // end of qsamplerChannelStrip.h

  ViewVC Help
Powered by ViewVC