1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2012 Werner Schweer
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 // as published by the Free Software Foundation and appearing in
10 // the file LICENSE.GPL
11 //=============================================================================
12
13 #include "inspectorTrill.h"
14 #include "libmscore/trill.h"
15
16 namespace Ms {
17
18 //---------------------------------------------------------
19 // InspectorTrill
20 //---------------------------------------------------------
21
InspectorTrill(QWidget * parent)22 InspectorTrill::InspectorTrill(QWidget* parent)
23 : InspectorElementBase(parent)
24 {
25 t.setupUi(addWidget());
26
27 const std::vector<InspectorItem> iiList = {
28 { Pid::TRILL_TYPE, 0, t.trillType, t.resetTrillType },
29 { Pid::PLACEMENT, 0, t.placement, t.resetPlacement },
30 { Pid::ORNAMENT_STYLE, 0, t.ornamentStyle, t.resetOrnamentStyle },
31 { Pid::PLAY, 0, t.playArticulation, t.resetPlayArticulation }
32 };
33 const std::vector<InspectorPanel> ppList = {
34 { t.title, t.panel }
35 };
36
37 mapSignals(iiList, ppList);
38 }
39
40 //---------------------------------------------------------
41 // setElement
42 //---------------------------------------------------------
43
setElement()44 void InspectorTrill::setElement()
45 {
46 InspectorElementBase::setElement();
47 if (!t.playArticulation->isChecked()) {
48 t.labelOrnamentStyle->setEnabled(false);
49 t.ornamentStyle->setEnabled(false);
50 t.resetOrnamentStyle->setEnabled(false);
51 }
52 }
53 }
54
55