13 #ifndef __PLUGIN_API_EXCERPT_H__
14 #define __PLUGIN_API_EXCERPT_H__
16 #include "libmscore/excerpt.h"
47 Excerpt(Ms::Excerpt* _e =
nullptr)
54 QString
title() {
return e->title(); }
64 template <
class Wrapper,
class T>
65 Wrapper* excerptWrap(T* t)
67 Wrapper* w = t ?
new Wrapper(t) : nullptr;
69 QQmlEngine::setObjectOwnership(w, QQmlEngine::JavaScriptOwnership);
73 extern Excerpt* excerptWrap(Ms::Excerpt* e);
85 template <
typename T,
class Container>
89 : QQmlListProperty<T>(obj, &container, &count, &at) {};
91 static int count(QQmlListProperty<T>* l) {
return int(
static_cast<Container*
>(l->data)->size()); }
92 static T* at(QQmlListProperty<T>* l,
int i) {
return excerptWrap<T>(
static_cast<Container*
>(l->data)->at(i)); }
96 template<
typename T,
class Container>
Ms::PluginAPI::Score * partScore
The score object for this part.
Definition: excerpt.h:38
QString title
The title of this part.
Definition: excerpt.h:40
Definition: cursor.cpp:29