MuseScore  3.4
Music composition and notation
mixertrackchannel.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Linux Music Score Editor
4 //
5 // Copyright (C) 2002-2016 Werner Schweer and others
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 //=============================================================================
19 
20 #ifndef __MIXERTRACKCHANNEL_H__
21 #define __MIXERTRACKCHANNEL_H__
22 
23 #include "ui_mixertrackchannel.h"
24 #include "mixertrackgroup.h"
25 #include "mixertrack.h"
26 #include "mixertrackitem.h"
27 #include "libmscore/instrument.h"
28 
29 namespace Ms {
30 
31 class MidiMapping;
32 class MixerTrackItem;
33 
34 //---------------------------------------------------------
35 // MixerTrack
36 //---------------------------------------------------------
37 
38 class MixerTrackChannel : public QWidget, public Ui::MixerTrackChannel, public ChannelListener, public MixerTrack
39  {
40  Q_OBJECT
41 
43 
44  bool _selected;
45  static const QString unselStyleLight;
46  static const QString selStyleLight;
47  static const QString unselStyleDark;
48  static const QString selStyleDark;
49  static const QString sliderStyle;
50 
52 
53  void updateNameLabel();
54 
55 signals:
56  void selectedChanged(bool);
57 
58 public slots:
59  void updateSolo(bool);
60  void updateMute(bool);
61  void setSelected(bool) override;
62  void volumeChanged(double);
63  void panChanged(double);
64  void controlSelected();
65  void applyStyle();
66 
67 protected:
68  void mouseReleaseEvent(QMouseEvent * event) override;
69  void propertyChanged(Channel::Prop property) override;
70 
71 public:
72  explicit MixerTrackChannel(QWidget *parent, MixerTrackItemPtr trackItem);
73 
74  bool selected() override { return _selected; }
75  QWidget* getWidget() override { return this; }
76  MixerTrackGroup* group() override { return _group; }
77  MixerTrackItemPtr mti() override { return _mti; }
78  void setGroup(MixerTrackGroup* group) { _group = group; }
79  void paintEvent(QPaintEvent* evt) override;
80  };
81 }
82 
83 #endif // __MIXERTRACKCHANNEL_H__
bool selected() override
Definition: mixertrackchannel.h:74
static const QString unselStyleLight
Definition: mixertrackchannel.h:45
void selectedChanged(bool)
void setGroup(MixerTrackGroup *group)
Definition: mixertrackchannel.h:78
MixerTrackItemPtr mti() override
Definition: mixertrackchannel.h:77
Prop
Definition: instrument.h:141
void paintEvent(QPaintEvent *evt) override
Definition: mixertrackchannel.cpp:220
static const QString selStyleLight
Definition: mixertrackchannel.h:46
void setSelected(bool) override
Definition: mixertrackchannel.cpp:329
MixerTrackChannel(QWidget *parent, MixerTrackItemPtr trackItem)
Definition: mixertrackchannel.cpp:80
void volumeChanged(double)
Definition: mixertrackchannel.cpp:273
std::shared_ptr< MixerTrackItem > MixerTrackItemPtr
Definition: mixertrackitem.h:32
static const QString sliderStyle
Definition: mixertrackchannel.h:49
void controlSelected()
Definition: mixertrackchannel.cpp:311
MixerTrackGroup * _group
Definition: mixertrackchannel.h:51
MixerTrackGroup * group() override
Definition: mixertrackchannel.h:76
void updateNameLabel()
Definition: mixertrackchannel.cpp:145
void panChanged(double)
Definition: mixertrackchannel.cpp:283
Definition: mixertrackgroup.h:32
Definition: aeolus.cpp:26
void updateMute(bool)
Definition: mixertrackchannel.cpp:302
void propertyChanged(Channel::Prop property) override
Definition: mixertrackchannel.cpp:229
Definition: mixertrack.h:30
void applyStyle()
Definition: mixertrackchannel.cpp:126
void mouseReleaseEvent(QMouseEvent *event) override
Definition: mixertrackchannel.cpp:320
static const QString selStyleDark
Definition: mixertrackchannel.h:48
Definition: instrument.h:208
QWidget * getWidget() override
Definition: mixertrackchannel.h:75
static const QString unselStyleDark
Definition: mixertrackchannel.h:47
bool _selected
Definition: mixertrackchannel.h:44
void updateSolo(bool)
Definition: mixertrackchannel.cpp:293
MixerTrackItemPtr _mti
Definition: mixertrackchannel.h:42
Definition: mixertrackchannel.h:38