inspector for Marker/Jump properties
This commit is contained in:
parent
d846e3d0d3
commit
a80f730b08
16 changed files with 445 additions and 430 deletions
|
@ -42,8 +42,7 @@ QT4_WRAP_UI (ui_headers
|
|||
measureproperties.ui segment.ui text.ui textpalette.ui timedialog.ui
|
||||
symboldialog.ui dynamic.ui tuplet.ui shortcutcapturedialog.ui slurtie.ui
|
||||
slur.ui editdrumset.ui editstaff.ui line.ui linesegment.ui
|
||||
voltaproperties.ui timesigproperties.ui
|
||||
jumpproperties.ui markerproperties.ui boxproperties.ui
|
||||
voltaproperties.ui timesigproperties.ui boxproperties.ui
|
||||
instrwizard.ui timesigwizard.ui newwizard.ui aboutbox.ui aboutmusicxmlbox.ui
|
||||
chordedit.ui transposedialog.ui tempoproperties.ui
|
||||
lineproperties.ui excerptsdialog.ui lyrics.ui stafftext.ui
|
||||
|
@ -61,7 +60,7 @@ QT4_WRAP_UI (ui_headers
|
|||
rest.ui inspector_chord.ui omrpanel.ui startdialog.ui masterpalette.ui
|
||||
inspector_group_element.ui inspector_image.ui stem.ui inspector_lasso.ui
|
||||
inspector_volta.ui inspector_ottava.ui inspector_trill.ui inspector_hairpin.ui
|
||||
box.ui pluginManager.ui
|
||||
box.ui pluginManager.ui inspector_jump.ui inspector_marker.ui
|
||||
${SCRIPT_UI}
|
||||
)
|
||||
|
||||
|
@ -76,8 +75,7 @@ QT4_WRAP_CPP (mocs
|
|||
measureproperties.h seq.h textpalette.h textstyle.h
|
||||
timedialog.h symboldialog.h shortcutcapturedialog.h simplebutton.h
|
||||
greendotbutton.h recordbutton.h editdrumset.h editstaff.h selinstrument.h
|
||||
voltaproperties.h timesigproperties.h
|
||||
jumpproperties.h markerproperties.h boxproperties.h newwizard.h
|
||||
voltaproperties.h timesigproperties.h boxproperties.h newwizard.h
|
||||
transposedialog.h chordedit.h tempoproperties.h lineproperties.h
|
||||
excerptsdialog.h stafftextproperties.h glissandoproperties.h
|
||||
articulationprop.h metaedit.h magbox.h voiceselector.h
|
||||
|
@ -94,6 +92,7 @@ QT4_WRAP_CPP (mocs
|
|||
inspectorGroupElement.h inspectorImage.h waveview.h helpBrowser.h
|
||||
inspectorLasso.h inspectorVolta.h inspectorOttava.h inspectorTrill.h
|
||||
inspectorHairpin.h qmlplugin.h palettebox.h workspace.h pluginManager.h
|
||||
inspectorJump.h inspectorMarker.h
|
||||
${OMR_MOCS}
|
||||
${SCRIPT_MOCS}
|
||||
)
|
||||
|
@ -190,8 +189,7 @@ add_executable ( ${ExecutableName}
|
|||
articulationprop.cpp textprop.cpp dynamicprop.cpp
|
||||
fretproperties.cpp sectionbreakprop.cpp hairpinprop.cpp
|
||||
bendproperties.cpp tremolobarprop.cpp file.cpp keyb.cpp osc.cpp
|
||||
layer.cpp jumpproperties.cpp selectdialog.cpp
|
||||
propertymenu.cpp shortcut.cpp bb.cpp
|
||||
layer.cpp selectdialog.cpp propertymenu.cpp shortcut.cpp bb.cpp
|
||||
inspector.cpp dragelement.cpp svggenerator.cpp
|
||||
inspectorBase.cpp inspectorBeam.cpp masterpalette.cpp
|
||||
inspectorGroupElement.cpp dragdrop.cpp inspectorImage.cpp
|
||||
|
@ -199,7 +197,7 @@ add_executable ( ${ExecutableName}
|
|||
editelement.cpp inspectorVolta.cpp inspectorOttava.cpp inspectorTrill.cpp
|
||||
inspectorHairpin.cpp qmlplugin.cpp
|
||||
musicxmlsupport.cpp exportxml.cpp importxml.cpp importxmlfirstpass.cpp
|
||||
savePositions.cpp pluginManager.cpp
|
||||
savePositions.cpp pluginManager.cpp inspectorJump.cpp inspectorMarker.cpp
|
||||
${OMR_FILES}
|
||||
${AUDIO}
|
||||
${SCRIPT_FILES}
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
#include "inspectorOttava.h"
|
||||
#include "inspectorTrill.h"
|
||||
#include "inspectorHairpin.h"
|
||||
#include "inspectorMarker.h"
|
||||
#include "inspectorJump.h"
|
||||
#include "musescore.h"
|
||||
#include "scoreview.h"
|
||||
|
||||
|
@ -79,6 +81,7 @@ Inspector::Inspector(QWidget* parent)
|
|||
sa->setWidget(mainWidget);
|
||||
|
||||
layout = new QVBoxLayout;
|
||||
layout->setSpacing(0);
|
||||
mainWidget->setLayout(layout);
|
||||
ie = 0;
|
||||
_element = 0;
|
||||
|
@ -116,11 +119,12 @@ void Inspector::setElement(Element* e)
|
|||
{
|
||||
// if the element is being set again because of an edit originated
|
||||
// from within the inspector itself, do nothing
|
||||
if(_inspectorEdit) { // if within an inspector-originated edit
|
||||
|
||||
if (_inspectorEdit) { // if within an inspector-originated edit
|
||||
_inspectorEdit = false; // reset flag
|
||||
if(_element == e) // if element is not changing...
|
||||
if (_element == e) // if element is not changing...
|
||||
return; // ...do nothing
|
||||
}
|
||||
}
|
||||
|
||||
if (e == 0 || _element == 0 || (e->type() != _element->type())) {
|
||||
if (ie)
|
||||
|
@ -184,6 +188,12 @@ void Inspector::setElement(Element* e)
|
|||
case Element::BAR_LINE:
|
||||
ie = new InspectorBarLine(this);
|
||||
break;
|
||||
case Element::JUMP:
|
||||
ie = new InspectorJump(this);
|
||||
break;
|
||||
case Element::MARKER:
|
||||
ie = new InspectorMarker(this);
|
||||
break;
|
||||
default:
|
||||
ie = new InspectorElement(this);
|
||||
break;
|
||||
|
@ -400,6 +410,7 @@ InspectorVBox::InspectorVBox(QWidget* parent)
|
|||
{
|
||||
QWidget* w = new QWidget;
|
||||
vb.setupUi(w);
|
||||
layout->setSpacing(0);
|
||||
layout->addWidget(w);
|
||||
|
||||
iList[0].t = P_TOP_GAP;
|
||||
|
|
|
@ -403,7 +403,8 @@ class Inspector : public QDockWidget {
|
|||
InspectorBase* ie;
|
||||
Element* _element;
|
||||
QList<Element*> _el;
|
||||
bool _inspectorEdit; // set to true when an edit originates from within the inspector itself
|
||||
bool _inspectorEdit; // set to true when an edit originates from
|
||||
// within the inspector itself
|
||||
|
||||
virtual void closeEvent(QCloseEvent*);
|
||||
|
||||
|
|
83
mscore/inspectorJump.cpp
Normal file
83
mscore/inspectorJump.cpp
Normal file
|
@ -0,0 +1,83 @@
|
|||
//=============================================================================
|
||||
// MuseScore
|
||||
// Music Composition & Notation
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 2012 Werner Schweer
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2
|
||||
// as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE.GPL
|
||||
//=============================================================================
|
||||
|
||||
#include "inspectorJump.h"
|
||||
#include "musescore.h"
|
||||
#include "libmscore/jump.h"
|
||||
#include "libmscore/score.h"
|
||||
|
||||
//---------------------------------------------------------
|
||||
// InspectorJump
|
||||
//---------------------------------------------------------
|
||||
|
||||
InspectorJump::InspectorJump(QWidget* parent)
|
||||
: InspectorBase(parent)
|
||||
{
|
||||
iElement = new InspectorElementElement(this);
|
||||
layout->addWidget(iElement);
|
||||
QWidget* w = new QWidget;
|
||||
iJump.setupUi(w);
|
||||
layout->addWidget(w);
|
||||
connect(iJump.jumpTo, SIGNAL(textChanged(const QString&)), SLOT(apply()));
|
||||
connect(iJump.playUntil, SIGNAL(textChanged(const QString&)), SLOT(apply()));
|
||||
connect(iJump.continueAt, SIGNAL(textChanged(const QString&)), SLOT(apply()));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// setElement
|
||||
//---------------------------------------------------------
|
||||
|
||||
void InspectorJump::setElement(Element* e)
|
||||
{
|
||||
Jump* jump = static_cast<Jump*>(e);
|
||||
iElement->setElement(jump);
|
||||
|
||||
iJump.jumpTo->blockSignals(true);
|
||||
iJump.playUntil->blockSignals(true);
|
||||
iJump.continueAt->blockSignals(true);
|
||||
|
||||
iJump.jumpTo->setText(jump->jumpTo());
|
||||
iJump.playUntil->setText(jump->playUntil());
|
||||
iJump.continueAt->setText(jump->continueAt());
|
||||
|
||||
iJump.jumpTo->blockSignals(false);
|
||||
iJump.playUntil->blockSignals(false);
|
||||
iJump.continueAt->blockSignals(false);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// apply
|
||||
//---------------------------------------------------------
|
||||
|
||||
void InspectorJump::apply()
|
||||
{
|
||||
Jump* jump = static_cast<Jump*>(inspector->element());
|
||||
|
||||
if (iJump.jumpTo->text() != jump->jumpTo()
|
||||
|| iJump.playUntil->text() != jump->playUntil()
|
||||
|| iJump.continueAt->text() != jump->continueAt()) {
|
||||
Score* score = jump->score();
|
||||
score->startCmd();
|
||||
|
||||
if (iJump.jumpTo->text() != jump->jumpTo())
|
||||
score->undoChangeProperty(jump, P_JUMP_TO, iJump.jumpTo->text());
|
||||
if (iJump.playUntil->text() != jump->playUntil())
|
||||
score->undoChangeProperty(jump, P_PLAY_UNTIL, iJump.playUntil->text());
|
||||
if (iJump.continueAt->text() != jump->continueAt())
|
||||
score->undoChangeProperty(jump, P_CONTINUE_AT, iJump.continueAt->text());
|
||||
|
||||
score->endCmd();
|
||||
mscore->endCmd();
|
||||
}
|
||||
}
|
||||
|
42
mscore/inspectorJump.h
Normal file
42
mscore/inspectorJump.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
//=============================================================================
|
||||
// MuseScore
|
||||
// Music Composition & Notation
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 2012 Werner Schweer and others
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2
|
||||
// as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE.GPL
|
||||
//=============================================================================
|
||||
|
||||
#ifndef __INSPECTOR_JUMP_H__
|
||||
#define __INSPECTOR_JUMP_H__
|
||||
|
||||
#include "inspector.h"
|
||||
#include "ui_inspector_jump.h"
|
||||
#include "libmscore/property.h"
|
||||
|
||||
//---------------------------------------------------------
|
||||
// InspectorJump
|
||||
//---------------------------------------------------------
|
||||
|
||||
class InspectorJump : public InspectorBase {
|
||||
Q_OBJECT
|
||||
|
||||
InspectorElementElement* iElement;
|
||||
Ui::InspectorJump iJump;
|
||||
|
||||
public slots:
|
||||
virtual void apply();
|
||||
|
||||
public:
|
||||
InspectorJump(QWidget* parent);
|
||||
virtual void setElement(Element*);
|
||||
bool dirty() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
74
mscore/inspectorMarker.cpp
Normal file
74
mscore/inspectorMarker.cpp
Normal file
|
@ -0,0 +1,74 @@
|
|||
//=============================================================================
|
||||
// MuseScore
|
||||
// Music Composition & Notation
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 2012 Werner Schweer
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2
|
||||
// as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE.GPL
|
||||
//=============================================================================
|
||||
|
||||
#include "inspectorMarker.h"
|
||||
#include "musescore.h"
|
||||
#include "libmscore/marker.h"
|
||||
#include "libmscore/score.h"
|
||||
|
||||
//---------------------------------------------------------
|
||||
// inspectorMarker
|
||||
//---------------------------------------------------------
|
||||
|
||||
InspectorMarker::InspectorMarker(QWidget* parent)
|
||||
: InspectorBase(parent)
|
||||
{
|
||||
iElement = new InspectorElementElement(this);
|
||||
layout->addWidget(iElement);
|
||||
QWidget* w = new QWidget;
|
||||
iMarker.setupUi(w);
|
||||
layout->addWidget(w);
|
||||
connect(iMarker.subtype, SIGNAL(currentIndexChanged(int)), SLOT(apply()));
|
||||
connect(iMarker.jumpLabel, SIGNAL(textChanged(const QString&)), SLOT(apply()));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// setElement
|
||||
//---------------------------------------------------------
|
||||
|
||||
void InspectorMarker::setElement(Element* e)
|
||||
{
|
||||
Marker* marker = static_cast<Marker*>(e);
|
||||
iElement->setElement(marker);
|
||||
|
||||
iMarker.subtype->blockSignals(true);
|
||||
iMarker.jumpLabel->blockSignals(true);
|
||||
|
||||
iMarker.subtype->setCurrentIndex(int(marker->markerType()));
|
||||
iMarker.jumpLabel->setText(marker->label());
|
||||
|
||||
iMarker.subtype->blockSignals(false);
|
||||
iMarker.jumpLabel->blockSignals(false);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// apply
|
||||
//---------------------------------------------------------
|
||||
|
||||
void InspectorMarker::apply()
|
||||
{
|
||||
Marker* marker = static_cast<Marker*>(inspector->element());
|
||||
|
||||
if (iMarker.subtype->currentIndex() != int(marker->markerType())
|
||||
|| iMarker.jumpLabel->text() != marker->label()) {
|
||||
Score* score = marker->score();
|
||||
score->startCmd();
|
||||
score->undoChangeProperty(marker, P_MARKER_TYPE, iMarker.subtype->currentIndex());
|
||||
score->undoChangeProperty(marker, P_LABEL, iMarker.jumpLabel->text());
|
||||
score->endCmd();
|
||||
mscore->endCmd();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
42
mscore/inspectorMarker.h
Normal file
42
mscore/inspectorMarker.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
//=============================================================================
|
||||
// MuseScore
|
||||
// Music Composition & Notation
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 2013 Werner Schweer and others
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2
|
||||
// as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE.GPL
|
||||
//=============================================================================
|
||||
|
||||
#ifndef __INSPECTOR_MARKER_H__
|
||||
#define __INSPECTOR_MARKER_H__
|
||||
|
||||
#include "inspector.h"
|
||||
#include "ui_inspector_marker.h"
|
||||
#include "libmscore/property.h"
|
||||
|
||||
//---------------------------------------------------------
|
||||
// InspectorMarker
|
||||
//---------------------------------------------------------
|
||||
|
||||
class InspectorMarker : public InspectorBase {
|
||||
Q_OBJECT
|
||||
|
||||
InspectorElementElement* iElement;
|
||||
Ui::InspectorMarker iMarker;
|
||||
|
||||
public slots:
|
||||
virtual void apply();
|
||||
|
||||
public:
|
||||
InspectorMarker(QWidget* parent);
|
||||
virtual void setElement(Element*);
|
||||
bool dirty() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -7,13 +7,19 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>160</width>
|
||||
<height>155</height>
|
||||
<height>138</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="elementName">
|
||||
<property name="font">
|
||||
|
@ -45,6 +51,9 @@
|
|||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="offsetX">
|
||||
<property name="sizePolicy">
|
||||
|
@ -141,7 +150,7 @@
|
|||
<item row="0" column="1">
|
||||
<widget class="Awl::ColorLabel" name="color">
|
||||
<property name="frameShape">
|
||||
<set>QFrame::Box</set>
|
||||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
70
mscore/inspector_jump.ui
Normal file
70
mscore/inspector_jump.ui
Normal file
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>InspectorJump</class>
|
||||
<widget class="QWidget" name="InspectorJump">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>287</width>
|
||||
<height>116</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::HLine</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>2</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="jumpTo"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>JumpTo</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Play Until</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Continue At</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="playUntil"/>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="continueAt"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="musescore.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
101
mscore/inspector_marker.ui
Normal file
101
mscore/inspector_marker.ui
Normal file
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>InspectorMarker</class>
|
||||
<widget class="QWidget" name="InspectorMarker">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>287</width>
|
||||
<height>93</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::HLine</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>2</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Marker Type</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="subtype">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Segno</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Segno Variation</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Coda</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Coda Variation</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Codetta</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Fine</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>To Coda</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>User defined</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="jumpLabel"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="musescore.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -1,75 +0,0 @@
|
|||
//=============================================================================
|
||||
// MuseScore
|
||||
// Linux Music Score Editor
|
||||
// $Id: repeat.cpp -1 $
|
||||
//
|
||||
// Copyright (C) 2002-2011 Werner Schweer and others
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//=============================================================================
|
||||
|
||||
#include "libmscore/jump.h"
|
||||
#include "libmscore/marker.h"
|
||||
#include "jumpproperties.h"
|
||||
#include "markerproperties.h"
|
||||
|
||||
//---------------------------------------------------------
|
||||
// JumpProperties
|
||||
//---------------------------------------------------------
|
||||
|
||||
JumpProperties::JumpProperties(Jump* jp, QWidget* parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
jump = jp;
|
||||
setupUi(this);
|
||||
setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
jumpTo->setText(jump->jumpTo());
|
||||
playUntil->setText(jump->playUntil());
|
||||
continueAt->setText(jump->continueAt());
|
||||
connect(this, SIGNAL(accepted()), SLOT(saveValues()));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// saveValues
|
||||
//---------------------------------------------------------
|
||||
|
||||
void JumpProperties::saveValues()
|
||||
{
|
||||
jump->undoSetJumpTo(jumpTo->text());
|
||||
jump->undoSetPlayUntil(playUntil->text());
|
||||
jump->undoSetContinueAt(continueAt->text());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// MarkerProperties
|
||||
//---------------------------------------------------------
|
||||
|
||||
MarkerProperties::MarkerProperties(Marker* mk, QWidget* parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
marker = mk;
|
||||
setupUi(this);
|
||||
setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
label->setText(marker->label());
|
||||
connect(this, SIGNAL(accepted()), SLOT(saveValues()));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// saveValues
|
||||
//---------------------------------------------------------
|
||||
|
||||
void MarkerProperties::saveValues()
|
||||
{
|
||||
marker->undoSetLabel(label->text());
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
//=============================================================================
|
||||
// MusE Score
|
||||
// Linux Music Score Editor
|
||||
// $Id: jumpproperties.h 1840 2009-05-20 11:57:51Z wschweer $
|
||||
//
|
||||
// Copyright (C) 2002-2009 Werner Schweer and others
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//=============================================================================
|
||||
|
||||
#ifndef __JUMPPROPERTIES_H__
|
||||
#define __JUMPPROPERTIES_H__
|
||||
|
||||
#include "ui_jumpproperties.h"
|
||||
|
||||
class Jump;
|
||||
|
||||
//---------------------------------------------------------
|
||||
// JumpProperties
|
||||
//---------------------------------------------------------
|
||||
|
||||
class JumpProperties : public QDialog, public Ui::JumpPropertyBase {
|
||||
Q_OBJECT
|
||||
|
||||
Jump* jump;
|
||||
|
||||
private slots:
|
||||
void saveValues();
|
||||
|
||||
public:
|
||||
JumpProperties(Jump*, QWidget* parent = 0);
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,106 +0,0 @@
|
|||
<ui version="4.0" >
|
||||
<class>JumpPropertyBase</class>
|
||||
<widget class="QDialog" name="JumpPropertyBase" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>326</width>
|
||||
<height>222</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Jump Properties</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<string>Jump to:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="jumpTo" />
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="text" >
|
||||
<string>Play until:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="playUntil" />
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2" >
|
||||
<widget class="QDialogButtonBox" name="buttonBox" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons" >
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_3" >
|
||||
<property name="text" >
|
||||
<string>Continue at:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QLineEdit" name="continueAt" />
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>JumpPropertyBase</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>JumpPropertyBase</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
|
@ -1,44 +0,0 @@
|
|||
//=============================================================================
|
||||
// MusE Score
|
||||
// Linux Music Score Editor
|
||||
// $Id: markerproperties.h 1840 2009-05-20 11:57:51Z wschweer $
|
||||
//
|
||||
// Copyright (C) 2002-2009 Werner Schweer and others
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//=============================================================================
|
||||
|
||||
#ifndef __MARKERPROPERTIES_H__
|
||||
#define __MARKERPROPERTIES_H__
|
||||
|
||||
#include "ui_markerproperties.h"
|
||||
|
||||
class Marker;
|
||||
|
||||
//---------------------------------------------------------
|
||||
// MarkerProperties
|
||||
//---------------------------------------------------------
|
||||
|
||||
class MarkerProperties : public QDialog, public Ui::MarkerPropertyBase {
|
||||
Q_OBJECT
|
||||
|
||||
Marker* marker;
|
||||
|
||||
private slots:
|
||||
void saveValues();
|
||||
|
||||
public:
|
||||
MarkerProperties(Marker*, QWidget* parent = 0);
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,129 +0,0 @@
|
|||
<ui version="4.0" >
|
||||
<class>MarkerPropertyBase</class>
|
||||
<widget class="QDialog" name="MarkerPropertyBase" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>189</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Marker Properties</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2" >
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Ignored" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap" >
|
||||
<pixmap resource="musescore.qrc" >:/data/bg1.jpg</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" >
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label2" >
|
||||
<property name="text" >
|
||||
<string>Label:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="label" />
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<spacer name="verticalSpacer" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons" >
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="musescore.qrc" />
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>MarkerPropertyBase</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>MarkerPropertyBase</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
|
@ -37,8 +37,6 @@
|
|||
#include "slurproperties.h"
|
||||
#include "glissandoproperties.h"
|
||||
#include "fretproperties.h"
|
||||
#include "markerproperties.h"
|
||||
#include "jumpproperties.h"
|
||||
#include "selinstrument.h"
|
||||
#include "chordedit.h"
|
||||
#include "pianoroll.h"
|
||||
|
@ -324,14 +322,6 @@ void ScoreView::createElementPropertyMenu(Element* e, QMenu* popup)
|
|||
}
|
||||
popup->addAction(tr("Chord Articulation..."))->setData("articulation");
|
||||
}
|
||||
else if (e->type() == Element::MARKER) {
|
||||
genPropertyMenu1(e, popup);
|
||||
popup->addAction(tr("Marker Properties..."))->setData("marker-props");
|
||||
}
|
||||
else if (e->type() == Element::JUMP) {
|
||||
genPropertyMenu1(e, popup);
|
||||
popup->addAction(tr("Jump Properties..."))->setData("jump-props");
|
||||
}
|
||||
else if (e->type() == Element::LAYOUT_BREAK && static_cast<LayoutBreak*>(e)->subtype() == LAYOUT_BREAK_SECTION) {
|
||||
popup->addAction(tr("Section Break Properties..."))->setData("break-props");
|
||||
}
|
||||
|
@ -693,14 +683,6 @@ void ScoreView::elementPropertyAction(const QString& cmd, Element* e)
|
|||
es.setPage(EditStyle::PAGE_NOTE);
|
||||
es.exec();
|
||||
}
|
||||
else if (cmd == "marker-props") {
|
||||
MarkerProperties rp(static_cast<Marker*>(e));
|
||||
rp.exec();
|
||||
}
|
||||
else if (cmd == "jump-props") {
|
||||
JumpProperties rp(static_cast<Jump*>(e));
|
||||
rp.exec();
|
||||
}
|
||||
else if (cmd == "break-props") {
|
||||
LayoutBreak* lb = static_cast<LayoutBreak*>(e);
|
||||
SectionBreakProperties sbp(lb, 0);
|
||||
|
|
Loading…
Reference in a new issue