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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2387 - (hide annotations) (download) (as text)
Sat Dec 29 00:21:11 2012 UTC (11 years, 3 months ago) by capela
File MIME type: text/x-c++hdr
File size: 2944 byte(s)
* Preparations for Qt5 migration. (TESTING)
1 capela 1464 // qsamplerChannelStrip.h
2     //
3     /****************************************************************************
4 capela 2387 Copyright (C) 2004-2012, rncbc aka Rui Nuno Capela. All rights reserved.
5 schoenebeck 1667 Copyright (C) 2007, 2008 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 1461
33 capela 1499
34 schoenebeck 1461 namespace QSampler {
35    
36 capela 1558 //-------------------------------------------------------------------------
37     // QSampler::ChannelStrip -- Channel strip form interface.
38     //
39    
40 capela 1509 class ChannelStrip : public QWidget
41     {
42     Q_OBJECT
43    
44 schoenebeck 1461 public:
45 capela 1509
46 capela 1510 ChannelStrip(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0);
47     ~ChannelStrip();
48 schoenebeck 1461
49 capela 1558 void setup(Channel *pChannel);
50 capela 1509
51 capela 1558 Channel *channel() const;
52 capela 1509
53 capela 1510 void setDisplayFont(const QFont& font);
54     QFont displayFont() const;
55 capela 1509
56 capela 1510 void setDisplayEffect(bool bDisplayEffect);
57 capela 1509
58 capela 1510 void setMaxVolume(int iMaxVolume);
59 capela 1509
60 capela 1510 bool updateInstrumentName(bool bForce);
61     bool updateChannelVolume();
62     bool updateChannelInfo();
63     bool updateChannelUsage();
64 capela 1509
65 capela 1510 void resetErrorCount();
66 schoenebeck 1461
67 capela 1514 // Channel strip activation/selection.
68     void setSelected(bool bSelected);
69     bool isSelected() const;
70    
71 schoenebeck 1461 signals:
72 capela 1509
73 capela 1510 void channelChanged(ChannelStrip*);
74 schoenebeck 1461
75     public slots:
76 capela 1509
77 capela 1510 bool channelSetup();
78     bool channelMute(bool bMute);
79     bool channelSolo(bool bSolo);
80     void channelEdit();
81 schoenebeck 1667 bool channelFxEdit();
82 capela 1510 bool channelReset();
83     void volumeChanged(int iVolume);
84 schoenebeck 1461
85 capela 2036 void midiActivityLedOn();
86    
87 schoenebeck 1461 protected:
88 capela 1509
89 capela 1510 void dragEnterEvent(QDragEnterEvent* pDragEnterEvent);
90     void dropEvent(QDropEvent* pDropEvent);
91     void contextMenuEvent(QContextMenuEvent* pEvent);
92 schoenebeck 1461
93 schoenebeck 1691 protected slots:
94    
95 capela 2036 void midiActivityLedOff();
96 schoenebeck 1691
97 schoenebeck 1461 private:
98    
99 capela 1510 Ui::qsamplerChannelStrip m_ui;
100 capela 1509
101 capela 2036 Channel *m_pChannel;
102 capela 1510 int m_iDirtyChange;
103     int m_iErrorCount;
104 capela 1514
105 capela 2036 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 capela 1514 // Channel strip activation/selection.
113     static ChannelStrip *g_pSelectedStrip;
114 schoenebeck 1461 };
115    
116     } // namespace QSampler
117    
118 capela 1464 #endif // __qsamplerChannelStrip_h
119    
120    
121     // end of qsamplerChannelStrip.h

  ViewVC Help
Powered by ViewVC