MuseScore  3.4
Music composition and notation
selection.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2019 Werner Schweer and others
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2
9 // as published by the Free Software Foundation and appearing in
10 // the file LICENCE.GPL
11 //=============================================================================
12 
13 #ifndef __PLUGIN_API_SELECTION_H__
14 #define __PLUGIN_API_SELECTION_H__
15 
16 #include "elements.h"
17 #include "score.h"
18 
19 namespace Ms {
20 namespace PluginAPI {
21 
22 //---------------------------------------------------------
23 // Selection
24 // Wrapper class for internal Ms::Selection
26 //---------------------------------------------------------
27 
28 class Selection : public QObject {
29  Q_OBJECT
32  Q_PROPERTY(QQmlListProperty<Ms::PluginAPI::Element> elements READ elements)
33 
34 
35 
36  protected:
38 
39  public:
40 
41  Selection(Ms::Selection* select) : QObject(), _select(select) {}
42  virtual ~Selection() { }
43 
44  QQmlListProperty<Element> elements()
45  { return wrapContainerProperty<Element>(this, _select->elements()); }
46 
48 };
49 
50 extern Selection* selectionWrap(Ms::Selection* select);
51 
52 } // namespace PluginAPI
53 } // namespace Ms
54 #endif
Definition: select.h:136
Definition: selection.h:28
Selection * selectionWrap(Ms::Selection *select)
Definition: selection.cpp:23
const QList< Element * > & elements() const
Definition: select.h:175
Selection(Ms::Selection *select)
Definition: selection.h:41
Definition: aeolus.cpp:26
virtual ~Selection()
Definition: selection.h:42
QQmlListProperty< Element > elements()
Definition: selection.h:44
Ms::Selection * _select
Definition: selection.h:37