diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8b52a8cf37a4512e2fa1a04149c2271983a09419..5d53c674908ef39bf57586a12df9714f91106613 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -152,6 +152,9 @@ include_directories( core/music core/score ) qt_add_qml_module(nootka URI "Nootka.Music" SOURCES + core/taction.cpp + core/taction.h + core/music/tnote.h core/music/tnote.cpp core/music/trhythm.h @@ -185,6 +188,8 @@ qt_add_qml_module(nootka core/score/tmelodypreview.h core/score/tdummychord.cpp core/score/tdummychord.h + DEPENDENCIES + QtQuick ) # qmlRegisterUncreatableType<TmelodyPart>("Score", 1, 0, "TmelodyPart", QStringLiteral("You cannot create an instance of the TcommonInstrument.")); diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 2ca5a36f83a4913c68c21ca334d0dbd545a1967d..f02e28e349d543173f62592631650564d9ac69d6 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -49,7 +49,7 @@ set(LIB_NOOTKACORE_SRC tpath.cpp tmtr.cpp tnootkaqml.cpp - taction.cpp + # taction.cpp tnoofont.cpp minizip/tzip.cpp diff --git a/src/core/taction.h b/src/core/taction.h index f55d48504fec337ae955e10f0763680b41968b28..d20093a6aedf814868bea0870abfd18f9f2bd040 100644 --- a/src/core/taction.h +++ b/src/core/taction.h @@ -19,9 +19,10 @@ #ifndef TACTION_H #define TACTION_H +#include "nootkacoreglobal.h" #include <QtCore/qobject.h> #include <QtGui/qcolor.h> -#include <nootkacoreglobal.h> +#include <QtQml/qqmlregistration.h> class QQmlComponent; @@ -35,6 +36,7 @@ class QQmlComponent; class NOOTKACORE_EXPORT Taction : public QObject { Q_OBJECT + QML_ELEMENT Q_PROPERTY(QString icon READ icon WRITE setIconTag NOTIFY iconChanged) Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) diff --git a/src/core/tnootkaqml.cpp b/src/core/tnootkaqml.cpp index 0df1122f200106680bc2419849b7f619b5555a80..6593afed5540daf63db8c3f571a1dd3eb981b444 100644 --- a/src/core/tnootkaqml.cpp +++ b/src/core/tnootkaqml.cpp @@ -79,7 +79,6 @@ TnootkaQML::TnootkaQML(QObject *parent) qmlRegisterType<TpianoBg>("Nootka", 1, 0, "TpianoBg"); qmlRegisterType<TbandoneonBg>("Nootka", 1, 0, "TbandoneonBg"); qmlRegisterType<TsaxBg>("Nootka", 1, 0, "TsaxBg"); - qmlRegisterType<Taction>("Nootka", 1, 0, "Taction"); qmlRegisterUncreatableType<TnootkaQML>("Nootka", 1, 0, "Nootka", QStringLiteral("You cannot create an instance of the TnootkaQML.")); qmlRegisterType<TtuneObject>("Nootka", 1, 0, "TtuneObject"); diff --git a/src/qml/+android/FlyItem.qml b/src/qml/+android/FlyItem.qml index 77d0bd3855f6011975a83ce68d4a0aef857b33fa..88cb7bd4f420bb749a8b1b6f7a65869cde191fce 100644 --- a/src/qml/+android/FlyItem.qml +++ b/src/qml/+android/FlyItem.qml @@ -3,6 +3,7 @@ * on the terms of GNU GPLv3 license (http://www.gnu.org/licenses) */ import Nootka 1.0 +import Nootka.Music import QtQuick 2.12 import QtQuick.Controls 2.12 diff --git a/src/qml/+android/MainMenuMobile.qml b/src/qml/+android/MainMenuMobile.qml index 9bd025e32fa36e74df40ece96ec30149e8d78070..5e1632034120d24a0667d8db4e9679f579c6f453 100644 --- a/src/qml/+android/MainMenuMobile.qml +++ b/src/qml/+android/MainMenuMobile.qml @@ -3,6 +3,7 @@ * on the terms of GNU GPLv3 license (http://www.gnu.org/licenses) */ import Nootka 1.0 +import Nootka.Music import Qt5Compat.GraphicalEffects import QtQuick 2.12 import QtQuick.Controls 2.12 diff --git a/src/qml/+android/shared/MenuButton.qml b/src/qml/+android/shared/MenuButton.qml index f174d20e49e76085283be218ee9c802228205e63..089538e83bb42bf21969e42d19c81ae6e42a203b 100644 --- a/src/qml/+android/shared/MenuButton.qml +++ b/src/qml/+android/shared/MenuButton.qml @@ -4,7 +4,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 - +import Nootka.Music import Nootka 1.0 diff --git a/src/qml/about/HelpPage.qml b/src/qml/about/HelpPage.qml index bb122ec4741435aeefc02609f68aec5d1e407780..d3b0a08b62d0ccdbf2b421661a740be85ef274c7 100644 --- a/src/qml/about/HelpPage.qml +++ b/src/qml/about/HelpPage.qml @@ -4,6 +4,7 @@ import "../" import Nootka 1.0 +import Nootka.Music import QtQuick 2.12 import QtQuick.Controls 2.12 diff --git a/src/qml/shared/HeadButton.qml b/src/qml/shared/HeadButton.qml index d771b167e042d24539c9abe9dbc6846ed93a89d8..5c1334e17b4c9c9b4c4f9f49a5bcfa640b2a546e 100644 --- a/src/qml/shared/HeadButton.qml +++ b/src/qml/shared/HeadButton.qml @@ -3,6 +3,7 @@ * on the terms of GNU GPLv3 license (http://www.gnu.org/licenses) */ import Nootka 1.0 +import Nootka.Music import QtQuick 2.12 import QtQuick.Controls 2.12 diff --git a/src/qml/shared/MenuButton.qml b/src/qml/shared/MenuButton.qml index e478c9c3cc329d9bf45a9697ef72ec3419d16df1..a2a1e46ccb86ce0cd03bf43eebba352a2f8f6bdb 100644 --- a/src/qml/shared/MenuButton.qml +++ b/src/qml/shared/MenuButton.qml @@ -3,6 +3,7 @@ * on the terms of GNU GPLv3 license (http://www.gnu.org/licenses) */ import Nootka 1.0 +import Nootka.Music import QtQuick 2.12 import QtQuick.Controls 2.12