MuseScore  3.4
Music composition and notation
qmlpluginengine.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 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 //=============================================================================
19 
20 #ifndef __QMLPLUGINENGINE_H__
21 #define __QMLPLUGINENGINE_H__
22 
23 #include "../qml/msqmlengine.h"
24 #include "libmscore/score.h"
25 
26 namespace Ms {
27 
28 class MuseScore;
29 
30 //---------------------------------------------------------
31 // QmlPluginEngine
32 //---------------------------------------------------------
33 
34 class QmlPluginEngine : public MsQmlEngine {
35  Q_OBJECT
36 
37  QMap<QString, QVariant> endCmdInfo;
38  int cmdCount = 0;
39  bool recursion = false;
40  bool undoRedo = false;
41 
44 
45  signals:
46  void endCmd(const QMap<QString, QVariant>& changes);
47  public:
48  QmlPluginEngine(QObject* parent = nullptr);
49 
50  void beginEndCmd(MuseScore*, bool undoRedo);
51  void endEndCmd(MuseScore*);
52 
53  bool inScoreChangeActionHandler() const;
54  };
55 
56 } // namespace Ms
57 #endif
Definition: musescore.h:180
bool undoRedo
Definition: qmlpluginengine.h:40
Definition of Score class.
Definition: msqmlengine.h:29
int cmdCount
Definition: qmlpluginengine.h:38
bool inScoreChangeActionHandler() const
Returns true if the engine is in process of handling endCmd() call which is a result of score change ...
Definition: qmlpluginengine.cpp:97
void endCmd(const QMap< QString, QVariant > &changes)
Definition: qmlpluginengine.h:34
QmlPluginEngine(QObject *parent=nullptr)
Definition: qmlpluginengine.cpp:33
Definition: aeolus.cpp:26
QMap< QString, QVariant > endCmdInfo
Definition: qmlpluginengine.h:37
Definition: score.h:318
void beginEndCmd(MuseScore *, bool undoRedo)
Definition: qmlpluginengine.cpp:43
ScoreContentState currScoreState
Definition: qmlpluginengine.h:43
ScoreContentState lastScoreState
Definition: qmlpluginengine.h:42
bool recursion
Definition: qmlpluginengine.h:39
void endEndCmd(MuseScore *)
Definition: qmlpluginengine.cpp:71