1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
//=============================================================================
// MuseScore
// Music Composition & Notation
//
// Copyright (C) 2013 Werner Schweer
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2
// as published by the Free Software Foundation and appearing in
// the file LICENSE.GPL
//=============================================================================
#include "inspectorMarker.h"
#include "musescore.h"
#include "libmscore/marker.h"
#include "libmscore/score.h"
namespace Ms {
//---------------------------------------------------------
// inspectorMarker
//---------------------------------------------------------
InspectorMarker::InspectorMarker(QWidget* parent)
: InspectorBase(parent)
{
b.setupUi(addWidget());
t.setupUi(addWidget());
m.setupUi(addWidget());
iList = {
{ P_ID::COLOR, 0, false, b.color, b.resetColor },
{ P_ID::VISIBLE, 0, false, b.visible, b.resetVisible },
{ P_ID::USER_OFF, 0, false, b.offsetX, b.resetX },
{ P_ID::USER_OFF, 1, false, b.offsetY, b.resetY },
{ P_ID::TEXT_STYLE_TYPE, 0, 0, t.style, t.resetStyle },
{ P_ID::MARKER_TYPE, 0, false, m.markerType, m.resetMarkerType },
{ P_ID::LABEL, 0, false, m.jumpLabel, m.resetJumpLabel }
};
mapSignals();
connect(t.resetToStyle, SIGNAL(clicked()), SLOT(resetToStyle()));
}
//---------------------------------------------------------
// setElement
//---------------------------------------------------------
void InspectorMarker::setElement()
{
Element* e = inspector->element();
Score* score = e->score();
t.style->blockSignals(true);
t.style->clear();
const QList<TextStyle>& ts = score->style()->textStyles();
int n = ts.size();
for (int i = 0; i < n; ++i) {
if (!(ts.at(i).hidden() & TextStyleHidden::IN_LISTS) )
t.style->addItem(qApp->translate("TextStyle",ts.at(i).name().toUtf8().data()), i);
}
t.style->blockSignals(false);
InspectorBase::setElement();
}
}
|