Merge pull request #5744 from jthistle/299644-fretboard-diagram-rotation
fix #299644: add support for fret diagram rotation
|
@ -40,6 +40,7 @@ static const ElementStyle fretStyle {
|
||||||
{ Sid::fretFrets, Pid::FRET_FRETS },
|
{ Sid::fretFrets, Pid::FRET_FRETS },
|
||||||
{ Sid::fretNut, Pid::FRET_NUT },
|
{ Sid::fretNut, Pid::FRET_NUT },
|
||||||
{ Sid::fretMinDistance, Pid::MIN_DISTANCE },
|
{ Sid::fretMinDistance, Pid::MIN_DISTANCE },
|
||||||
|
{ Sid::fretOrientation, Pid::ORIENTATION },
|
||||||
};
|
};
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
@ -68,6 +69,7 @@ FretDiagram::FretDiagram(const FretDiagram& f)
|
||||||
_markers = f._markers;
|
_markers = f._markers;
|
||||||
_barres = f._barres;
|
_barres = f._barres;
|
||||||
_showNut = f._showNut;
|
_showNut = f._showNut;
|
||||||
|
_orientation= f._orientation;
|
||||||
|
|
||||||
if (f._harmony) {
|
if (f._harmony) {
|
||||||
Harmony* h = new Harmony(*f._harmony);
|
Harmony* h = new Harmony(*f._harmony);
|
||||||
|
@ -267,6 +269,13 @@ void FretDiagram::init(StringData* stringData, Chord* chord)
|
||||||
|
|
||||||
void FretDiagram::draw(QPainter* painter) const
|
void FretDiagram::draw(QPainter* painter) const
|
||||||
{
|
{
|
||||||
|
QPointF translation = -QPointF(stringDist * (_strings - 1), 0);
|
||||||
|
if (_orientation == Orientation::HORIZONTAL) {
|
||||||
|
painter->save();
|
||||||
|
painter->rotate(-90);
|
||||||
|
painter->translate(translation);
|
||||||
|
}
|
||||||
|
|
||||||
// Init pen and other values
|
// Init pen and other values
|
||||||
qreal _spatium = spatium() * _userMag;
|
qreal _spatium = spatium() * _userMag;
|
||||||
QPen pen(curColor());
|
QPen pen(curColor());
|
||||||
|
@ -296,18 +305,10 @@ void FretDiagram::draw(QPainter* painter) const
|
||||||
painter->drawLine(QLineF(0.0, y, x2, y));
|
painter->drawLine(QLineF(0.0, y, x2, y));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup the font for the markers
|
|
||||||
QFont scaledFont(font);
|
|
||||||
scaledFont.setPointSizeF(font.pointSize() * _userMag * (spatium() / SPATIUM20));
|
|
||||||
QFontMetricsF fm(scaledFont, MScore::paintDevice());
|
|
||||||
scaledFont.setPointSizeF(scaledFont.pointSizeF() * MScore::pixelRatio);
|
|
||||||
|
|
||||||
painter->setFont(scaledFont);
|
|
||||||
|
|
||||||
// dotd is the diameter of a dot
|
// dotd is the diameter of a dot
|
||||||
qreal dotd = _spatium * .49 * score()->styleD(Sid::fretDotSize);
|
qreal dotd = _spatium * .49 * score()->styleD(Sid::fretDotSize);
|
||||||
|
|
||||||
// Draw dots, sym pen is used to draw them
|
// Draw dots, sym pen is used to draw them (and markers)
|
||||||
QPen symPen(pen);
|
QPen symPen(pen);
|
||||||
symPen.setCapStyle(Qt::RoundCap);
|
symPen.setCapStyle(Qt::RoundCap);
|
||||||
qreal symPenWidth = stringLw * 1.2;
|
qreal symPenWidth = stringLw * 1.2;
|
||||||
|
@ -356,19 +357,24 @@ void FretDiagram::draw(QPainter* painter) const
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw markers
|
// Draw markers
|
||||||
painter->setPen(pen);
|
symPen.setWidthF(symPenWidth * 1.2);
|
||||||
|
painter->setBrush(Qt::NoBrush);
|
||||||
|
painter->setPen(symPen);
|
||||||
for (auto const& i : _markers) {
|
for (auto const& i : _markers) {
|
||||||
int string = i.first;
|
int string = i.first;
|
||||||
FretItem::Marker marker = i.second;
|
FretItem::Marker marker = i.second;
|
||||||
if (!marker.exists())
|
if (!marker.exists())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
QChar markerChar = FretItem::markerToChar(marker.mtype);
|
qreal x = stringDist * string - markerSize * .5;
|
||||||
|
qreal y = -fretDist - markerSize * .5;
|
||||||
qreal x = stringDist * string;
|
if (marker.mtype == FretMarkerType::CIRCLE) {
|
||||||
qreal y = -fretDist * .3 - fm.ascent();
|
painter->drawEllipse(QRectF(x, y, markerSize, markerSize));
|
||||||
painter->drawText(QRectF(x, y, .0, .0),
|
}
|
||||||
Qt::AlignHCenter|Qt::TextDontClip, markerChar);
|
else if (marker.mtype == FretMarkerType::CROSS) {
|
||||||
|
painter->drawLine(QPointF(x, y), QPointF(x + markerSize, y + markerSize));
|
||||||
|
painter->drawLine(QPointF(x, y + markerSize), QPointF(x + markerSize, y));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw barres
|
// Draw barres
|
||||||
|
@ -389,22 +395,44 @@ void FretDiagram::draw(QPainter* painter) const
|
||||||
// Draw fret offset number
|
// Draw fret offset number
|
||||||
if (_fretOffset > 0) {
|
if (_fretOffset > 0) {
|
||||||
qreal fretNumMag = score()->styleD(Sid::fretNumMag);
|
qreal fretNumMag = score()->styleD(Sid::fretNumMag);
|
||||||
scaledFont.setPointSizeF(scaledFont.pointSizeF() * fretNumMag);
|
QFont scaledFont(font);
|
||||||
|
scaledFont.setPointSizeF(font.pointSize() * _userMag * (spatium() / SPATIUM20) * MScore::pixelRatio * fretNumMag);
|
||||||
painter->setFont(scaledFont);
|
painter->setFont(scaledFont);
|
||||||
if (_numPos == 0) {
|
QString text = QString("%1").arg(_fretOffset+1);
|
||||||
painter->drawText(QRectF(-stringDist *.4, .0, .0, fretDist),
|
|
||||||
Qt::AlignVCenter|Qt::AlignRight|Qt::TextDontClip,
|
if (_orientation == Orientation::VERTICAL) {
|
||||||
QString("%1").arg(_fretOffset+1));
|
if (_numPos == 0) {
|
||||||
|
painter->drawText(QRectF(-stringDist * .4, .0, .0, fretDist),
|
||||||
|
Qt::AlignVCenter|Qt::AlignRight|Qt::TextDontClip, text);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
painter->drawText(QRectF(x2 + (stringDist * .4), .0, .0, fretDist),
|
||||||
|
Qt::AlignVCenter|Qt::AlignLeft|Qt::TextDontClip,
|
||||||
|
QString("%1").arg(_fretOffset+1));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else if (_orientation == Orientation::HORIZONTAL) {
|
||||||
painter->drawText(QRectF(x2 + (stringDist * 0.4), .0, .0, fretDist),
|
painter->save();
|
||||||
Qt::AlignVCenter|Qt::AlignLeft|Qt::TextDontClip,
|
painter->translate(-translation);
|
||||||
QString("%1").arg(_fretOffset+1));
|
painter->rotate(90);
|
||||||
|
if (_numPos == 0) {
|
||||||
|
painter->drawText(QRectF(.0, stringDist * (_strings - 1), .0, .0),
|
||||||
|
Qt::AlignLeft|Qt::TextDontClip, text);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
painter->drawText(QRectF(.0, .0, .0, .0),
|
||||||
|
Qt::AlignBottom|Qt::AlignLeft|Qt::TextDontClip, text);
|
||||||
|
}
|
||||||
|
painter->restore();
|
||||||
}
|
}
|
||||||
painter->setFont(font);
|
painter->setFont(font);
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE:JT possible future todo - draw fingerings
|
// NOTE:JT possible future todo - draw fingerings
|
||||||
|
|
||||||
|
if (_orientation == Orientation::HORIZONTAL) {
|
||||||
|
painter->restore();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
@ -418,39 +446,70 @@ void FretDiagram::layout()
|
||||||
nutLw = (_fretOffset || !_showNut) ? stringLw : _spatium * 0.2;
|
nutLw = (_fretOffset || !_showNut) ? stringLw : _spatium * 0.2;
|
||||||
stringDist = score()->styleP(Sid::fretStringSpacing) * _userMag;
|
stringDist = score()->styleP(Sid::fretStringSpacing) * _userMag;
|
||||||
fretDist = score()->styleP(Sid::fretFretSpacing) * _userMag;
|
fretDist = score()->styleP(Sid::fretFretSpacing) * _userMag;
|
||||||
|
markerSize = stringDist * .8;
|
||||||
|
|
||||||
qreal w = stringDist * (_strings - 1);
|
qreal w = stringDist * (_strings - 1) + markerSize;
|
||||||
qreal h = _frets * fretDist + fretDist * .5;
|
qreal h = (_frets + 1) * fretDist + markerSize;
|
||||||
qreal y = 0.0;
|
qreal y = -(markerSize * .5 + fretDist);
|
||||||
qreal dotd = _spatium * .49 * score()->styleD(Sid::fretDotSize);
|
qreal x = -(markerSize * .5);
|
||||||
qreal x = -((dotd+stringLw) * .5);
|
|
||||||
w += dotd + stringLw;
|
|
||||||
|
|
||||||
// Always allocate space for markers
|
|
||||||
QFont scaledFont(font);
|
|
||||||
scaledFont.setPointSize(font.pointSize() * _userMag);
|
|
||||||
QFontMetricsF fm(scaledFont, MScore::paintDevice());
|
|
||||||
y = -(fretDist * .1 + fm.height());
|
|
||||||
h -= y;
|
|
||||||
|
|
||||||
|
// Allocate space for fret offset number
|
||||||
if (_fretOffset > 0) {
|
if (_fretOffset > 0) {
|
||||||
|
QFont scaledFont(font);
|
||||||
|
scaledFont.setPointSize(font.pointSize() * _userMag);
|
||||||
|
QFontMetricsF fm(scaledFont, MScore::paintDevice());
|
||||||
|
|
||||||
qreal fretNumMag = score()->styleD(Sid::fretNumMag);
|
qreal fretNumMag = score()->styleD(Sid::fretNumMag);
|
||||||
scaledFont.setPointSizeF(scaledFont.pointSizeF() * fretNumMag);
|
scaledFont.setPointSizeF(scaledFont.pointSizeF() * fretNumMag);
|
||||||
QFontMetricsF fm2(scaledFont, MScore::paintDevice());
|
QFontMetricsF fm2(scaledFont, MScore::paintDevice());
|
||||||
qreal numw = fm2.width(QString("%1").arg(_fretOffset+1));
|
qreal numw = fm2.width(QString("%1").arg(_fretOffset+1));
|
||||||
qreal xdiff = numw + stringDist * .4;
|
qreal xdiff = numw + stringDist * .4;
|
||||||
w += xdiff;
|
w += xdiff;
|
||||||
x += _numPos == 0 ? -xdiff : 0;
|
x += (_numPos == 0) == (_orientation == Orientation::VERTICAL) ? -xdiff : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_orientation == Orientation::HORIZONTAL) {
|
||||||
|
qreal tempW = w,
|
||||||
|
tempX = x;
|
||||||
|
w = h;
|
||||||
|
h = tempW;
|
||||||
|
x = y;
|
||||||
|
y = tempX;
|
||||||
}
|
}
|
||||||
|
|
||||||
bbox().setRect(x, y, w, h);
|
bbox().setRect(x, y, w, h);
|
||||||
|
|
||||||
setPos(-_spatium, -h - styleP(Sid::fretY) + _spatium );
|
|
||||||
|
|
||||||
if (!parent() || !parent()->isSegment()) {
|
if (!parent() || !parent()->isSegment()) {
|
||||||
setPos(QPointF());
|
setPos(QPointF());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We need to get the width of the notehead/rest in order to position the fret diagram correctly
|
||||||
|
Segment* pSeg = toSegment(parent());
|
||||||
|
qreal noteheadWidth = 0;
|
||||||
|
if (pSeg->isChordRestType()) {
|
||||||
|
int idx = staff()->idx();
|
||||||
|
for (Element* e = pSeg->firstElementOfSegment(pSeg, idx); e; e = pSeg->nextElementOfSegment(pSeg, e, idx)) {
|
||||||
|
if (e->isRest()) {
|
||||||
|
Rest* r = toRest(e);
|
||||||
|
noteheadWidth = symWidth(r->sym());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (e->isNote()) {
|
||||||
|
Note* n = toNote(e);
|
||||||
|
noteheadWidth = n->headWidth();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
qreal mainWidth;
|
||||||
|
if (_orientation == Orientation::VERTICAL)
|
||||||
|
mainWidth = stringDist * (_strings - 1);
|
||||||
|
else if (_orientation == Orientation::HORIZONTAL)
|
||||||
|
mainWidth = fretDist * (_frets + 0.5);
|
||||||
|
setPos((noteheadWidth - mainWidth)/2, -(h + styleP(Sid::fretY)));
|
||||||
|
|
||||||
autoplaceSegmentElement();
|
autoplaceSegmentElement();
|
||||||
|
|
||||||
// don't display harmony in palette
|
// don't display harmony in palette
|
||||||
|
@ -501,14 +560,15 @@ qreal FretDiagram::centerX() const
|
||||||
// written, edit the writeNew function. writeOld is purely compatibility.
|
// written, edit the writeNew function. writeOld is purely compatibility.
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
static const std::array<Pid, 7> pids { {
|
static const std::array<Pid, 8> pids { {
|
||||||
Pid::MIN_DISTANCE,
|
Pid::MIN_DISTANCE,
|
||||||
Pid::FRET_OFFSET,
|
Pid::FRET_OFFSET,
|
||||||
Pid::FRET_FRETS,
|
Pid::FRET_FRETS,
|
||||||
Pid::FRET_STRINGS,
|
Pid::FRET_STRINGS,
|
||||||
Pid::FRET_NUT,
|
Pid::FRET_NUT,
|
||||||
Pid::MAG,
|
Pid::MAG,
|
||||||
Pid::FRET_NUM_POS
|
Pid::FRET_NUM_POS,
|
||||||
|
Pid::ORIENTATION
|
||||||
} };
|
} };
|
||||||
|
|
||||||
void FretDiagram::write(XmlWriter& xml) const
|
void FretDiagram::write(XmlWriter& xml) const
|
||||||
|
@ -707,6 +767,8 @@ void FretDiagram::read(XmlReader& e)
|
||||||
// Check for new properties
|
// Check for new properties
|
||||||
else if (tag == "showNut")
|
else if (tag == "showNut")
|
||||||
readProperty(e, Pid::FRET_NUT);
|
readProperty(e, Pid::FRET_NUT);
|
||||||
|
else if (tag == "orientation")
|
||||||
|
readProperty(e, Pid::ORIENTATION);
|
||||||
|
|
||||||
// Then read the rest if there is no new format diagram (compatibility read)
|
// Then read the rest if there is no new format diagram (compatibility read)
|
||||||
else if (tag == "strings")
|
else if (tag == "strings")
|
||||||
|
@ -1118,6 +1180,7 @@ void FretDiagram::add(Element* e)
|
||||||
_harmony = toHarmony(e);
|
_harmony = toHarmony(e);
|
||||||
_harmony->setTrack(track());
|
_harmony->setTrack(track());
|
||||||
_harmony->resetProperty(Pid::OFFSET);
|
_harmony->resetProperty(Pid::OFFSET);
|
||||||
|
_harmony->setProperty(Pid::ALIGN, int(Align::HCENTER | Align::TOP));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
qWarning("FretDiagram: cannot add <%s>\n", e->name());
|
qWarning("FretDiagram: cannot add <%s>\n", e->name());
|
||||||
|
@ -1278,6 +1341,9 @@ QVariant FretDiagram::getProperty(Pid propertyId) const
|
||||||
return fretOffset();
|
return fretOffset();
|
||||||
case Pid::FRET_NUM_POS:
|
case Pid::FRET_NUM_POS:
|
||||||
return _numPos;
|
return _numPos;
|
||||||
|
case Pid::ORIENTATION:
|
||||||
|
return int(_orientation);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return Element::getProperty(propertyId);
|
return Element::getProperty(propertyId);
|
||||||
}
|
}
|
||||||
|
@ -1308,6 +1374,9 @@ bool FretDiagram::setProperty(Pid propertyId, const QVariant& v)
|
||||||
case Pid::FRET_NUM_POS:
|
case Pid::FRET_NUM_POS:
|
||||||
_numPos = v.toInt();
|
_numPos = v.toInt();
|
||||||
break;
|
break;
|
||||||
|
case Pid::ORIENTATION:
|
||||||
|
_orientation = Orientation(v.toInt());
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return Element::setProperty(propertyId, v);
|
return Element::setProperty(propertyId, v);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,11 @@ namespace Ms {
|
||||||
class StringData;
|
class StringData;
|
||||||
class Chord;
|
class Chord;
|
||||||
|
|
||||||
|
enum class Orientation : signed char {
|
||||||
|
VERTICAL,
|
||||||
|
HORIZONTAL
|
||||||
|
};
|
||||||
|
|
||||||
// Keep this in order - not used directly for comparisons, but the dots will appear in
|
// Keep this in order - not used directly for comparisons, but the dots will appear in
|
||||||
// this order in fret multidot mode. See fretproperties.cpp.
|
// this order in fret multidot mode. See fretproperties.cpp.
|
||||||
enum class FretDotType : signed char {
|
enum class FretDotType : signed char {
|
||||||
|
@ -125,6 +130,7 @@ class FretDiagram final : public Element {
|
||||||
int _fretOffset { 0 };
|
int _fretOffset { 0 };
|
||||||
int _maxFrets { 24 };
|
int _maxFrets { 24 };
|
||||||
bool _showNut { true };
|
bool _showNut { true };
|
||||||
|
Orientation _orientation { Orientation::VERTICAL };
|
||||||
|
|
||||||
// Barres are stored in the format: K: fret, V: barre struct
|
// Barres are stored in the format: K: fret, V: barre struct
|
||||||
BarreMap _barres;
|
BarreMap _barres;
|
||||||
|
@ -143,6 +149,7 @@ class FretDiagram final : public Element {
|
||||||
qreal fretDist;
|
qreal fretDist;
|
||||||
QFont font;
|
QFont font;
|
||||||
qreal _userMag { 1.0 }; // allowed 0.1 - 10.0
|
qreal _userMag { 1.0 }; // allowed 0.1 - 10.0
|
||||||
|
qreal markerSize;
|
||||||
int _numPos;
|
int _numPos;
|
||||||
|
|
||||||
void removeDot(int s, int f = 0);
|
void removeDot(int s, int f = 0);
|
||||||
|
|
|
@ -970,23 +970,65 @@ QString HDegree::text() const
|
||||||
return ss;
|
return ss;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------
|
||||||
|
// findInSeg
|
||||||
|
/// find a Harmony in a given segment on the same track as this harmony.
|
||||||
|
///
|
||||||
|
/// returns 0 if there is none
|
||||||
|
//---------------------------------------------------------
|
||||||
|
|
||||||
|
Harmony* Harmony::findInSeg(Segment* seg) const
|
||||||
|
{
|
||||||
|
// Find harmony as parent of fret diagram on same track
|
||||||
|
Element* fde = seg->findAnnotation(ElementType::FRET_DIAGRAM, track(), track());
|
||||||
|
if (fde) {
|
||||||
|
FretDiagram* fd = toFretDiagram(fde);
|
||||||
|
if (fd->harmony()) {
|
||||||
|
return toHarmony(fd->harmony());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find harmony on same track
|
||||||
|
Element* e = seg->findAnnotation(ElementType::HARMONY, track(), track());
|
||||||
|
if (e) {
|
||||||
|
return toHarmony(e);
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------
|
||||||
|
// getParentSeg
|
||||||
|
/// gets the parent segment of this harmony
|
||||||
|
//---------------------------------------------------------
|
||||||
|
|
||||||
|
Segment* Harmony::getParentSeg() const
|
||||||
|
{
|
||||||
|
Segment* seg;
|
||||||
|
if (parent()->isFretDiagram()) {
|
||||||
|
// When this harmony is the child of a fret diagram, we need to go up twice
|
||||||
|
// to get to the parent seg.
|
||||||
|
seg = toSegment(parent()->parent());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
seg = toSegment(parent());
|
||||||
|
}
|
||||||
|
return seg;
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
// findNext
|
// findNext
|
||||||
/// find the next Harmony in the score
|
/// find the next Harmony in the score
|
||||||
///
|
///
|
||||||
/// returns 0 if there is none
|
/// returns 0 if there is none
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
Harmony* Harmony::findNext() const
|
Harmony* Harmony::findNext() const
|
||||||
{
|
{
|
||||||
Segment* seg = toSegment(parent());
|
Segment* cur = getParentSeg()->next1();
|
||||||
Segment* cur = seg->next1();
|
|
||||||
while (cur) {
|
while (cur) {
|
||||||
//find harmony on same track
|
Harmony* h = findInSeg(cur);
|
||||||
Element* e = cur->findAnnotation(ElementType::HARMONY,
|
if (h) {
|
||||||
track(), track());
|
return h;
|
||||||
if (e) {
|
|
||||||
//we have found harmony element
|
|
||||||
return toHarmony(e);
|
|
||||||
}
|
}
|
||||||
cur = cur->next1();
|
cur = cur->next1();
|
||||||
}
|
}
|
||||||
|
@ -999,17 +1041,14 @@ Harmony* Harmony::findNext() const
|
||||||
///
|
///
|
||||||
/// returns 0 if there is none
|
/// returns 0 if there is none
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
Harmony* Harmony::findPrev() const
|
Harmony* Harmony::findPrev() const
|
||||||
{
|
{
|
||||||
Segment* seg = toSegment(parent());
|
Segment* cur = getParentSeg()->prev1();
|
||||||
Segment* cur = seg->prev1();
|
|
||||||
while (cur) {
|
while (cur) {
|
||||||
//find harmony on same track
|
Harmony* h = findInSeg(cur);
|
||||||
Element* e = cur->findAnnotation(ElementType::HARMONY,
|
if (h) {
|
||||||
track(), track());
|
return h;
|
||||||
if (e) {
|
|
||||||
//we have found harmony element
|
|
||||||
return toHarmony(e);
|
|
||||||
}
|
}
|
||||||
cur = cur->prev1();
|
cur = cur->prev1();
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,6 +109,9 @@ class Harmony final : public TextBase {
|
||||||
void render(const QList<RenderAction>& renderList, qreal&, qreal&, int tpc, NoteSpellingType noteSpelling = NoteSpellingType::STANDARD, NoteCaseType noteCase = NoteCaseType::AUTO);
|
void render(const QList<RenderAction>& renderList, qreal&, qreal&, int tpc, NoteSpellingType noteSpelling = NoteSpellingType::STANDARD, NoteCaseType noteCase = NoteCaseType::AUTO);
|
||||||
Sid getPropertyStyle(Pid) const override;
|
Sid getPropertyStyle(Pid) const override;
|
||||||
|
|
||||||
|
Segment* getParentSeg() const;
|
||||||
|
Harmony* findInSeg(Segment* seg) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Harmony(Score* = 0);
|
Harmony(Score* = 0);
|
||||||
Harmony(const Harmony&);
|
Harmony(const Harmony&);
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "style.h"
|
#include "style.h"
|
||||||
#include "sym.h"
|
#include "sym.h"
|
||||||
#include "changeMap.h"
|
#include "changeMap.h"
|
||||||
|
#include "fret.h"
|
||||||
|
|
||||||
namespace Ms {
|
namespace Ms {
|
||||||
|
|
||||||
|
@ -230,6 +231,8 @@ static constexpr PropertyMetaData propertyList[] = {
|
||||||
{ Pid::FRET_NUT, true, "showNut", P_TYPE::BOOL, DUMMY_QT_TRANSLATE_NOOP("propertyName", "show nut") },
|
{ Pid::FRET_NUT, true, "showNut", P_TYPE::BOOL, DUMMY_QT_TRANSLATE_NOOP("propertyName", "show nut") },
|
||||||
{ Pid::FRET_OFFSET, true, "fretOffset", P_TYPE::INT, DUMMY_QT_TRANSLATE_NOOP("propertyName", "fret offset") },
|
{ Pid::FRET_OFFSET, true, "fretOffset", P_TYPE::INT, DUMMY_QT_TRANSLATE_NOOP("propertyName", "fret offset") },
|
||||||
{ Pid::FRET_NUM_POS, true, "fretNumPos", P_TYPE::INT, DUMMY_QT_TRANSLATE_NOOP("propertyName", "fret number position") },
|
{ Pid::FRET_NUM_POS, true, "fretNumPos", P_TYPE::INT, DUMMY_QT_TRANSLATE_NOOP("propertyName", "fret number position") },
|
||||||
|
{ Pid::ORIENTATION, true, "orientation", P_TYPE::ORIENTATION, DUMMY_QT_TRANSLATE_NOOP("propertyName", "orientation") },
|
||||||
|
|
||||||
{ Pid::HARMONY_VOICE_LITERAL, true, "harmonyVoiceLiteral", P_TYPE::BOOL, DUMMY_QT_TRANSLATE_NOOP("propertyName", "harmony voice literal") },
|
{ Pid::HARMONY_VOICE_LITERAL, true, "harmonyVoiceLiteral", P_TYPE::BOOL, DUMMY_QT_TRANSLATE_NOOP("propertyName", "harmony voice literal") },
|
||||||
{ Pid::HARMONY_VOICING, true, "harmonyVoicing", P_TYPE::INT, DUMMY_QT_TRANSLATE_NOOP("propertyName", "harmony voicing") },
|
{ Pid::HARMONY_VOICING, true, "harmonyVoicing", P_TYPE::INT, DUMMY_QT_TRANSLATE_NOOP("propertyName", "harmony voicing") },
|
||||||
{ Pid::HARMONY_DURATION, true, "harmonyDuration", P_TYPE::INT, DUMMY_QT_TRANSLATE_NOOP("propertyName", "harmony duration") },
|
{ Pid::HARMONY_DURATION, true, "harmonyDuration", P_TYPE::INT, DUMMY_QT_TRANSLATE_NOOP("propertyName", "harmony duration") },
|
||||||
|
@ -588,6 +591,14 @@ QVariant propertyFromString(Pid id, QString value)
|
||||||
}
|
}
|
||||||
return int(align);
|
return int(align);
|
||||||
}
|
}
|
||||||
|
case P_TYPE::CHANGE_METHOD:
|
||||||
|
return QVariant(int(ChangeMap::nameToChangeMethod(value)));
|
||||||
|
case P_TYPE::ORIENTATION:
|
||||||
|
if (value == "vertical")
|
||||||
|
return QVariant(int(Orientation::VERTICAL));
|
||||||
|
else if (value == "horizontal")
|
||||||
|
return QVariant(int(Orientation::HORIZONTAL));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -641,6 +652,7 @@ QVariant readProperty(Pid id, XmlReader& e)
|
||||||
case P_TYPE::HEAD_TYPE:
|
case P_TYPE::HEAD_TYPE:
|
||||||
case P_TYPE::SUB_STYLE:
|
case P_TYPE::SUB_STYLE:
|
||||||
case P_TYPE::ALIGN:
|
case P_TYPE::ALIGN:
|
||||||
|
case P_TYPE::ORIENTATION:
|
||||||
return propertyFromString(id, e.readElementText());
|
return propertyFromString(id, e.readElementText());
|
||||||
|
|
||||||
case P_TYPE::BEAM_MODE: // TODO
|
case P_TYPE::BEAM_MODE: // TODO
|
||||||
|
@ -850,6 +862,14 @@ QString propertyToString(Pid id, QVariant value, bool mscx)
|
||||||
v = "top";
|
v = "top";
|
||||||
return QString("%1,%2").arg(h, v);
|
return QString("%1,%2").arg(h, v);
|
||||||
}
|
}
|
||||||
|
case P_TYPE::ORIENTATION: {
|
||||||
|
const Orientation o = Orientation(value.toInt());
|
||||||
|
if (o == Orientation::VERTICAL)
|
||||||
|
return "vertical";
|
||||||
|
else if (o == Orientation::HORIZONTAL)
|
||||||
|
return "horizontal";
|
||||||
|
break;
|
||||||
|
}
|
||||||
case P_TYPE::POINT_MM:
|
case P_TYPE::POINT_MM:
|
||||||
qFatal("unknown: POINT_MM");
|
qFatal("unknown: POINT_MM");
|
||||||
case P_TYPE::SIZE_MM:
|
case P_TYPE::SIZE_MM:
|
||||||
|
|
|
@ -239,6 +239,7 @@ enum class Pid {
|
||||||
FRET_NUT,
|
FRET_NUT,
|
||||||
FRET_OFFSET,
|
FRET_OFFSET,
|
||||||
FRET_NUM_POS,
|
FRET_NUM_POS,
|
||||||
|
ORIENTATION,
|
||||||
|
|
||||||
HARMONY_VOICE_LITERAL,
|
HARMONY_VOICE_LITERAL,
|
||||||
HARMONY_VOICING,
|
HARMONY_VOICING,
|
||||||
|
@ -402,6 +403,7 @@ enum class P_TYPE : char {
|
||||||
CLEF_TYPE, // enum class ClefType
|
CLEF_TYPE, // enum class ClefType
|
||||||
DYNAMIC_TYPE, // enum class Dynamic::Type
|
DYNAMIC_TYPE, // enum class Dynamic::Type
|
||||||
KEYMODE, // enum class KeyMode
|
KEYMODE, // enum class KeyMode
|
||||||
|
ORIENTATION, // enum class Orientation
|
||||||
|
|
||||||
PATH, // QPainterPath
|
PATH, // QPainterPath
|
||||||
HEAD_SCHEME, // enum class NoteHead::Scheme
|
HEAD_SCHEME, // enum class NoteHead::Scheme
|
||||||
|
|
|
@ -358,6 +358,7 @@ static const StyleType styleTypes[] {
|
||||||
{ Sid::fretDotSize, "fretDotSize", QVariant(1.0) },
|
{ Sid::fretDotSize, "fretDotSize", QVariant(1.0) },
|
||||||
{ Sid::fretStringSpacing, "fretStringSpacing", Spatium(0.7) },
|
{ Sid::fretStringSpacing, "fretStringSpacing", Spatium(0.7) },
|
||||||
{ Sid::fretFretSpacing, "fretFretSpacing", Spatium(0.8) },
|
{ Sid::fretFretSpacing, "fretFretSpacing", Spatium(0.8) },
|
||||||
|
{ Sid::fretOrientation, "fretOrientation", int(Orientation::VERTICAL) },
|
||||||
|
|
||||||
{ Sid::showPageNumber, "showPageNumber", QVariant(true) },
|
{ Sid::showPageNumber, "showPageNumber", QVariant(true) },
|
||||||
{ Sid::showPageNumberOne, "showPageNumberOne", QVariant(false) },
|
{ Sid::showPageNumberOne, "showPageNumberOne", QVariant(false) },
|
||||||
|
|
|
@ -328,6 +328,7 @@ enum class Sid {
|
||||||
fretDotSize,
|
fretDotSize,
|
||||||
fretStringSpacing,
|
fretStringSpacing,
|
||||||
fretFretSpacing,
|
fretFretSpacing,
|
||||||
|
fretOrientation,
|
||||||
|
|
||||||
showPageNumber,
|
showPageNumber,
|
||||||
showPageNumberOne,
|
showPageNumberOne,
|
||||||
|
|
|
@ -34,6 +34,7 @@ InspectorFretDiagram::InspectorFretDiagram(QWidget* parent)
|
||||||
{ Pid::FRET_STRINGS, 0, f.strings, f.resetStrings },
|
{ Pid::FRET_STRINGS, 0, f.strings, f.resetStrings },
|
||||||
{ Pid::FRET_FRETS, 0, f.frets, f.resetFrets },
|
{ Pid::FRET_FRETS, 0, f.frets, f.resetFrets },
|
||||||
{ Pid::FRET_NUT, 0, f.showNut, f.resetShowNut },
|
{ Pid::FRET_NUT, 0, f.showNut, f.resetShowNut },
|
||||||
|
{ Pid::ORIENTATION, 0, f.orientation, f.resetOrientation },
|
||||||
};
|
};
|
||||||
const std::vector<InspectorPanel> ppList = {
|
const std::vector<InspectorPanel> ppList = {
|
||||||
{ f.title, f.panel }
|
{ f.title, f.panel }
|
||||||
|
@ -132,7 +133,7 @@ void InspectorFretDiagram::genericButtonToggled(QPushButton* b, bool v, FretDotT
|
||||||
f.diagram->setCurrentDotType(dtype);
|
f.diagram->setCurrentDotType(dtype);
|
||||||
b->setChecked(true);
|
b->setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
f.diagram->setAutomaticDotType(!v);
|
f.diagram->setAutomaticDotType(!v);
|
||||||
|
|
||||||
for (QPushButton* p : dotTypeButtons)
|
for (QPushButton* p : dotTypeButtons)
|
||||||
|
@ -142,7 +143,7 @@ void InspectorFretDiagram::genericButtonToggled(QPushButton* b, bool v, FretDotT
|
||||||
// circleButtonToggled
|
// circleButtonToggled
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
void InspectorFretDiagram::circleButtonToggled(bool v)
|
void InspectorFretDiagram::circleButtonToggled(bool v)
|
||||||
{
|
{
|
||||||
genericButtonToggled(f.circleSelect, v, FretDotType::NORMAL);
|
genericButtonToggled(f.circleSelect, v, FretDotType::NORMAL);
|
||||||
}
|
}
|
||||||
|
@ -151,7 +152,7 @@ void InspectorFretDiagram::circleButtonToggled(bool v)
|
||||||
// crossButtonToggled
|
// crossButtonToggled
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
void InspectorFretDiagram::crossButtonToggled(bool v)
|
void InspectorFretDiagram::crossButtonToggled(bool v)
|
||||||
{
|
{
|
||||||
genericButtonToggled(f.crossSelect, v, FretDotType::CROSS);
|
genericButtonToggled(f.crossSelect, v, FretDotType::CROSS);
|
||||||
}
|
}
|
||||||
|
@ -160,7 +161,7 @@ void InspectorFretDiagram::crossButtonToggled(bool v)
|
||||||
// squareButtonToggled
|
// squareButtonToggled
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
void InspectorFretDiagram::squareButtonToggled(bool v)
|
void InspectorFretDiagram::squareButtonToggled(bool v)
|
||||||
{
|
{
|
||||||
genericButtonToggled(f.squareSelect, v, FretDotType::SQUARE);
|
genericButtonToggled(f.squareSelect, v, FretDotType::SQUARE);
|
||||||
}
|
}
|
||||||
|
@ -169,7 +170,7 @@ void InspectorFretDiagram::squareButtonToggled(bool v)
|
||||||
// triangleButtonToggled
|
// triangleButtonToggled
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
void InspectorFretDiagram::triangleButtonToggled(bool v)
|
void InspectorFretDiagram::triangleButtonToggled(bool v)
|
||||||
{
|
{
|
||||||
genericButtonToggled(f.triangleSelect, v, FretDotType::TRIANGLE);
|
genericButtonToggled(f.triangleSelect, v, FretDotType::TRIANGLE);
|
||||||
}
|
}
|
||||||
|
@ -178,7 +179,7 @@ void InspectorFretDiagram::triangleButtonToggled(bool v)
|
||||||
// barreButtonToggled
|
// barreButtonToggled
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
void InspectorFretDiagram::barreButtonToggled(bool v)
|
void InspectorFretDiagram::barreButtonToggled(bool v)
|
||||||
{
|
{
|
||||||
f.diagram->setBarreMode(v);
|
f.diagram->setBarreMode(v);
|
||||||
}
|
}
|
||||||
|
@ -187,7 +188,7 @@ void InspectorFretDiagram::barreButtonToggled(bool v)
|
||||||
// multidotButtonToggled
|
// multidotButtonToggled
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
void InspectorFretDiagram::multidotButtonToggled(bool v)
|
void InspectorFretDiagram::multidotButtonToggled(bool v)
|
||||||
{
|
{
|
||||||
f.diagram->setMultidotMode(v);
|
f.diagram->setMultidotMode(v);
|
||||||
}
|
}
|
||||||
|
@ -196,7 +197,7 @@ void InspectorFretDiagram::multidotButtonToggled(bool v)
|
||||||
// clearButtonClicked
|
// clearButtonClicked
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
void InspectorFretDiagram::clearButtonClicked()
|
void InspectorFretDiagram::clearButtonClicked()
|
||||||
{
|
{
|
||||||
f.diagram->clear();
|
f.diagram->clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>220</width>
|
<width>220</width>
|
||||||
<height>550</height>
|
<height>732</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="accessibleName">
|
<property name="accessibleName">
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
<verstretch>10</verstretch>
|
<verstretch>10</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0,0,0,0,0,0,0,0,0" columnstretch="0,0,0">
|
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0" columnstretch="0,0,0">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -82,35 +82,101 @@
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="3" column="2">
|
<item row="6" column="1">
|
||||||
<widget class="Ms::ResetButton" name="resetFrets" native="true">
|
<widget class="QSpinBox" name="fretNumber">
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="accessibleName">
|
<property name="accessibleName">
|
||||||
<string>Reset 'Frets' value</string>
|
<string>Fret number</string>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QSpinBox" name="strings">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="accessibleName">
|
|
||||||
<string>Strings</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="3" column="2">
|
||||||
|
<widget class="Ms::ResetButton" name="resetStrings" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="accessibleName">
|
||||||
|
<string>Reset 'Strings' value</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>Fret number:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>fretNumber</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="14" column="0" colspan="3">
|
||||||
|
<widget class="Ms::FretCanvas" name="diagram">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>10</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>250</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="mouseTracking">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="frame" stdset="0">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Frets:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>frets</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>Orientation:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>Fret number:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>fretNumber</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="2">
|
||||||
|
<widget class="Ms::ResetButton" name="resetFretNumber" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="accessibleName">
|
||||||
|
<string>Reset 'Fret number' value</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="mag">
|
<widget class="QDoubleSpinBox" name="mag">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -136,82 +202,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="7" column="0" colspan="2">
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Scale:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>mag</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>Strings:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>strings</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="2">
|
|
||||||
<widget class="Ms::ResetButton" name="resetFretNumber" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="accessibleName">
|
|
||||||
<string>Reset 'Fret number' value</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="Ms::ResetButton" name="resetPlacement" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="accessibleName">
|
|
||||||
<string>Reset 'Placement' value</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="12" column="0" colspan="3">
|
|
||||||
<widget class="Ms::FretCanvas" name="diagram">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>10</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>250</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="mouseTracking">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QLabel" name="label_6">
|
|
||||||
<property name="text">
|
|
||||||
<string>Fret number:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>fretNumber</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0" colspan="2">
|
|
||||||
<widget class="QCheckBox" name="showNut">
|
<widget class="QCheckBox" name="showNut">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
@ -227,7 +218,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1">
|
<item row="6" column="1">
|
||||||
<widget class="QSpinBox" name="fretNumber">
|
<widget class="QSpinBox" name="fretNumber">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
@ -243,7 +234,43 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="4" column="2">
|
||||||
|
<widget class="Ms::ResetButton" name="resetFrets" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="accessibleName">
|
||||||
|
<string>Reset 'Frets' value</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Placement:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>placement</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="Ms::ResetButton" name="resetMag" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="accessibleName">
|
||||||
|
<string>Reset 'Scale' value</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
<widget class="QSpinBox" name="frets">
|
<widget class="QSpinBox" name="frets">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
@ -259,92 +286,20 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="2">
|
|
||||||
<widget class="Ms::ResetButton" name="resetShowNut" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="accessibleName">
|
|
||||||
<string>Reset 'Show nut' value</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="Ms::ResetButton" name="resetMag" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="accessibleName">
|
|
||||||
<string>Reset 'Scale' value</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QComboBox" name="placement">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="accessibleName">
|
|
||||||
<string>Placement</string>
|
|
||||||
</property>
|
|
||||||
<property name="frame">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Above</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Below</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Placement:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>placement</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="2">
|
<item row="2" column="2">
|
||||||
<widget class="Ms::ResetButton" name="resetStrings" native="true">
|
<widget class="Ms::ResetButton" name="resetOrientation" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="accessibleName">
|
<property name="accessibleName">
|
||||||
<string>Reset 'Strings' value</string>
|
<string>Reset 'Orientation' value</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="13" column="0" colspan="3">
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Frets:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>frets</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="11" column="0" colspan="3">
|
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
<item row="1" column="3">
|
<item row="1" column="3">
|
||||||
<widget class="QPushButton" name="squareSelect">
|
<widget class="QPushButton" name="squareSelect">
|
||||||
|
@ -529,6 +484,93 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="Ms::ResetButton" name="resetPlacement" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="accessibleName">
|
||||||
|
<string>Reset 'Placement' value</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Strings:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>strings</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="orientation">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Vertical</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Horizontal</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Scale:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QSpinBox" name="strings">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="accessibleName">
|
||||||
|
<string>Strings</string>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="2">
|
||||||
|
<widget class="Ms::ResetButton" name="resetShowNut" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="accessibleName">
|
||||||
|
<string>Reset 'Show nut' value</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="placement">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Above</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Below</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -551,7 +593,6 @@
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>title</tabstop>
|
<tabstop>title</tabstop>
|
||||||
<tabstop>mag</tabstop>
|
<tabstop>mag</tabstop>
|
||||||
<tabstop>placement</tabstop>
|
|
||||||
<tabstop>frets</tabstop>
|
<tabstop>frets</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# create reference
|
# create reference
|
||||||
#
|
#
|
||||||
|
|
||||||
MSCORE=../build.debug/mscore/mscore
|
MSCORE=../build.debug/main/mscore
|
||||||
#MSCORE=mscore2
|
#MSCORE=mscore2
|
||||||
DPI=130
|
DPI=130
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |