MuseScore  3.4
Music composition and notation
mixertrackpart.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 __MIXERTRACKPART_H__
21 #define __MIXERTRACKPART_H__
22 
23 #include "ui_mixertrackpart.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 // MixerTrackPart
36 //---------------------------------------------------------
37 
38 class MixerTrackPart : public QWidget, public Ui::MixerTrackPart, public ChannelListener, public MixerTrack
39  {
40  Q_OBJECT
41 
43 
44  bool _selected;
45  static const QString unselStyleDark;
46  static const QString selStyleDark;
47  static const QString unselStyleLight;
48  static const QString selStyleLight;
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 expandToggled(bool);
65  void controlSelected();
66  void applyStyle();
67 
68 protected:
69  void mouseReleaseEvent(QMouseEvent * event) override;
70  void propertyChanged(Channel::Prop property) override;
71 
72 public:
73  explicit MixerTrackPart(QWidget *parent, MixerTrackItemPtr trackItem, bool expanded);
74 
75  bool selected() override { return _selected; }
76  QWidget* getWidget() override { return this; }
77  MixerTrackGroup* group() override { return _group; }
78  MixerTrackItemPtr mti() override { return _mti; }
79  void setGroup(MixerTrackGroup* group) { _group = group; }
80  void showEvent(QShowEvent*) override;
81  };
82 
83 }
84 #endif // __MIXERTRACKPART_H__
bool selected() override
Definition: mixertrackpart.h:75
static const QString sliderStyle
Definition: mixertrackpart.h:49
void setSelected(bool) override
Definition: mixertrackpart.cpp:330
bool _selected
Definition: mixertrackpart.h:44
MixerTrackItemPtr mti() override
Definition: mixertrackpart.h:78
void selectedChanged(bool)
Prop
Definition: instrument.h:141
static const QString selStyleDark
Definition: mixertrackpart.h:46
void controlSelected()
Definition: mixertrackpart.cpp:312
void updateSolo(bool)
Definition: mixertrackpart.cpp:294
void updateNameLabel()
Definition: mixertrackpart.cpp:172
void applyStyle()
Definition: mixertrackpart.cpp:143
QWidget * getWidget() override
Definition: mixertrackpart.h:76
std::shared_ptr< MixerTrackItem > MixerTrackItemPtr
Definition: mixertrackitem.h:32
void expandToggled(bool)
Definition: mixertrackpart.cpp:162
void mouseReleaseEvent(QMouseEvent *event) override
Definition: mixertrackpart.cpp:321
Definition: mixertrackgroup.h:32
Definition: aeolus.cpp:26
void updateMute(bool)
Definition: mixertrackpart.cpp:303
Definition: mixertrack.h:30
MixerTrackGroup * _group
Definition: mixertrackpart.h:51
void panChanged(double)
Definition: mixertrackpart.cpp:284
void showEvent(QShowEvent *) override
Definition: mixertrackpart.cpp:219
Definition: instrument.h:208
MixerTrackPart(QWidget *parent, MixerTrackItemPtr trackItem, bool expanded)
Definition: mixertrackpart.cpp:82
MixerTrackItemPtr _mti
Definition: mixertrackpart.h:42
Definition: mixertrackpart.h:38
MixerTrackGroup * group() override
Definition: mixertrackpart.h:77
static const QString unselStyleDark
Definition: mixertrackpart.h:45
void volumeChanged(double)
Definition: mixertrackpart.cpp:274
void propertyChanged(Channel::Prop property) override
Definition: mixertrackpart.cpp:230
static const QString selStyleLight
Definition: mixertrackpart.h:48
static const QString unselStyleLight
Definition: mixertrackpart.h:47
void setGroup(MixerTrackGroup *group)
Definition: mixertrackpart.h:79