This commit is contained in:
ws 2013-05-14 13:38:39 +02:00
commit 55f063a0b2
771 changed files with 19195 additions and 19655 deletions

View file

@ -36,7 +36,7 @@ include (GetCompilerVersion)
include (CreatePrecompiledHeader)
# for debugging the make system uncomment next line:
set(CMAKE_VERBOSE_MAKEFILE ON)
# set(CMAKE_VERBOSE_MAKEFILE ON)
set(MSCORE_UNSTABLE TRUE) # mark as unstable

View file

@ -23,8 +23,10 @@
#include "aeolus.h"
#include "model.h"
extern QString dataPath;
extern QString mscoreGlobalShare;
namespace Ms {
extern QString dataPath;
extern QString mscoreGlobalShare;
};
#include "synthesizer/event.h"
#include "libmscore/xml.h"
@ -46,7 +48,6 @@ Synthesizer* createAeolus()
return new Aeolus();
}
//---------------------------------------------------------
// Aeolus
//---------------------------------------------------------

View file

@ -21,9 +21,6 @@
#ifndef __AEOLUS_H__
#define __AEOLUS_H__
struct MidiPatch;
class Event;
#include "stdint.h"
#include "synthesizer/synthesizer.h"
#include "synthesizer/midipatch.h"
@ -32,11 +29,19 @@ class Event;
#include "division.h"
#include "global.h"
namespace Ms {
struct MidiPatch;
class Event;
class ParDescr;
}
using namespace Ms;
class Model;
// class M_audio_info;
class M_new_divis;
class M_ifc_init;
class ParDescr;
//---------------------------------------------------------
// Synth

View file

@ -20,9 +20,9 @@
#ifndef __ASECTION_H
#define __ASECTION_H
#include "global.h"
using namespace Ms;
#define PERIOD 64
#define MIXLEN 64

View file

@ -20,7 +20,8 @@
#include "libmscore/xml.h"
#include "sparm_p.h"
// #include "synti.h"
using namespace Ms;
//---------------------------------------------------------
// SyntiParameterData

View file

@ -21,8 +21,11 @@
#ifndef __SPARM_H__
#define __SPARM_H__
class Xml;
class Synth;
namespace Ms {
class Xml;
class Synth;
}
class SyntiParameterData;
//---------------------------------------------------------
@ -52,7 +55,7 @@ class SyntiParameter {
SyntiParameterType type() const;
void write(Xml&) const;
void write(Ms::Xml&) const;
const QString& name() const;
void setName(const QString& s);

View file

@ -70,7 +70,7 @@ class SyntiParameterData : public QSharedData {
SyntiParameterData(int id, const QString& name, const QString& val);
SyntiParameterData(const SyntiParameterData& pd);
virtual void write(Xml&) const;
virtual void write(Ms::Xml&) const;
virtual bool operator==(const SyntiParameterData&) const;
virtual void print() const;

View file

@ -24,6 +24,7 @@
#include "libmscore/pos.h"
namespace Awl {
using namespace Ms;
//---------------------------------------------------------
// PosLabel
@ -40,7 +41,7 @@ class PosLabel : public QLabel {
QSize sizeHint() const;
public slots:
void setValue(const Pos&);
void setValue(const Ms::Pos&);
public:
PosLabel(QWidget* parent = 0);

View file

@ -20,13 +20,13 @@ endif (APPLE)
QT4_ADD_RESOURCES (qrc_effects_files
zita1/zita.qrc
freeverb/freeverb.qrc
# freeverb/freeverb.qrc
noeffect/noeffect.qrc
)
QT4_WRAP_CPP(effectMocs
effectgui.h
freeverb/freeverb.h
# freeverb/freeverb.h
zita1/zita.h
noeffect/noeffect.h
effect.h
@ -40,8 +40,8 @@ add_library (effects STATIC
effect.cpp
effectgui.cpp
noeffect/noeffect.cpp
freeverb/freeverb.cpp
freeverb/freeverbgui.cpp
# freeverb/freeverb.cpp
# freeverb/freeverbgui.cpp
zita1/zita.cpp
zita1/zitagui.cpp
${INCS}

View file

@ -12,6 +12,8 @@
#include "effect.h"
namespace Ms {
//---------------------------------------------------------
// parameter
//---------------------------------------------------------
@ -75,4 +77,5 @@ double Effect::value(int idx) const
v = (v - p->min)/(p->max - p->min);
return v;
}
}

View file

@ -16,6 +16,8 @@
#include <vector>
#include "libmscore/synthesizerstate.h"
namespace Ms {
class EffectGui;
//---------------------------------------------------------
@ -67,6 +69,6 @@ class Effect : public QObject {
virtual EffectGui* gui() { return _gui; }
};
}
#endif

View file

@ -14,6 +14,8 @@
#include "effect.h"
#include <QDeclarativeContext>
namespace Ms {
//---------------------------------------------------------
// EffectGui
//---------------------------------------------------------
@ -70,4 +72,5 @@ void EffectGui::updateValues()
}
}
}
}

View file

@ -13,6 +13,8 @@
#ifndef __EFFECTGUI_H__
#define __EFFECTGUI_H__
namespace Ms {
class Effect;
//---------------------------------------------------------
@ -36,5 +38,6 @@ class EffectGui : public QDeclarativeView {
virtual void updateValues();
};
}
#endif

View file

@ -14,6 +14,8 @@
#include "effects/effectgui.h"
#include "noeffect.h"
namespace Ms {
static const std::vector<ParDescr> noeffectPd;
//---------------------------------------------------------
@ -42,4 +44,5 @@ void NoEffect::process(int n, float* src, float* dst)
memcpy(dst, src, n * 2 * sizeof(float));
}
}

View file

@ -15,6 +15,8 @@
#include "effects/effect.h"
namespace Ms {
class EffectGui;
//---------------------------------------------------------
@ -40,6 +42,7 @@ class NoEffect : public Effect
virtual EffectGui* gui();
virtual const std::vector<ParDescr>& parDescr() const;
};
}
#endif

View file

@ -19,6 +19,8 @@
#include <math.h>
#include "zita.h"
namespace Ms {
enum {
R_DELAY, R_XOVER, R_RTLOW, R_RTMID, R_FDAMP,
R_EQ1FR, R_EQ1GN,
@ -552,4 +554,5 @@ void ZitaReverb::setState(const SynthesizerGroup& g)
for (const IdValue& v : g)
setValue(v.id, v.data.toDouble());
}
}

View file

@ -21,6 +21,8 @@
#include "effects/effect.h"
namespace Ms {
class EffectGui;
//---------------------------------------------------------
@ -280,6 +282,7 @@ class ZitaReverb : public Effect
virtual SynthesizerGroup state() const;
virtual void setState(const SynthesizerGroup&);
};
}
#endif

View file

@ -13,6 +13,8 @@
#include "zita.h"
#include "effects/effectgui.h"
namespace Ms {
//---------------------------------------------------------
// gui
//---------------------------------------------------------
@ -27,3 +29,6 @@ EffectGui* ZitaReverb::gui()
_gui->init(url);
return _gui;
}
}

View file

@ -29,6 +29,7 @@
#include "voice.h"
namespace FluidS {
using namespace Ms;
/***************************************************************
*

View file

@ -27,6 +27,8 @@
namespace FluidS {
using namespace Ms;
class Voice;
class SFont;
class Preset;

View file

@ -11,9 +11,10 @@
//=============================================================================
#include "fluidgui.h"
#include "mscore/preferences.h"
using namespace Ms;
SfListDialog::SfListDialog()
: QDialog(0)
{

View file

@ -40,7 +40,7 @@ class SfListDialog : public QDialog {
// FluidGui
//---------------------------------------------------------
class FluidGui : public SynthesizerGui, Ui::FluidGui {
class FluidGui : public Ms::SynthesizerGui, Ui::FluidGui {
Q_OBJECT
FluidS::Fluid* fluid() { return static_cast<FluidS::Fluid*>(synthesizer()); }
@ -57,7 +57,7 @@ class FluidGui : public SynthesizerGui, Ui::FluidGui {
virtual void synthesizerChanged();
public:
FluidGui(Synthesizer*);
FluidGui(Ms::Synthesizer*);
};
#endif

View file

@ -18,6 +18,8 @@
#include "staff.h"
#include "undo.h"
namespace Ms {
//---------------------------------------------------------
// Acc
//---------------------------------------------------------
@ -481,3 +483,5 @@ AccidentalBracket::AccidentalBracket(Score* s)
addElement(s2, s2->bbox().width() - s2->bbox().x(), 0.0);
}
}

View file

@ -21,9 +21,12 @@
#include "element.h"
#include "mscore.h"
class Note;
class QPainter;
namespace Ms {
class Note;
//---------------------------------------------------------
// SymElement
//---------------------------------------------------------
@ -141,9 +144,6 @@ private:
static AccidentalType name2subtype(const QString&);
};
Q_DECLARE_METATYPE(Accidental::AccidentalRole)
Q_DECLARE_METATYPE(Accidental::AccidentalType)
//---------------------------------------------------------
// @@ AccidentalBracket
/// used as icon in palette
@ -158,5 +158,11 @@ class AccidentalBracket : public Compound {
virtual ElementType type() const { return ACCIDENTAL_BRACKET; }
};
} // namespace Ms
Q_DECLARE_METATYPE(Ms::Accidental::AccidentalRole)
Q_DECLARE_METATYPE(Ms::Accidental::AccidentalType)
#endif

View file

@ -20,6 +20,8 @@
#include "segment.h"
#include "property.h"
namespace Ms {
//---------------------------------------------------------
// Arpeggio
//---------------------------------------------------------
@ -378,3 +380,5 @@ bool Arpeggio::setProperty(P_ID propertyId, const QVariant& val)
}
}

View file

@ -15,9 +15,12 @@
#include "element.h"
class Chord;
class QPainter;
namespace Ms {
class Chord;
enum class ArpeggioType {
NORMAL, UP, DOWN, BRACKET, UP_STRAIGHT, DOWN_STRAIGHT
};
@ -72,5 +75,7 @@ class Arpeggio : public Element {
virtual bool setProperty(P_ID propertyId, const QVariant&);
};
} // namespace Ms
#endif

View file

@ -21,6 +21,8 @@
#include "page.h"
#include "barline.h"
namespace Ms {
//---------------------------------------------------------
// Articulation::articulationList
//---------------------------------------------------------
@ -489,3 +491,6 @@ bool Articulation::setProperty(P_ID propertyId, const QVariant& v)
return true;
}
}

View file

@ -18,6 +18,9 @@
#include "sym.h"
class QPainter;
namespace Ms {
class ChordRest;
//---------------------------------------------------------
@ -111,5 +114,7 @@ class Articulation : public Element {
static QString idx2name(int idx);
};
} // namespace Ms
#endif

View file

@ -13,6 +13,8 @@
#include "audio.h"
#include "xml.h"
namespace Ms {
//---------------------------------------------------------
// Audio
//---------------------------------------------------------
@ -46,3 +48,5 @@ void Audio::write(Xml& xml) const
xml.etag();
}
}

View file

@ -13,6 +13,8 @@
#ifndef __AUDIO_H__
#define __AUDIO_H__
namespace Ms {
class Xml;
class XmlReader;
@ -36,5 +38,7 @@ class Audio {
void write(Xml&) const;
};
} // namespace Ms
#endif

View file

@ -20,6 +20,8 @@
#include "articulation.h"
#include "stafftype.h"
namespace Ms {
//---------------------------------------------------------
// static members init
//---------------------------------------------------------
@ -1027,3 +1029,6 @@ QVariant BarLine::propertyDefault(P_ID propertyId) const
}
return Element::propertyDefault(propertyId);
}
}

View file

@ -15,9 +15,12 @@
#include "element.h"
class QPainter;
namespace Ms {
class MuseScoreView;
class Segment;
class QPainter;
static const int DEFAULT_BARLINE_TO = 4 * 2;
static const int MIN_BARLINE_FROMTO_DIST = 2;
@ -110,5 +113,7 @@ class BarLine : public Element {
static qreal layoutWidth(Score*, BarLineType, qreal mag);
};
} // namespace Ms
#endif

View file

@ -31,6 +31,8 @@
#include "stemslash.h"
#include "groups.h"
namespace Ms {
//---------------------------------------------------------
// BeamFragment
// position of primary beam
@ -1753,7 +1755,7 @@ void Beam::read(XmlReader& e)
while (e.readNextStartElement()) {
const QStringRef& tag(e.name());
if (tag == "StemDirection") {
setProperty(P_STEM_DIRECTION, ::getProperty(P_STEM_DIRECTION, e));
setProperty(P_STEM_DIRECTION, Ms::getProperty(P_STEM_DIRECTION, e));
e.readNext();
}
else if (tag == "distribute")
@ -2069,3 +2071,5 @@ QVariant Beam::propertyDefault(P_ID id) const
}
}
}

View file

@ -17,10 +17,13 @@
#include "durationtype.h"
#include "spanner.h"
class QPainter;
namespace Ms {
class ChordRest;
class MuseScoreView;
class Chord;
class QPainter;
struct BeamFragment;
@ -123,5 +126,7 @@ class Beam : public Element {
QVariant propertyDefault(P_ID id) const;
};
} // namespace Ms
#endif

View file

@ -17,6 +17,8 @@
#include "chord.h"
#include "note.h"
namespace Ms {
//---------------------------------------------------------
// label
//---------------------------------------------------------
@ -277,3 +279,5 @@ void Bend::read(XmlReader& e)
}
}
}

View file

@ -18,6 +18,8 @@
class QPainter;
namespace Ms {
//---------------------------------------------------------
// @@ Bend
//---------------------------------------------------------
@ -43,5 +45,7 @@ class Bend : public Element {
void setPoints(const QList<PitchValue>& p) { _points = p; }
};
} // namespace Ms
#endif

View file

@ -25,6 +25,8 @@
#include "stafftext.h"
#include "icon.h"
namespace Ms {
static const qreal BOX_MARGIN = 0.0;
//---------------------------------------------------------
@ -622,3 +624,5 @@ void FBox::add(Element* e)
_el.push_back(e);
}
}

View file

@ -19,11 +19,13 @@
*/
#include "measurebase.h"
class QPainter;
namespace Ms {
class BarLine;
class MuseScoreView;
class Text;
class QPainter;
//---------------------------------------------------------
// @@ Box
@ -143,5 +145,7 @@ class FBox : public VBox {
void add(Element*);
};
} // namespace Ms
#endif

View file

@ -20,6 +20,8 @@
#include "sym.h"
#include "mscore.h"
namespace Ms {
//---------------------------------------------------------
// Bracket
//---------------------------------------------------------
@ -352,3 +354,5 @@ bool Bracket::edit(MuseScoreView*, int, int key, Qt::KeyboardModifiers modifiers
return false;
}
}

View file

@ -16,9 +16,12 @@
#include "element.h"
#include "mscore.h"
class QPainter;
namespace Ms {
class MuseScoreView;
class System;
class QPainter;
//---------------------------------------------------------
// @@ Bracket
@ -79,5 +82,7 @@ class Bracket : public Element {
virtual Element* drop(const DropData&);
};
} // namespace Ms
#endif

View file

@ -17,6 +17,8 @@
#include "measure.h"
#include "score.h"
namespace Ms {
int Breath::symList[Breath::breathSymbols] = {
rcommaSym,
lcommaSym,
@ -104,3 +106,5 @@ QPointF Breath::pagePos() const
return QPointF(pageX(), yp);
}
}

View file

@ -17,6 +17,8 @@
class QPainter;
namespace Ms {
//---------------------------------------------------------
// @@ Breath
/// brathT() is index in symList
@ -47,5 +49,7 @@ class Breath : public Element {
virtual QPointF pagePos() const; ///< position in page coordinates
};
} // namespace Ms
#endif

View file

@ -16,6 +16,8 @@
#include "bsp.h"
#include "element.h"
namespace Ms {
//---------------------------------------------------------
// InsertItemBspTreeVisitor
//---------------------------------------------------------
@ -350,3 +352,5 @@ QRectF BspTree::rectForIndex(int index) const
return rect;
}
}

View file

@ -16,6 +16,8 @@
#ifndef __BSP_H__
#define __BSP_H__
namespace Ms {
class BspTreeVisitor;
class InsertItemBspTreeVisitor;
class RemoveItemBspTreeVisitor;
@ -93,4 +95,6 @@ class BspTreeVisitor
virtual void visit(QList<Element*>* items) = 0;
};
} // namespace Ms
#endif

View file

@ -13,6 +13,8 @@
#include "score.h"
#include "image.h"
namespace Ms {
//---------------------------------------------------------
// BSymbol
//---------------------------------------------------------
@ -186,3 +188,5 @@ QRectF BSymbol::drag(const EditData& data)
}
}

View file

@ -16,6 +16,8 @@
#include "element.h"
#include "elementlayout.h"
namespace Ms {
//---------------------------------------------------------
// @@ BSymbol
/// base class for Symbol and Image
@ -59,5 +61,7 @@ class BSymbol : public Element, public ElementLayout {
void setSystemFlag(bool val) { _systemFlag = val; }
};
} // namespace Ms
#endif

View file

@ -19,6 +19,8 @@
#include "segment.h"
#include "staff.h"
namespace Ms {
//---------------------------------------------------------
// checkSlurs
// helper routine to check for sanity slurs
@ -158,3 +160,5 @@ qDebug(" - Rest %d/%d\n", d.fraction().numerator(), d.fraction().denominato
}
}
}

View file

@ -47,6 +47,8 @@
#include "stemslash.h"
#include "ledgerline.h"
namespace Ms {
//---------------------------------------------------------
// upNote / downNote
//---------------------------------------------------------
@ -436,6 +438,21 @@ void Chord::remove(Element* e)
}
}
//---------------------------------------------------------
// maxHeadWidth
//---------------------------------------------------------
qreal Chord::maxHeadWidth()
{
// determine max head width in chord
qreal hw = 0;
for (int i = 0; i < _notes.size(); i++) {
qreal t = _notes.at(i)->headWidth();
if (t > hw)
hw = t;
}
return hw;
}
//---------------------------------------------------------
// addLedgerLine
/// Add a ledger line to a chord.
@ -443,12 +460,13 @@ void Chord::remove(Element* e)
/// \arg staffIdx determines the y origin
/// \arg line vertical position of line
/// \arg lr extend to left and/or right
/// \arg hw max head width in chord
//---------------------------------------------------------
void Chord::addLedgerLine(qreal x, int staffIdx, int line, int lr, bool visible)
void Chord::addLedgerLine(qreal x, int staffIdx, int line, int lr, bool visible, qreal hw)
{
qreal _spatium = spatium();
qreal hw = upNote()->headWidth();
qreal hw2 = hw * .5;
LedgerLine* h = new LedgerLine(score());
@ -514,18 +532,21 @@ void Chord::addLedgerLines(qreal x, int move)
break;
}
}
qreal hw = maxHeadWidth();
for (int ni = n - 1; ni >= 0; --ni) {
const Note* note = _notes[ni];
int l = note->line();
if (l >= 0)
break;
for (int i = (uppos+1) & ~1; i < l; i += 2)
addLedgerLine(x, idx, i, ulr, visible);
addLedgerLine(x, idx, i, ulr, visible, hw);
ulr |= (up() ^ note->mirror()) ? 0x1 : 0x2;
uppos = l;
}
for (int i = (uppos+1) & ~1; i <= -2; i += 2)
addLedgerLine(x, idx, i, ulr, visible);
addLedgerLine(x, idx, i, ulr, visible, hw);
int downpos = -1000;
int dlr = 0;
@ -536,12 +557,12 @@ void Chord::addLedgerLines(qreal x, int move)
if (l <= 8)
break;
for (int i = downpos & ~1; i > l; i -= 2)
addLedgerLine(x, idx, i, dlr, visible);
addLedgerLine(x, idx, i, dlr, visible, hw);
dlr |= (up() ^ note->mirror()) ? 0x1 : 0x2;
downpos = l;
}
for (int i = downpos & ~1; i >= 10; i -= 2)
addLedgerLine(x, idx, i, dlr, visible);
addLedgerLine(x, idx, i, dlr, visible, hw);
}
//-----------------------------------------------------------------------------
@ -2083,3 +2104,5 @@ void Chord::setStemSlash(StemSlash* s)
_stemSlash = s;
}
}

View file

@ -22,6 +22,10 @@
#include "chordrest.h"
#include "noteevent.h"
class QPainter;
namespace Ms {
class Note;
class Hook;
class Arpeggio;
@ -29,7 +33,6 @@ class Tremolo;
class Chord;
class Glissando;
class Stem;
class QPainter;
class Chord;
class StemSlash;
class LedgerLine;
@ -72,7 +75,7 @@ class Chord : public ChordRest {
virtual qreal upPos() const;
virtual qreal downPos() const;
virtual qreal centerX() const;
void addLedgerLine(qreal x, int staffIdx, int line, int extend, bool visible);
void addLedgerLine(qreal x, int staffIdx, int line, int extend, bool visible, qreal hw);
void addLedgerLines(qreal x, int move);
void processSiblings(std::function<void(Element*)> func);
@ -115,6 +118,8 @@ class Chord : public ChordRest {
virtual int upString() const;
virtual int downString() const;
qreal maxHeadWidth();
Note* findNote(int pitch) const;
Stem* stem() const { return _stem; }
@ -179,5 +184,7 @@ class Chord : public ChordRest {
virtual void reset();
};
} // namespace Ms
#endif

View file

@ -17,6 +17,8 @@
#include "system.h"
#include "note.h"
namespace Ms {
//---------------------------------------------------------
// ChordLine
//---------------------------------------------------------
@ -263,3 +265,5 @@ void ChordLine::updateGrips(int* grips, QRectF* grip) const
grip[i].translate(cp + QPointF(path.elementAt(i).x * sp, path.elementAt(i).y * sp));
}
}

View file

@ -15,9 +15,12 @@
#include "element.h"
class Chord;
class QPainter;
namespace Ms {
class Chord;
// subtypes:
enum ChordLineType {
CHORDLINE_NOTYPE, CHORDLINE_FALL, CHORDLINE_DOIT,
@ -56,5 +59,7 @@ class ChordLine : public Element {
virtual void updateGrips(int*, QRectF*) const;
};
} // namespace Ms
#endif

View file

@ -16,6 +16,8 @@
#include "pitchspelling.h"
#include "mscore.h"
namespace Ms {
//---------------------------------------------------------
// HChord
//---------------------------------------------------------
@ -680,5 +682,7 @@ bool ChordList::write(const QString& name)
}
}

View file

@ -13,6 +13,8 @@
#ifndef __CHORDLIST_H__
#define __CHORDLIST_H__
namespace Ms {
class Xml;
class XmlReader;
@ -174,5 +176,7 @@ class ChordList : public QMap<int, ChordDescription*> {
ChordSymbol symbol(const QString& s) const { return symbols.value(s); }
};
} // namespace Ms
#endif

View file

@ -42,6 +42,8 @@
#include "figuredbass.h"
#include "icon.h"
namespace Ms {
//---------------------------------------------------------
// hasArticulation
//---------------------------------------------------------
@ -1116,3 +1118,5 @@ QVariant ChordRest::propertyDefault(P_ID propertyId) const
score()->setLayoutAll(true);
}
}

View file

@ -16,6 +16,8 @@
#include "symbol.h"
#include "duration.h"
namespace Ms {
#define CROSSMEASURE_UNKNOWN -1
#define CROSSMEASURE_NONE 0
#define CROSSMEASURE_FIRST 1
@ -168,5 +170,7 @@ class ChordRest : public DurationElement {
virtual QVariant propertyDefault(P_ID) const;
};
} // namespace Ms
#endif

View file

@ -24,6 +24,8 @@
#include "segment.h"
#include "stafftype.h"
namespace Ms {
#define TR(a) QT_TRANSLATE_NOOP("clefTable", a)
// table must be in sync with enum ClefType
@ -598,3 +600,6 @@ QVariant Clef::propertyDefault(P_ID id) const
default: return Element::propertyDefault(id);
}
}
}

View file

@ -21,10 +21,13 @@
#include "element.h"
#include "mscore.h"
class QPainter;
namespace Ms {
class Xml;
class MuseScoreView;
class Segment;
class QPainter;
static const int NO_CLEF = -1000;
@ -135,5 +138,7 @@ class Clef : public Element {
QVariant propertyDefault(P_ID id) const;
};
} // namespace Ms
#endif

View file

@ -14,6 +14,8 @@
#include "clef.h"
#include "score.h"
namespace Ms {
//---------------------------------------------------------
// ClefTypeList::operator==
//---------------------------------------------------------
@ -75,3 +77,5 @@ void ClefList::read(XmlReader& e, Score* cs)
}
}
}

View file

@ -16,6 +16,8 @@
#include "mscore.h"
#include "clef.h"
namespace Ms {
class Score;
//---------------------------------------------------------
@ -30,5 +32,7 @@ class ClefList : public QMultiMap<int, ClefTypeList> {
void read(XmlReader&, Score*);
};
} // namespace Ms
#endif

View file

@ -71,6 +71,8 @@
#include "accidental.h"
#include "sequencer.h"
namespace Ms {
//---------------------------------------------------------
// startCmd
/// Start a GUI command by clearing the redraw area
@ -667,12 +669,14 @@ Segment* Score::setNoteRest(Segment* segment, int track, NoteVal nval, Fraction
// make time gap at tick by removing/shortening
// chord/rest
//
// if keepChord, the chord at tick is not removed
//
// gap does not exceed measure or scope of tuplet
//
// return size of actual gap
//---------------------------------------------------------
Fraction Score::makeGap(Segment* segment, int track, const Fraction& _sd, Tuplet* tuplet)
Fraction Score::makeGap(Segment* segment, int track, const Fraction& _sd, Tuplet* tuplet, bool keepChord)
{
qDebug("makeGap %s at %d track %d", qPrintable(_sd.print()), segment->tick(), track);
assert(_sd.numerator());
@ -758,7 +762,8 @@ qDebug("remove %s %s at tick %d track %d",
}
else {
qDebug(" makeGap: remove %d/%d at %d", td.numerator(), td.denominator(), cr->tick());
undoRemoveElement(cr);
if(seg != firstSegment || !keepChord)
undoRemoveElement(cr);
if (seg->isEmpty() && seg != firstSegment)
undoRemoveElement(seg);
else if (seg != firstSegment) { // keep _all_ annotations on first segment?
@ -928,8 +933,9 @@ QList<Fraction> Score::splitGapToMeasureBoundaries(ChordRest* cr, Fraction gap)
Tuplet* tuplet = cr->tuplet();
if (tuplet) {
Fraction rest(tuplet->duration());
if(tuplet->tuplet())
return flist; // do no deal with nested tuplets
Fraction rest = Fraction::fromTicks(tuplet->tick() + tuplet->duration().ticks() - cr->segment()->tick()) * tuplet->ratio();
if (rest < gap)
qDebug("does not fit in tuplet");
else
@ -961,7 +967,6 @@ QList<Fraction> Score::splitGapToMeasureBoundaries(ChordRest* cr, Fraction gap)
void Score::changeCRlen(ChordRest* cr, const TDuration& d)
{
deselectAll();
Fraction srcF(cr->duration());
Fraction dstF;
if (d.type() == TDuration::V_MEASURE)
@ -980,6 +985,7 @@ qDebug("changeCRlen: %d/%d -> %d/%d", srcF.numerator(), srcF.denominator(),
//
// make shorter and fill with rest
//
deselectAll();
if (cr->type() == Element::CHORD) {
//
// remove ties
@ -1004,6 +1010,7 @@ qDebug("changeCRlen: %d/%d -> %d/%d", srcF.numerator(), srcF.denominator(),
if (flist.isEmpty())
return;
deselectAll();
qDebug("ChangeCRLen::List:");
foreach (Fraction f, flist)
qDebug(" %d/%d", f.numerator(), f.denominator());
@ -1016,7 +1023,7 @@ qDebug("ChangeCRLen::List:");
bool first = true;
foreach (Fraction f2, flist) {
f -= f2;
makeGap(cr1->segment(), cr1->track(), f2, tuplet);
makeGap(cr1->segment(), cr1->track(), f2, tuplet, first);
if (cr->type() == Element::REST) {
qDebug(" +ChangeCRLen::setRest %d/%d", f2.numerator(), f2.denominator());
@ -1036,18 +1043,20 @@ qDebug(" ChangeCRLen:: %d += %d(actual=%d)", tick, f2.ticks(), f2.ticks() * tim
// if (measure->tick() != tick)
// etick += measure->ticks();
if (((tick - etick) % dList[0].ticks()) == 0) {
foreach(TDuration d, dList) {
foreach(TDuration du, dList) {
bool genTie;
Chord* cc;
if (oc) {
genTie = true;
cc = oc;
oc = addChord(tick, du, cc, genTie, tuplet);
}
else {
genTie = false;
cc = static_cast<Chord*>(cr);
undoChangeChordRestLen(cr, du);
oc = cc;
}
oc = addChord(tick, d, cc, genTie, tuplet);
if (oc && first) {
select(oc, SELECT_SINGLE, 0);
first = false;
@ -1063,12 +1072,14 @@ qDebug(" ChangeCRLen:: %d += %d(actual=%d)", tick, f2.ticks(), f2.ticks() * tim
if (oc) {
genTie = true;
cc = oc;
oc = addChord(tick, dList[i], cc, genTie, tuplet);
}
else {
genTie = false;
cc = static_cast<Chord*>(cr);
undoChangeChordRestLen(cr, dList[i]);
oc = cc;
}
oc = addChord(tick, dList[i], cc, genTie, tuplet);
if (first) {
select(oc, SELECT_SINGLE, 0);
first = false;
@ -2383,3 +2394,5 @@ void Score::cmd(const QAction* a)
qDebug("1unknown cmd <%s>", qPrintable(cmd));
}
}

View file

@ -23,6 +23,8 @@
#include "libmscore/segment.h"
#include "cursor.h"
namespace Ms {
//---------------------------------------------------------
// Cursor
//---------------------------------------------------------
@ -245,3 +247,5 @@ inline void Cursor::firstChordRestInTrack()
_segment = _segment->next1(Segment::SegChordRestGrace);
}
}

View file

@ -13,6 +13,8 @@
#ifndef __CURSOR_H__
#define __CURSOR_H__
namespace Ms {
class Element;
class Score;
class Chord;
@ -100,5 +102,7 @@ class Cursor : public QObject {
Q_INVOKABLE void setDuration(int z, int n);
};
} // namespace Ms
#endif

View file

@ -14,6 +14,8 @@
#include "xml.h"
#include "note.h"
namespace Ms {
Drumset* smDrumset; // standard midi drumset
//---------------------------------------------------------
@ -180,3 +182,5 @@ void initDrumset()
smDrumset->drum(64) = DrumInstrument(QT_TRANSLATE_NOOP("drumset", "low conga"), Note::HEAD_CROSS, 6, MScore::UP);
}
}

View file

@ -15,6 +15,9 @@
#include "mscore.h"
#include "note.h"
namespace Ms {
class Xml;
//---------------------------------------------------------
@ -66,5 +69,7 @@ class Drumset {
extern Drumset* smDrumset;
extern void initDrumset();
} // namespace Ms
#endif

View file

@ -105,3 +105,5 @@ void initDsp()
dsp = new Dsp();
}
}

View file

@ -19,6 +19,8 @@
#ifndef __DSP_H__
#define __DSP_H__
namespace Ms {
//---------------------------------------------------------
// f_max
//---------------------------------------------------------
@ -73,5 +75,7 @@ class Dsp {
extern void initDsp();
extern Dsp* dsp;
} // namespace Ms
#endif

View file

@ -16,6 +16,8 @@
#include "undo.h"
#include "staff.h"
namespace Ms {
//---------------------------------------------------------
// DurationElement
//---------------------------------------------------------
@ -128,3 +130,5 @@ void DurationElement::writeTuplet(Xml& xml)
}
}
}

View file

@ -16,6 +16,8 @@
#include "element.h"
#include "durationtype.h"
namespace Ms {
class Tuplet;
class Beam;
class Spanner;
@ -58,5 +60,7 @@ class DurationElement : public Element {
int durationTicks() const { return _duration.ticks(); }
};
} // namespace Ms
#endif

View file

@ -14,6 +14,8 @@
#include "mscore.h"
#include "note.h"
namespace Ms {
//---------------------------------------------------------
// dots
//---------------------------------------------------------
@ -508,3 +510,5 @@ void TDuration::print() const
qDebug(" %s,dots=%d)", s, _dots);
}
}

View file

@ -15,6 +15,8 @@
#include "fraction.h"
namespace Ms {
//---------------------------------------------------------
// TDuration
//---------------------------------------------------------
@ -66,5 +68,7 @@ class TDuration {
};
extern QList<TDuration> toDurationList(Fraction, bool useDottedValues);
} // namespace Ms
#endif

View file

@ -20,6 +20,8 @@
#include "style.h"
#include "mscore.h"
namespace Ms {
//-----------------------------------------------------------------------------
// Dyn
// see: http://en.wikipedia.org/wiki/File:Dynamic's_Note_Velocity.svg
@ -281,3 +283,5 @@ QVariant Dynamic::propertyDefault(P_ID id) const
}
}
}

View file

@ -16,6 +16,8 @@
#include "text.h"
#include "mscore.h"
namespace Ms {
class Measure;
class Segment;
@ -104,4 +106,6 @@ class Dynamic : public Text {
QVariant propertyDefault(P_ID id) const;
};
} // namespace Ms
#endif

View file

@ -53,6 +53,8 @@
#include "dynamic.h"
#include "repeat.h"
namespace Ms {
//---------------------------------------------------------
// getSelectedNote
//---------------------------------------------------------
@ -1888,3 +1890,5 @@ MeasureBase* Score::insertMeasure(Element::ElementType type, MeasureBase* measur
return omb;
}
}

View file

@ -81,6 +81,8 @@
#include "marker.h"
#include "jump.h"
namespace Ms {
// extern bool showInvisible;
//
@ -721,7 +723,7 @@ bool Element::readProperties(XmlReader& e)
}
}
else if (tag == "placement")
_placement = Placement(::getProperty(P_PLACEMENT, e).toInt());
_placement = Placement(Ms::getProperty(P_PLACEMENT, e).toInt());
else
return false;
return true;
@ -1625,3 +1627,6 @@ void Element::scriptSetUserOff(const QPointF& o)
{
score()->undoChangeProperty(this, P_USER_OFF, o * spatium());
}
}

View file

@ -16,13 +16,17 @@
#include "xml.h"
#include "mscore.h"
#include "property.h"
#include "spatium.h"
class QPainter;
namespace Ms {
/**
\file
Definition of classes Element, ElementList, StaffLines.
*/
#include "spatium.h"
class Xml;
class Measure;
@ -33,7 +37,6 @@ class MuseScoreView;
class Segment;
class TextStyle;
class Element;
class QPainter;
//---------------------------------------------------------
// ElementFlag
@ -657,9 +660,12 @@ class RubberBand : public Element {
extern bool elementLessThan(const Element* const, const Element* const);
extern void collectElements(void* data, Element* e);
Q_DECLARE_METATYPE(Element::ElementType)
Q_DECLARE_METATYPE(Element::DynamicRange)
Q_DECLARE_METATYPE(Element::Placement)
} // namespace Ms
Q_DECLARE_METATYPE(Ms::Element::ElementType)
Q_DECLARE_METATYPE(Ms::Element::DynamicRange)
Q_DECLARE_METATYPE(Ms::Element::Placement)
#endif

View file

@ -16,6 +16,8 @@
#include "text.h"
#include "mscore.h"
namespace Ms {
//---------------------------------------------------------
// ElementLayout
//---------------------------------------------------------
@ -195,3 +197,5 @@ bool ElementLayout::readProperties(XmlReader& e)
}
}

View file

@ -15,6 +15,8 @@
#include "mscore.h"
namespace Ms {
class Element;
class Xml;
class XmlReader;
@ -59,5 +61,7 @@ class ElementLayout {
qreal ryoff() const { return _reloff.y(); }
};
} // namespace Ms
#endif

View file

@ -18,6 +18,8 @@
#include "slur.h"
#include "chordrest.h"
namespace Ms {
//---------------------------------------------------------
// findNew
//---------------------------------------------------------
@ -60,3 +62,5 @@ void SlurMap::check()
}
}
}

View file

@ -13,6 +13,8 @@
#ifndef __ELEMENTMAP_H__
#define __ELEMENTMAP_H__
namespace Ms {
class Element;
//---------------------------------------------------------
@ -27,5 +29,7 @@ class ElementMap : QHash<Element*, Element*> {
void add(Element* o, Element* n) { insert(o, n); }
};
} // namespace Ms
#endif

View file

@ -36,6 +36,8 @@
#include "spannermap.h"
#include "layoutbreak.h"
namespace Ms {
//---------------------------------------------------------
// read
//---------------------------------------------------------
@ -152,7 +154,7 @@ Score* createExcerpt(const QList<Part*>& parts)
score->updateChannel();
score->setLayoutAll(true);
score->addLayoutFlags(LAYOUT_FIX_TICKS | LAYOUT_FIX_PITCH_VELO);
score->addLayoutFlags(LayoutFlags(LAYOUT_FIX_TICKS | LAYOUT_FIX_PITCH_VELO));
score->doLayout();
return score;
}
@ -538,3 +540,5 @@ void cloneStaff(Staff* srcStaff, Staff* dstStaff)
}
}
}

View file

@ -13,6 +13,8 @@
#ifndef __EXCERPT_H__
#define __EXCERPT_H__
namespace Ms {
class Score;
class Part;
class Xml;
@ -45,5 +47,7 @@ extern Score* createExcerpt(const QList<Part*>&);
extern void cloneStaves(Score* oscore, Score* score, const QList<int>& map);
extern void cloneStaff(Staff* ostaff, Staff* nstaff);
} // namespace Ms
#endif

View file

@ -12,6 +12,8 @@
#include "fifo.h"
namespace Ms {
//---------------------------------------------------------
// clear
//---------------------------------------------------------
@ -45,3 +47,5 @@ void FifoBase::pop()
--counter;
}
}

View file

@ -15,6 +15,8 @@
#include <atomic>
namespace Ms {
//---------------------------------------------------------
// FifoBase
// - works only for one reader/writer
@ -45,5 +47,7 @@ class FifoBase {
bool isFull() const { return maxCount == counter; }
};
} // namespace Ms
#endif

View file

@ -16,6 +16,11 @@
#include "measure.h"
#include "system.h"
#include "segment.h"
#include "chord.h"
#include "rest.h"
#include "score.h"
namespace Ms {
// the array of configured fonts
static QList<FiguredBassFont> g_FBFonts;
@ -893,9 +898,6 @@ bool FiguredBassItem::startsWithParenthesis() const
// F I G U R E D B A S S
//---------------------------------------------------------
#include "chord.h"
#include "rest.h"
FiguredBass::FiguredBass(Score* s)
: Text(s)
{
@ -1700,7 +1702,6 @@ void FiguredBass::writeMusicXML(Xml& xml, bool doFigure, bool doExtend) const
// called from Keyboard Accelerator & menus
//---------------------------------------------------------
#include "score.h"
FiguredBass* Score::addFiguredBass()
{
@ -1737,3 +1738,5 @@ FiguredBass* Score::addFiguredBass()
return fb;
}
}

View file

@ -17,6 +17,8 @@
#include "text.h"
#include "libmscore/figuredbass.h"
namespace Ms {
/*---------------------------------------------------------
NOTE ON ARCHITECTURE
@ -218,9 +220,6 @@ class FiguredBassItem : public Element {
virtual QVariant propertyDefault(P_ID) const;
};
Q_DECLARE_METATYPE(FiguredBassItem::Modifier);
Q_DECLARE_METATYPE(FiguredBassItem::Parenthesis);
//---------------------------------------------------------
// FiguredBassFont
//---------------------------------------------------------
@ -325,5 +324,11 @@ Q_INVOKABLE FiguredBassItem* addItem();
void appendItem(const FiguredBassItem& item) { items.append(item); }
};
} // namespace Ms
Q_DECLARE_METATYPE(Ms::FiguredBassItem::Modifier);
Q_DECLARE_METATYPE(Ms::FiguredBassItem::Parenthesis);
#endif

View file

@ -14,6 +14,8 @@
#include "score.h"
#include "undo.h"
namespace Ms {
//---------------------------------------------------------
// Fingering
//---------------------------------------------------------
@ -71,3 +73,5 @@ void Fingering::reset()
score()->undoChangeProperty(this, P_USER_OFF, no);
}
}

View file

@ -15,6 +15,8 @@
#include "text.h"
namespace Ms {
class Note;
//---------------------------------------------------------
@ -37,5 +39,7 @@ class Fingering : public Text {
virtual void reset();
};
} // namespace Ms
#endif

View file

@ -13,6 +13,8 @@
#include "fraction.h"
#include "mscore.h"
namespace Ms {
//---------------------------------------------------------
// gcd
// greatest common divisor
@ -180,3 +182,5 @@ int Fraction::ticks() const
}
}

View file

@ -15,6 +15,8 @@
#include "config.h"
namespace Ms {
//---------------------------------------------------------
// Fraction
//---------------------------------------------------------
@ -73,7 +75,8 @@ class Fraction {
QString print() const { return QString("%1/%2").arg(_numerator).arg(_denominator); }
};
Q_DECLARE_METATYPE(Fraction)
} // namespace Ms
Q_DECLARE_METATYPE(Ms::Fraction)
#endif

View file

@ -21,6 +21,8 @@
#include "mscore.h"
#include "harmony.h"
namespace Ms {
static const int DEFAULT_STRINGS = 6;
static const int DEFAULT_FRETS = 5;
@ -576,3 +578,6 @@ void FretDiagram::writeMusicXML(Xml& xml) const
*/
xml.etag();
}
}

View file

@ -15,6 +15,8 @@
#include "element.h"
namespace Ms {
class Tablature;
class Chord;
class Harmony;
@ -88,4 +90,6 @@ class FretDiagram : public Element {
virtual void scanElements(void* data, void (*func)(void*, Element*), bool all=true);
};
} // namespace Ms
#endif

View file

@ -19,6 +19,8 @@
#include "style.h"
#include "sym.h"
namespace Ms {
//---------------------------------------------------------
// Glissando
//---------------------------------------------------------
@ -295,3 +297,5 @@ QVariant Glissando::propertyDefault(P_ID propertyId) const
return Element::propertyDefault(propertyId);
}
}

View file

@ -15,6 +15,8 @@
#include "element.h"
namespace Ms {
class Note;
//---------------------------------------------------------
@ -72,5 +74,7 @@ class Glissando : public Element {
virtual QVariant propertyDefault(P_ID) const;
};
} // namespace Ms
#endif

View file

@ -16,6 +16,8 @@
#include "staff.h"
#include "tuplet.h"
namespace Ms {
//---------------------------------------------------------
// noteGroups
//---------------------------------------------------------
@ -212,3 +214,5 @@ void Groups::dump(const char* m) const
}
}
}

View file

@ -17,6 +17,8 @@
#include "mscore.h"
#include "durationtype.h"
namespace Ms {
class ChordRest;
class Xml;
class XmlReader;
@ -68,7 +70,6 @@ class Groups : public std::vector<GroupNode> {
static BeamMode endBeam(ChordRest* cr);
};
Q_DECLARE_METATYPE(Groups)
//---------------------------------------------------------
// NoteGroup
@ -79,5 +80,10 @@ struct NoteGroup {
Groups endings;
};
} // namespace Ms
Q_DECLARE_METATYPE(Ms::Groups)
#endif

View file

@ -22,6 +22,8 @@
#include "staff.h"
#include "mscore.h"
namespace Ms {
//---------------------------------------------------------
// layout
//---------------------------------------------------------
@ -316,3 +318,5 @@ void Hairpin::setYoff(qreal val)
}
}

View file

@ -11,14 +11,18 @@
//=============================================================================
#ifndef __HAIRPIN_H__
#define __HAIRPIN_H__
#include "element.h"
#include "line.h"
#include "mscore.h"
class QPainter;
namespace Ms {
class Score;
class Hairpin;
class QPainter;
//---------------------------------------------------------
// @@ HairpinSegment
@ -59,7 +63,7 @@ class Hairpin : public SLine {
private:
Q_PROPERTY(HairpinType hairpinType READ hairpinType WRITE undoSetHairpinType)
Q_PROPERTY(int veloChange READ veloChange WRITE undoSetVeloChange)
Q_PROPERTY(Element::DynamicRange dynRange READ dynRange WRITE undoSetDynRange)
Q_PROPERTY(Ms::Element::DynamicRange dynRange READ dynRange WRITE undoSetDynRange)
HairpinType _hairpinType;
int _veloChange;
@ -96,7 +100,6 @@ class Hairpin : public SLine {
virtual void setYoff(qreal);
};
#define __HAIRPIN_H__
} // namespace Ms
#endif

View file

@ -20,6 +20,8 @@
#include "mscore.h"
#include "fret.h"
namespace Ms {
//---------------------------------------------------------
// harmonyName
//---------------------------------------------------------
@ -905,3 +907,5 @@ const QList<HDegree>& Harmony::degreeList() const
return _degreeList;
}
}

View file

@ -15,6 +15,8 @@
#include "text.h"
namespace Ms {
struct ChordDescription;
//---------------------------------------------------------
@ -141,5 +143,7 @@ class Harmony : public Text {
virtual QPainterPath shape() const;
};
} // namespace Ms
#endif

View file

@ -16,6 +16,8 @@
#include "stem.h"
#include "score.h"
namespace Ms {
//---------------------------------------------------------
// Hook
//---------------------------------------------------------
@ -66,9 +68,11 @@ void Hook::layout()
//---------------------------------------------------------
void Hook::draw(QPainter* painter) const
{
{
// hide if belonging to the second chord of a cross-measure pair
if(chord() && chord()->crossMeasure() == CROSSMEASURE_SECOND)
return;
Symbol::draw(painter);
}
}

Some files were not shown because too many files have changed in this diff Show more