Merge pull request #5744 from jthistle/299644-fretboard-diagram-rotation

fix #299644: add support for fret diagram rotation
This commit is contained in:
anatoly-os 2020-05-03 01:50:19 +03:00 committed by GitHub
commit dbfb281f5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 431 additions and 247 deletions

View file

@ -40,6 +40,7 @@ static const ElementStyle fretStyle {
{ Sid::fretFrets, Pid::FRET_FRETS },
{ Sid::fretNut, Pid::FRET_NUT },
{ Sid::fretMinDistance, Pid::MIN_DISTANCE },
{ Sid::fretOrientation, Pid::ORIENTATION },
};
//---------------------------------------------------------
@ -68,6 +69,7 @@ FretDiagram::FretDiagram(const FretDiagram& f)
_markers = f._markers;
_barres = f._barres;
_showNut = f._showNut;
_orientation= f._orientation;
if (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
{
QPointF translation = -QPointF(stringDist * (_strings - 1), 0);
if (_orientation == Orientation::HORIZONTAL) {
painter->save();
painter->rotate(-90);
painter->translate(translation);
}
// Init pen and other values
qreal _spatium = spatium() * _userMag;
QPen pen(curColor());
@ -296,18 +305,10 @@ void FretDiagram::draw(QPainter* painter) const
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
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);
symPen.setCapStyle(Qt::RoundCap);
qreal symPenWidth = stringLw * 1.2;
@ -356,19 +357,24 @@ void FretDiagram::draw(QPainter* painter) const
}
// Draw markers
painter->setPen(pen);
symPen.setWidthF(symPenWidth * 1.2);
painter->setBrush(Qt::NoBrush);
painter->setPen(symPen);
for (auto const& i : _markers) {
int string = i.first;
FretItem::Marker marker = i.second;
if (!marker.exists())
continue;
QChar markerChar = FretItem::markerToChar(marker.mtype);
qreal x = stringDist * string;
qreal y = -fretDist * .3 - fm.ascent();
painter->drawText(QRectF(x, y, .0, .0),
Qt::AlignHCenter|Qt::TextDontClip, markerChar);
qreal x = stringDist * string - markerSize * .5;
qreal y = -fretDist - markerSize * .5;
if (marker.mtype == FretMarkerType::CIRCLE) {
painter->drawEllipse(QRectF(x, y, markerSize, markerSize));
}
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
@ -389,22 +395,44 @@ void FretDiagram::draw(QPainter* painter) const
// Draw fret offset number
if (_fretOffset > 0) {
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);
if (_numPos == 0) {
painter->drawText(QRectF(-stringDist *.4, .0, .0, fretDist),
Qt::AlignVCenter|Qt::AlignRight|Qt::TextDontClip,
QString("%1").arg(_fretOffset+1));
QString text = QString("%1").arg(_fretOffset+1);
if (_orientation == Orientation::VERTICAL) {
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 {
painter->drawText(QRectF(x2 + (stringDist * 0.4), .0, .0, fretDist),
Qt::AlignVCenter|Qt::AlignLeft|Qt::TextDontClip,
QString("%1").arg(_fretOffset+1));
else if (_orientation == Orientation::HORIZONTAL) {
painter->save();
painter->translate(-translation);
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);
}
// 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;
stringDist = score()->styleP(Sid::fretStringSpacing) * _userMag;
fretDist = score()->styleP(Sid::fretFretSpacing) * _userMag;
markerSize = stringDist * .8;
qreal w = stringDist * (_strings - 1);
qreal h = _frets * fretDist + fretDist * .5;
qreal y = 0.0;
qreal dotd = _spatium * .49 * score()->styleD(Sid::fretDotSize);
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;
qreal w = stringDist * (_strings - 1) + markerSize;
qreal h = (_frets + 1) * fretDist + markerSize;
qreal y = -(markerSize * .5 + fretDist);
qreal x = -(markerSize * .5);
// Allocate space for fret offset number
if (_fretOffset > 0) {
QFont scaledFont(font);
scaledFont.setPointSize(font.pointSize() * _userMag);
QFontMetricsF fm(scaledFont, MScore::paintDevice());
qreal fretNumMag = score()->styleD(Sid::fretNumMag);
scaledFont.setPointSizeF(scaledFont.pointSizeF() * fretNumMag);
QFontMetricsF fm2(scaledFont, MScore::paintDevice());
qreal numw = fm2.width(QString("%1").arg(_fretOffset+1));
qreal xdiff = numw + stringDist * .4;
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);
setPos(-_spatium, -h - styleP(Sid::fretY) + _spatium );
if (!parent() || !parent()->isSegment()) {
setPos(QPointF());
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();
// don't display harmony in palette
@ -501,14 +560,15 @@ qreal FretDiagram::centerX() const
// 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::FRET_OFFSET,
Pid::FRET_FRETS,
Pid::FRET_STRINGS,
Pid::FRET_NUT,
Pid::MAG,
Pid::FRET_NUM_POS
Pid::FRET_NUM_POS,
Pid::ORIENTATION
} };
void FretDiagram::write(XmlWriter& xml) const
@ -707,6 +767,8 @@ void FretDiagram::read(XmlReader& e)
// Check for new properties
else if (tag == "showNut")
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)
else if (tag == "strings")
@ -1118,6 +1180,7 @@ void FretDiagram::add(Element* e)
_harmony = toHarmony(e);
_harmony->setTrack(track());
_harmony->resetProperty(Pid::OFFSET);
_harmony->setProperty(Pid::ALIGN, int(Align::HCENTER | Align::TOP));
}
else
qWarning("FretDiagram: cannot add <%s>\n", e->name());
@ -1278,6 +1341,9 @@ QVariant FretDiagram::getProperty(Pid propertyId) const
return fretOffset();
case Pid::FRET_NUM_POS:
return _numPos;
case Pid::ORIENTATION:
return int(_orientation);
break;
default:
return Element::getProperty(propertyId);
}
@ -1308,6 +1374,9 @@ bool FretDiagram::setProperty(Pid propertyId, const QVariant& v)
case Pid::FRET_NUM_POS:
_numPos = v.toInt();
break;
case Pid::ORIENTATION:
_orientation = Orientation(v.toInt());
break;
default:
return Element::setProperty(propertyId, v);
}

View file

@ -21,6 +21,11 @@ namespace Ms {
class StringData;
class Chord;
enum class Orientation : signed char {
VERTICAL,
HORIZONTAL
};
// Keep this in order - not used directly for comparisons, but the dots will appear in
// this order in fret multidot mode. See fretproperties.cpp.
enum class FretDotType : signed char {
@ -125,6 +130,7 @@ class FretDiagram final : public Element {
int _fretOffset { 0 };
int _maxFrets { 24 };
bool _showNut { true };
Orientation _orientation { Orientation::VERTICAL };
// Barres are stored in the format: K: fret, V: barre struct
BarreMap _barres;
@ -143,6 +149,7 @@ class FretDiagram final : public Element {
qreal fretDist;
QFont font;
qreal _userMag { 1.0 }; // allowed 0.1 - 10.0
qreal markerSize;
int _numPos;
void removeDot(int s, int f = 0);

View file

@ -970,23 +970,65 @@ QString HDegree::text() const
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
/// find the next Harmony in the score
///
/// returns 0 if there is none
//---------------------------------------------------------
Harmony* Harmony::findNext() const
{
Segment* seg = toSegment(parent());
Segment* cur = seg->next1();
Segment* cur = getParentSeg()->next1();
while (cur) {
//find harmony on same track
Element* e = cur->findAnnotation(ElementType::HARMONY,
track(), track());
if (e) {
//we have found harmony element
return toHarmony(e);
Harmony* h = findInSeg(cur);
if (h) {
return h;
}
cur = cur->next1();
}
@ -999,17 +1041,14 @@ Harmony* Harmony::findNext() const
///
/// returns 0 if there is none
//---------------------------------------------------------
Harmony* Harmony::findPrev() const
{
Segment* seg = toSegment(parent());
Segment* cur = seg->prev1();
Segment* cur = getParentSeg()->prev1();
while (cur) {
//find harmony on same track
Element* e = cur->findAnnotation(ElementType::HARMONY,
track(), track());
if (e) {
//we have found harmony element
return toHarmony(e);
Harmony* h = findInSeg(cur);
if (h) {
return h;
}
cur = cur->prev1();
}

View file

@ -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);
Sid getPropertyStyle(Pid) const override;
Segment* getParentSeg() const;
Harmony* findInSeg(Segment* seg) const;
public:
Harmony(Score* = 0);
Harmony(const Harmony&);

View file

@ -28,6 +28,7 @@
#include "style.h"
#include "sym.h"
#include "changeMap.h"
#include "fret.h"
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_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::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_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") },
@ -588,6 +591,14 @@ QVariant propertyFromString(Pid id, QString value)
}
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:
break;
}
@ -641,6 +652,7 @@ QVariant readProperty(Pid id, XmlReader& e)
case P_TYPE::HEAD_TYPE:
case P_TYPE::SUB_STYLE:
case P_TYPE::ALIGN:
case P_TYPE::ORIENTATION:
return propertyFromString(id, e.readElementText());
case P_TYPE::BEAM_MODE: // TODO
@ -850,6 +862,14 @@ QString propertyToString(Pid id, QVariant value, bool mscx)
v = "top";
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:
qFatal("unknown: POINT_MM");
case P_TYPE::SIZE_MM:

View file

@ -239,6 +239,7 @@ enum class Pid {
FRET_NUT,
FRET_OFFSET,
FRET_NUM_POS,
ORIENTATION,
HARMONY_VOICE_LITERAL,
HARMONY_VOICING,
@ -402,6 +403,7 @@ enum class P_TYPE : char {
CLEF_TYPE, // enum class ClefType
DYNAMIC_TYPE, // enum class Dynamic::Type
KEYMODE, // enum class KeyMode
ORIENTATION, // enum class Orientation
PATH, // QPainterPath
HEAD_SCHEME, // enum class NoteHead::Scheme

View file

@ -358,6 +358,7 @@ static const StyleType styleTypes[] {
{ Sid::fretDotSize, "fretDotSize", QVariant(1.0) },
{ Sid::fretStringSpacing, "fretStringSpacing", Spatium(0.7) },
{ Sid::fretFretSpacing, "fretFretSpacing", Spatium(0.8) },
{ Sid::fretOrientation, "fretOrientation", int(Orientation::VERTICAL) },
{ Sid::showPageNumber, "showPageNumber", QVariant(true) },
{ Sid::showPageNumberOne, "showPageNumberOne", QVariant(false) },

View file

@ -328,6 +328,7 @@ enum class Sid {
fretDotSize,
fretStringSpacing,
fretFretSpacing,
fretOrientation,
showPageNumber,
showPageNumberOne,

View file

@ -34,6 +34,7 @@ InspectorFretDiagram::InspectorFretDiagram(QWidget* parent)
{ Pid::FRET_STRINGS, 0, f.strings, f.resetStrings },
{ Pid::FRET_FRETS, 0, f.frets, f.resetFrets },
{ Pid::FRET_NUT, 0, f.showNut, f.resetShowNut },
{ Pid::ORIENTATION, 0, f.orientation, f.resetOrientation },
};
const std::vector<InspectorPanel> ppList = {
{ f.title, f.panel }
@ -132,7 +133,7 @@ void InspectorFretDiagram::genericButtonToggled(QPushButton* b, bool v, FretDotT
f.diagram->setCurrentDotType(dtype);
b->setChecked(true);
}
f.diagram->setAutomaticDotType(!v);
for (QPushButton* p : dotTypeButtons)
@ -142,7 +143,7 @@ void InspectorFretDiagram::genericButtonToggled(QPushButton* b, bool v, FretDotT
// circleButtonToggled
//---------------------------------------------------------
void InspectorFretDiagram::circleButtonToggled(bool v)
void InspectorFretDiagram::circleButtonToggled(bool v)
{
genericButtonToggled(f.circleSelect, v, FretDotType::NORMAL);
}
@ -151,7 +152,7 @@ void InspectorFretDiagram::circleButtonToggled(bool v)
// crossButtonToggled
//---------------------------------------------------------
void InspectorFretDiagram::crossButtonToggled(bool v)
void InspectorFretDiagram::crossButtonToggled(bool v)
{
genericButtonToggled(f.crossSelect, v, FretDotType::CROSS);
}
@ -160,7 +161,7 @@ void InspectorFretDiagram::crossButtonToggled(bool v)
// squareButtonToggled
//---------------------------------------------------------
void InspectorFretDiagram::squareButtonToggled(bool v)
void InspectorFretDiagram::squareButtonToggled(bool v)
{
genericButtonToggled(f.squareSelect, v, FretDotType::SQUARE);
}
@ -169,7 +170,7 @@ void InspectorFretDiagram::squareButtonToggled(bool v)
// triangleButtonToggled
//---------------------------------------------------------
void InspectorFretDiagram::triangleButtonToggled(bool v)
void InspectorFretDiagram::triangleButtonToggled(bool v)
{
genericButtonToggled(f.triangleSelect, v, FretDotType::TRIANGLE);
}
@ -178,7 +179,7 @@ void InspectorFretDiagram::triangleButtonToggled(bool v)
// barreButtonToggled
//---------------------------------------------------------
void InspectorFretDiagram::barreButtonToggled(bool v)
void InspectorFretDiagram::barreButtonToggled(bool v)
{
f.diagram->setBarreMode(v);
}
@ -187,7 +188,7 @@ void InspectorFretDiagram::barreButtonToggled(bool v)
// multidotButtonToggled
//---------------------------------------------------------
void InspectorFretDiagram::multidotButtonToggled(bool v)
void InspectorFretDiagram::multidotButtonToggled(bool v)
{
f.diagram->setMultidotMode(v);
}
@ -196,7 +197,7 @@ void InspectorFretDiagram::multidotButtonToggled(bool v)
// clearButtonClicked
//---------------------------------------------------------
void InspectorFretDiagram::clearButtonClicked()
void InspectorFretDiagram::clearButtonClicked()
{
f.diagram->clear();
}

View file

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>220</width>
<height>550</height>
<height>732</height>
</rect>
</property>
<property name="accessibleName">
@ -66,7 +66,7 @@
<verstretch>10</verstretch>
</sizepolicy>
</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">
<number>3</number>
</property>
@ -82,35 +82,101 @@
<property name="spacing">
<number>3</number>
</property>
<item row="3" column="2">
<widget class="Ms::ResetButton" name="resetFrets" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item row="6" column="1">
<widget class="QSpinBox" name="fretNumber">
<property name="accessibleName">
<string>Reset 'Frets' value</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>
<string>Fret number</string>
</property>
<property name="minimum">
<number>1</number>
</property>
</widget>
</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">
<widget class="QDoubleSpinBox" name="mag">
<property name="sizePolicy">
@ -136,82 +202,7 @@
</property>
</widget>
</item>
<item row="0" column="0">
<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">
<item row="7" column="0" colspan="2">
<widget class="QCheckBox" name="showNut">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@ -227,7 +218,7 @@
</property>
</widget>
</item>
<item row="5" column="1">
<item row="6" column="1">
<widget class="QSpinBox" name="fretNumber">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@ -243,7 +234,43 @@
</property>
</widget>
</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">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@ -259,92 +286,20 @@
</property>
</widget>
</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">
<widget class="Ms::ResetButton" name="resetStrings" native="true">
<widget class="Ms::ResetButton" name="resetOrientation" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="accessibleName">
<string>Reset 'Strings' value</string>
<string>Reset 'Orientation' value</string>
</property>
</widget>
</item>
<item row="3" 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="11" column="0" colspan="3">
<item row="13" column="0" colspan="3">
<layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="3">
<widget class="QPushButton" name="squareSelect">
@ -529,6 +484,93 @@
</item>
</layout>
</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>
</widget>
</item>
@ -551,7 +593,6 @@
<tabstops>
<tabstop>title</tabstop>
<tabstop>mag</tabstop>
<tabstop>placement</tabstop>
<tabstop>frets</tabstop>
</tabstops>
<resources/>

View file

@ -4,7 +4,7 @@
# create reference
#
MSCORE=../build.debug/mscore/mscore
MSCORE=../build.debug/main/mscore
#MSCORE=mscore2
DPI=130

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB