Plugin api: Ms::PluginAPI::Measure::measureNumber property needed

• Oct 7, 2019 - 03:28

The Ms::PluginAPI::Measure::measureNumber property would be an excellent way of finding measures, looping through measures, checking if a measure == another measure (faster than the is(...) method), etc.
I believe it wouldn't be hard to implement since the function looks safe and is here

A lot of other measure properties could be by the way added to the list, here's a non-exhaustive list that looks safe:
- from measure.h: https://github.com/musescore/MuseScore/blob/master/libmscore/measure.h

virtual Measure* clone() const override     { return new Measure(*this); }  // line 98
virtual void add(Element*) override;  // line 113
virtual void remove(Element*) override;  // line 114
virtual void change(Element* o, Element* n) override;  // line 115
 
bool hasVoices(int staffIdx) const;  // line 119
bool corrupted(int staffIdx) const;  // line 127
MeasureNumberMode measureNumberMode() const     { return _noMode;      }  // line 134
void setMeasureNumberMode(MeasureNumberMode v)  { _noMode = v;         }  // line 135
Fraction timesig() const             { return _timesig;     }  // line 137
qreal userStretch() const;  // line 152  with
void stretchMeasure(qreal stretch);  // line 155
// - lines 213 to 228: the bool getters
// the getters from lines 144 to 168
void clearElements(); // - line 144
  • and a lot of others which i can't tell if they are safe. Getters should be safe by default, no?

Comments

Do you still have an unanswered question? Please log in first to post your question.