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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1514 - (show annotations) (download) (as text)
Fri Nov 23 10:51:37 2007 UTC (16 years, 5 months ago) by capela
File MIME type: text/x-c++hdr
File size: 2514 byte(s)
* The current selected/activated channel-strip is now visually
  evident while in the application workspace (highlighting).

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 class ChannelStrip : public QWidget
36 {
37 Q_OBJECT
38
39 public:
40
41 ChannelStrip(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0);
42 ~ChannelStrip();
43
44 void setup(qsamplerChannel *pChannel);
45
46 qsamplerChannel *channel() const;
47
48 void setDisplayFont(const QFont& font);
49 QFont displayFont() const;
50
51 void setDisplayEffect(bool bDisplayEffect);
52
53 void setMaxVolume(int iMaxVolume);
54
55 bool updateInstrumentName(bool bForce);
56 bool updateChannelVolume();
57 bool updateChannelInfo();
58 bool updateChannelUsage();
59
60 void resetErrorCount();
61
62 // Channel strip activation/selection.
63 void setSelected(bool bSelected);
64 bool isSelected() const;
65
66 signals:
67
68 void channelChanged(ChannelStrip*);
69
70 public slots:
71
72 bool channelSetup();
73 bool channelMute(bool bMute);
74 bool channelSolo(bool bSolo);
75 void channelEdit();
76 bool channelReset();
77 void volumeChanged(int iVolume);
78
79 protected:
80
81 void dragEnterEvent(QDragEnterEvent* pDragEnterEvent);
82 void dropEvent(QDropEvent* pDropEvent);
83 void contextMenuEvent(QContextMenuEvent* pEvent);
84
85 private:
86
87 Ui::qsamplerChannelStrip m_ui;
88
89 qsamplerChannel* m_pChannel;
90 int m_iDirtyChange;
91 int m_iErrorCount;
92
93 // Channel strip activation/selection.
94 static ChannelStrip *g_pSelectedStrip;
95 };
96
97 } // namespace QSampler
98
99 #endif // __qsamplerChannelStrip_h
100
101
102 // end of qsamplerChannelStrip.h

  ViewVC Help
Powered by ViewVC