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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1558 - (show annotations) (download) (as text)
Thu Dec 6 09:35:33 2007 UTC (16 years, 4 months ago) by capela
File MIME type: text/x-c++hdr
File size: 2629 byte(s)
* Qt4 migration: complete QSampler namespace overhaul.

1 // qsamplerChannelStrip.h
2 //
3 /****************************************************************************
4 Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.
5 Copyright (C) 2007, 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"
27
28 #include "qsamplerChannel.h"
29
30 class QDragEnterEvent;
31
32
33 namespace QSampler {
34
35 //-------------------------------------------------------------------------
36 // QSampler::ChannelStrip -- Channel strip form interface.
37 //
38
39 class ChannelStrip : public QWidget
40 {
41 Q_OBJECT
42
43 public:
44
45 ChannelStrip(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0);
46 ~ChannelStrip();
47
48 void setup(Channel *pChannel);
49
50 Channel *channel() const;
51
52 void setDisplayFont(const QFont& font);
53 QFont displayFont() const;
54
55 void setDisplayEffect(bool bDisplayEffect);
56
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:
71
72 void channelChanged(ChannelStrip*);
73
74 public slots:
75
76 bool channelSetup();
77 bool channelMute(bool bMute);
78 bool channelSolo(bool bSolo);
79 void channelEdit();
80 bool channelReset();
81 void volumeChanged(int iVolume);
82
83 protected:
84
85 void dragEnterEvent(QDragEnterEvent* pDragEnterEvent);
86 void dropEvent(QDropEvent* pDropEvent);
87 void contextMenuEvent(QContextMenuEvent* pEvent);
88
89 private:
90
91 Ui::qsamplerChannelStrip m_ui;
92
93 Channel* m_pChannel;
94 int m_iDirtyChange;
95 int m_iErrorCount;
96
97 // Channel strip activation/selection.
98 static ChannelStrip *g_pSelectedStrip;
99 };
100
101 } // namespace QSampler
102
103 #endif // __qsamplerChannelStrip_h
104
105
106 // end of qsamplerChannelStrip.h

  ViewVC Help
Powered by ViewVC