fix ottava reset
This commit is contained in:
parent
025f37c36c
commit
ec77df240c
9 changed files with 200 additions and 28 deletions
|
@ -374,17 +374,6 @@ void LineSegment::spatiumChanged(qreal ov, qreal nv)
|
|||
_userOff2 *= nv / ov;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// reset
|
||||
// TODO: make undoable
|
||||
//---------------------------------------------------------
|
||||
|
||||
void LineSegment::reset()
|
||||
{
|
||||
Element::reset();
|
||||
setUserOff2(QPointF());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// getProperty
|
||||
//---------------------------------------------------------
|
||||
|
|
|
@ -66,7 +66,6 @@ class LineSegment : public SpannerSegment {
|
|||
virtual LineSegment* clone() const = 0;
|
||||
virtual void draw(QPainter*) const = 0;
|
||||
SLine* line() const { return (SLine*)spanner(); }
|
||||
virtual void reset();
|
||||
virtual void spatiumChanged(qreal, qreal);
|
||||
virtual QPointF pagePos() const;
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@ class OttavaSegment : public TextLineSegment {
|
|||
virtual PropertyStyle propertyStyle(P_ID) const override;
|
||||
virtual void resetProperty(P_ID id) override;
|
||||
virtual void styleChanged() override;
|
||||
virtual void reset() override { spanner()->reset(); }
|
||||
};
|
||||
|
||||
//---------------------------------------------------------
|
||||
|
|
|
@ -133,6 +133,17 @@ QVariant SpannerSegment::propertyDefault(P_ID id) const
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// reset
|
||||
//---------------------------------------------------------
|
||||
|
||||
void SpannerSegment::reset()
|
||||
{
|
||||
score()->undoChangeProperty(this, P_USER_OFF2, QPointF());
|
||||
Element::reset();
|
||||
spanner()->reset();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// Spanner
|
||||
//---------------------------------------------------------
|
||||
|
@ -449,6 +460,5 @@ Segment* Spanner::endSegment() const
|
|||
{
|
||||
return score()->tick2segment(tick2());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -74,6 +74,7 @@ class SpannerSegment : public Element {
|
|||
virtual QVariant getProperty(P_ID id) const override;
|
||||
virtual bool setProperty(P_ID id, const QVariant& v) override;
|
||||
virtual QVariant propertyDefault(P_ID id) const override;
|
||||
virtual void reset() override;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
|
@ -1749,6 +1749,7 @@ void ShowElementBase::setElement(Element* e)
|
|||
eb.offsety->setValue(e->userOff().y());
|
||||
eb.readPosX->setValue(e->readPos().x());
|
||||
eb.readPosY->setValue(e->readPos().y());
|
||||
eb.placement->setCurrentIndex(int(e->placement()));
|
||||
|
||||
#if 0
|
||||
Align a = e->align();
|
||||
|
@ -2545,6 +2546,17 @@ void TextLineSegmentView::setElement(Element* e)
|
|||
lb.pos2y->setValue(vs->pos2().y());
|
||||
lb.offset2x->setValue(vs->userOff2().x());
|
||||
lb.offset2y->setValue(vs->userOff2().y());
|
||||
connect(lb.line, SIGNAL(clicked()), SLOT(lineClicked()));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// lineClicked
|
||||
//---------------------------------------------------------
|
||||
|
||||
void TextLineSegmentView::lineClicked()
|
||||
{
|
||||
Spanner* sp = static_cast<SpannerSegment*>(element())->spanner();
|
||||
emit elementChanged(sp);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
|
|
|
@ -544,6 +544,9 @@ class TextLineSegmentView : public ShowElementBase {
|
|||
|
||||
Ui::LineSegmentBase lb;
|
||||
|
||||
private slots:
|
||||
void lineClicked();
|
||||
|
||||
public:
|
||||
TextLineSegmentView();
|
||||
virtual void setElement(Element*);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>669</width>
|
||||
<width>743</width>
|
||||
<height>278</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -150,17 +150,20 @@
|
|||
<property name="verticalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="1" column="2">
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="droptarget">
|
||||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">droptarget</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="5">
|
||||
<item row="2" column="4">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
|
@ -171,6 +174,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true" comment="do not translate">Color</string>
|
||||
</property>
|
||||
|
@ -185,17 +191,20 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="generated">
|
||||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true" comment="do not translate">generated</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="6">
|
||||
<item row="1" column="5">
|
||||
<widget class="QDoubleSpinBox" name="mag">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
|
@ -206,6 +215,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||
</property>
|
||||
|
@ -219,22 +231,28 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true" comment="do not translate">selected</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<item row="0" column="2">
|
||||
<widget class="QCheckBox" name="visible">
|
||||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true" comment="do not translate">visible</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<item row="1" column="4">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
|
@ -245,6 +263,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true" comment="do not translate">Mag</string>
|
||||
</property>
|
||||
|
@ -256,7 +277,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="6">
|
||||
<item row="2" column="5">
|
||||
<widget class="Awl::ColorLabel" name="color">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
|
@ -272,7 +293,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<item row="0" column="4">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
|
@ -283,6 +304,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true" comment="do not translate">subtype</string>
|
||||
</property>
|
||||
|
@ -294,7 +318,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<item row="0" column="5">
|
||||
<widget class="QSpinBox" name="subtype">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
|
@ -305,6 +329,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -321,25 +348,34 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">selectable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<item row="1" column="2">
|
||||
<widget class="QCheckBox" name="systemFlag">
|
||||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true" comment="do not translate">system</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="4">
|
||||
<item row="2" column="0" colspan="3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">Track</string>
|
||||
</property>
|
||||
|
@ -353,6 +389,9 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="track">
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -366,6 +405,9 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">Z</string>
|
||||
</property>
|
||||
|
@ -379,6 +421,9 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="z">
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -392,6 +437,33 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string notr="true">placement</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7">
|
||||
<widget class="QComboBox" name="placement">
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>above</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>below</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -410,6 +482,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true" comment="do not translate">Pos</string>
|
||||
</property>
|
||||
|
@ -435,6 +510,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true">relative x position</string>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -460,6 +538,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true">relative y position</string>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -485,6 +566,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true" comment="do not translate">BBox</string>
|
||||
</property>
|
||||
|
@ -510,6 +594,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -535,6 +622,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -560,6 +650,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -585,6 +678,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -610,6 +706,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true">canvas x position</string>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||
</property>
|
||||
|
@ -632,6 +731,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true">canvas y position</string>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||
</property>
|
||||
|
@ -654,6 +756,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true">read x position</string>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||
</property>
|
||||
|
@ -676,6 +781,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true">read y position</string>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||
</property>
|
||||
|
@ -698,6 +806,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">Rpos</string>
|
||||
</property>
|
||||
|
@ -720,6 +831,18 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleName">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true" comment="do not translate">Uoff</string>
|
||||
</property>
|
||||
|
@ -742,6 +865,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true">user x offset</string>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||
</property>
|
||||
|
@ -770,6 +896,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||
</property>
|
||||
|
@ -798,6 +927,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">CPos</string>
|
||||
</property>
|
||||
|
@ -820,6 +952,9 @@
|
|||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">w/h</string>
|
||||
</property>
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>480</width>
|
||||
<height>131</height>
|
||||
<width>679</width>
|
||||
<height>168</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -177,6 +177,30 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="line">
|
||||
<property name="text">
|
||||
<string>Line</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Reference in a new issue