1 //=============================================================================
2 //  MuseScore
3 //  Music Composition & Notation
4 //
5 //  Copyright (C) 2011 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 "inspectorMeasureNumber.h"
14 #include "libmscore/measurenumber.h"
15 
16 namespace Ms {
17 
18 extern void populatePlacement(QComboBox*);
19 
20 //---------------------------------------------------------
21 //   InspectorMeasureNumber
22 //---------------------------------------------------------
23 
InspectorMeasureNumber(QWidget * parent)24 InspectorMeasureNumber::InspectorMeasureNumber(QWidget* parent)
25    : InspectorTextBase(parent)
26       {
27       mn.setupUi(addWidget());
28 
29       const std::vector<InspectorItem> iiList = {
30             { Pid::SUB_STYLE,  0, mn.style,      mn.resetStyle },
31             { Pid::PLACEMENT,  0, mn.vPlacement, mn.resetVPlacement  },
32             { Pid::HPLACEMENT, 0, mn.hPlacement, mn.resetHPlacement  }
33             };
34       const std::vector<InspectorPanel> ppList = {
35             { mn.title, mn.panel },
36             };
37 
38       populateStyle(mn.style);
39       populatePlacement(mn.vPlacement);
40 
41       mn.hPlacement->clear();
42       mn.hPlacement->addItem(mn.hPlacement->QObject::tr("Left"),   int(HPlacement::LEFT));
43       mn.hPlacement->addItem(mn.hPlacement->QObject::tr("Center"), int(HPlacement::CENTER));
44       mn.hPlacement->addItem(mn.hPlacement->QObject::tr("Right"),  int(HPlacement::RIGHT));
45 
46       mapSignals(iiList, ppList);
47       }
48 
49 } // namespace Ms
50 
51