Skip to content

Commit

Permalink
ability to change notehead and note head type from plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Mar 3, 2015
1 parent 41722d0 commit f59e1af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions libmscore/mscore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ QQmlEngine* MScore::qml()
qmlRegisterType<Segment> ("MuseScore", 1, 0, "Segment");
qmlRegisterType<Chord> ("MuseScore", 1, 0, "Chord");
qmlRegisterType<Note> ("MuseScore", 1, 0, "Note");
qmlRegisterType<NoteHead> ("MuseScore", 1, 0, "NoteHead");
qmlRegisterType<Accidental> ("MuseScore", 1, 0, "Accidental");
qmlRegisterType<Rest> ("MuseScore", 1, 0, "Rest");
qmlRegisterType<Measure> ("MuseScore", 1, 0, "Measure");
Expand Down
6 changes: 3 additions & 3 deletions libmscore/note.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ static const int MAX_DOTS = 3;
class NoteHead : public Symbol {
Q_OBJECT

Q_ENUMS(Group)
Q_ENUMS(Type)
public:
enum class Group : signed char {
HEAD_NORMAL = 0,
Expand Down Expand Up @@ -80,7 +82,7 @@ class NoteHead : public Symbol {
HEAD_TYPES
};

NoteHead(Score* s) : Symbol(s) {}
NoteHead(Score* s = 0) : Symbol(s) {}
NoteHead &operator=(const NoteHead&) = delete;
virtual NoteHead* clone() const override { return new NoteHead(*this); }
virtual Element::Type type() const override { return Element::Type::NOTEHEAD; }
Expand Down Expand Up @@ -172,8 +174,6 @@ class Note : public Element {
Q_PROPERTY(Ms::Tie* tieFor READ tieFor)
Q_PROPERTY(Ms::Tie* tieBack READ tieBack)
Q_ENUMS(ValueType)
Q_ENUMS(Ms::NoteHead::Group)
Q_ENUMS(Ms::NoteHead::Type)
Q_ENUMS(Ms::MScore::Direction)
Q_ENUMS(Ms::MScore::DirectionH)

Expand Down

0 comments on commit f59e1af

Please sign in to comment.