Skip to content

Commit

Permalink
update mtest
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Feb 17, 2017
1 parent 90b1991 commit fc55143
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 30 deletions.
32 changes: 16 additions & 16 deletions libmscore/element.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,22 +141,22 @@ struct EditData {
//-------------------------------------------------------------------

class Element : public ScoreElement {
// Q_GADGET
// Q_ENUMS(Placement)

// Q_PROPERTY(QRectF bbox READ scriptBbox )
// Q_PROPERTY(QColor color READ color WRITE undoSetColor)
// Q_PROPERTY(bool generated READ generated WRITE setGenerated)
// Q_PROPERTY(QPointF pagePos READ scriptPagePos)
// Q_PROPERTY(Ms::Element* parent READ parent WRITE setParent)
// Q_PROPERTY(Ms::Element::Placement placement READ placement WRITE undoSetPlacement)
// Q_PROPERTY(QPointF pos READ scriptPos WRITE scriptSetPos)
// Q_PROPERTY(bool selected READ selected WRITE setSelected)
// Q_PROPERTY(qreal spatium READ spatium)
// Q_PROPERTY(int track READ track WRITE setTrack)
//// Q_PROPERTY(Ms::ElementType type READ type)
// Q_PROPERTY(QPointF userOff READ scriptUserOff WRITE scriptSetUserOff)
// Q_PROPERTY(bool visible READ visible WRITE undoSetVisible)
Q_GADGET
Q_ENUMS(Placement)

Q_PROPERTY(QRectF bbox READ scriptBbox )
Q_PROPERTY(QColor color READ color WRITE undoSetColor)
Q_PROPERTY(bool generated READ generated WRITE setGenerated)
Q_PROPERTY(QPointF pagePos READ scriptPagePos)
Q_PROPERTY(Ms::Element* parent READ parent WRITE setParent)
Q_PROPERTY(Ms::Element::Placement placement READ placement WRITE undoSetPlacement)
Q_PROPERTY(QPointF pos READ scriptPos WRITE scriptSetPos)
Q_PROPERTY(bool selected READ selected WRITE setSelected)
Q_PROPERTY(qreal spatium READ spatium)
Q_PROPERTY(int track READ track WRITE setTrack)
// Q_PROPERTY(Ms::ElementType type READ type)
Q_PROPERTY(QPointF userOff READ scriptUserOff WRITE scriptSetUserOff)
Q_PROPERTY(bool visible READ visible WRITE undoSetVisible)

Element* _parent { 0 };
mutable ElementFlags _flags {
Expand Down
2 changes: 1 addition & 1 deletion libmscore/mscore.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ static const int FRET_NONE = -1; // no ordinal for a fret
// Allows using Ms::MSQE_name::E as return type for the READ function
// and parameter type for the WRITE function on a Q_PROPERTY of that type
// on the condition that you also declare Q_ENUMS(Ms::MSQE_name::E)
// for that same Q_GADGET
// for that same Q_OBJECT
//
// Q_INVOKABLES can't use the QML-wrapped enum type, nor the enum class type as
// parameters. Those should be from the correct storageType and static_casts should
Expand Down
4 changes: 0 additions & 4 deletions libmscore/noscript.h

This file was deleted.

1 change: 0 additions & 1 deletion libmscore/note.h
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,6 @@ class Note : public Element {
Q_DECLARE_METATYPE(Ms::NoteHead::Group);
Q_DECLARE_METATYPE(Ms::NoteHead::Type);
Q_DECLARE_METATYPE(Ms::Note::ValueType);
Q_DECLARE_METATYPE(Ms::Note);

#endif

2 changes: 1 addition & 1 deletion libmscore/page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ void Page::drawHeaderFooter(QPainter* p, int area, const QString& ss) const
}
}
text->setParent((Page*)this);
Align flags;
Align flags = Align::LEFT;
switch (area) {
case 0: flags = Align::LEFT | Align::TOP; break;
case 1: flags = Align::HCENTER | Align::TOP; break;
Expand Down
12 changes: 6 additions & 6 deletions libmscore/text.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ class TextBlock {
class Text : public Element {
Q_GADGET

#define PROP(a,b,c) \
a _ ## b; \
#define PROP(a,b,c) \
a _ ## b; \
PropertyFlags _ ## b ## Style { PropertyFlags::STYLED }; \
public: \
const a& b() const { return _ ## b; } \
void c(const a& val) { _ ## b = val; } \
private:
public: \
const a& b() const { return _ ## b; } \
void c(const a& val) { _ ## b = val; } \
private:

PROP(QString, family, setFamily)
PROP(qreal, size, setSize)
Expand Down
2 changes: 1 addition & 1 deletion mtest/testutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ bool MTest::savePdf(MasterScore* cs, const QString& saveName)
printerDev.setCreator("MuseScore Version: " VERSION);
printerDev.setFullPage(true);
printerDev.setColorMode(QPrinter::Color);
printerDev.setDocName(cs->name());
// printerDev.setDocName(cs->name());
printerDev.setOutputFormat(QPrinter::PdfFormat);

printerDev.setOutputFileName(saveName);
Expand Down

0 comments on commit fc55143

Please sign in to comment.