diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -8,557 +8,161 @@ include_directories(${elisa_BINARY_DIR}/src) set(databaseInterfaceTest_SOURCES - ../src/databaseinterface.cpp - ../src/musicartist.cpp - ../src/musicalbum.cpp - ../src/musicaudiotrack.cpp databaseinterfacetest.cpp ) ecm_add_test(${databaseInterfaceTest_SOURCES} TEST_NAME "databaseInterfaceTest" - LINK_LIBRARIES Qt5::Test Qt5::Core Qt5::Sql KF5::I18n) + LINK_LIBRARIES + Qt5::Test elisaLib) target_include_directories(databaseInterfaceTest PRIVATE ${CMAKE_SOURCE_DIR}/src) set(managemediaplayercontrolTest_SOURCES - ../src/managemediaplayercontrol.cpp - ../src/mediaplaylist.cpp - ../src/databaseinterface.cpp - ../src/musiclistenersmanager.cpp - ../src/elisaapplication.cpp - ../src/manageaudioplayer.cpp - ../src/models/allalbumsmodel.cpp - ../src/models/allartistsmodel.cpp - ../src/models/alltracksmodel.cpp - ../src/models/albummodel.cpp - ../src/models/abstractmediaproxymodel.cpp - ../src/models/allalbumsproxymodel.cpp - ../src/models/allartistsproxymodel.cpp - ../src/models/alltracksproxymodel.cpp - ../src/models/singleartistproxymodel.cpp - ../src/models/singlealbumproxymodel.cpp - ../src/notificationitem.cpp - ../src/trackslistener.cpp - ../src/musicartist.cpp - ../src/musicalbum.cpp - ../src/musicaudiotrack.cpp - ../src/elisautils.cpp - ../src/file/filelistener.cpp - ../src/file/localfilelisting.cpp - ../src/abstractfile/abstractfilelistener.cpp - ../src/abstractfile/abstractfilelisting.cpp - ../src/audiowrapper.cpp managemediaplayercontroltest.cpp ) -if (KF5Baloo_FOUND) - if (Qt5DBus_FOUND) - qt5_add_dbus_interface(managemediaplayercontrolTest_SOURCES - ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.fileindexer.xml - baloo/fileindexer) - - qt5_add_dbus_interface(managemediaplayercontrolTest_SOURCES - ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.scheduler.xml - baloo/scheduler) - - set(managemediaplayercontrolTest_SOURCES - ${managemediaplayercontrolTest_SOURCES} - ../src/baloo/baloolistener.cpp - ../src/baloo/localbaloofilelisting.cpp - ) - endif() -endif() - -if (UPNPQT_FOUND) - set(managemediaplayercontrolTest_SOURCES - ${managemediaplayercontrolTest_SOURCES} - ../src/upnp/upnpcontrolcontentdirectory.cpp - ../src/upnp/upnpcontentdirectorymodel.cpp - ../src/upnp/upnpcontrolconnectionmanager.cpp - ../src/upnp/upnpcontrolmediaserver.cpp - ../src/upnp/didlparser.cpp - ../src/upnp/upnplistener.cpp - ../src/upnp/upnpdiscoverallmusic.cpp - ) -endif() - -kconfig_add_kcfg_files(managemediaplayercontrolTest_SOURCES ../src/elisa_settings.kcfgc ) -set(managemediaplayercontrolTest_SOURCES - ${managemediaplayercontrolTest_SOURCES} - ../src/elisa_core.kcfg -) - ecm_add_test(${managemediaplayercontrolTest_SOURCES} TEST_NAME "managemediaplayercontrolTest" LINK_LIBRARIES - Qt5::Test Qt5::Core Qt5::Sql Qt5::Widgets KF5::I18n Qt5::Quick Qt5::Multimedia - Qt5::Concurrent KF5::ConfigCore KF5::ConfigGui KF5::FileMetaData + Qt5::Test elisaLib ) -if (KF5Baloo_FOUND) - target_link_libraries(managemediaplayercontrolTest KF5::Baloo Qt5::DBus) -endif() -if (KF5KCMUtils_FOUND) - target_link_libraries(managemediaplayercontrolTest KF5::KCMUtils) -endif() -if (UPNPQT_FOUND) - target_link_libraries(managemediaplayercontrolTest Qt5::Xml UPNP::upnpQt Qt5::Network) -endif() -if (KF5XmlGui_FOUND) - target_link_libraries(managemediaplayercontrolTest KF5::XmlGui) -endif() - -target_include_directories(managemediaplayercontrolTest PRIVATE ${CMAKE_SOURCE_DIR}/src) - set(manageheaderbarTest_SOURCES - ../src/manageheaderbar.cpp - ../src/mediaplaylist.cpp - ../src/databaseinterface.cpp - ../src/musiclistenersmanager.cpp - ../src/elisaapplication.cpp - ../src/manageaudioplayer.cpp - ../src/models/allalbumsmodel.cpp - ../src/models/allartistsmodel.cpp - ../src/models/alltracksmodel.cpp - ../src/models/albummodel.cpp - ../src/models/abstractmediaproxymodel.cpp - ../src/models/allalbumsproxymodel.cpp - ../src/models/allartistsproxymodel.cpp - ../src/models/alltracksproxymodel.cpp - ../src/models/singleartistproxymodel.cpp - ../src/models/singlealbumproxymodel.cpp - ../src/notificationitem.cpp - ../src/trackslistener.cpp - ../src/trackslistener.cpp - ../src/musicartist.cpp - ../src/musicalbum.cpp - ../src/musicaudiotrack.cpp - ../src/elisautils.cpp - ../src/file/filelistener.cpp - ../src/file/localfilelisting.cpp - ../src/abstractfile/abstractfilelistener.cpp - ../src/abstractfile/abstractfilelisting.cpp - ../src/audiowrapper.cpp manageheaderbartest.cpp ) -if (KF5Baloo_FOUND) - if (Qt5DBus_FOUND) - qt5_add_dbus_interface(manageheaderbarTest_SOURCES - ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.fileindexer.xml - baloo/fileindexer) - - qt5_add_dbus_interface(manageheaderbarTest_SOURCES - ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.scheduler.xml - baloo/scheduler) - - set(manageheaderbarTest_SOURCES - ${manageheaderbarTest_SOURCES} - ../src/baloo/baloolistener.cpp - ../src/baloo/localbaloofilelisting.cpp - ) - endif() -endif() - -if (UPNPQT_FOUND) - set(manageheaderbarTest_SOURCES - ${manageheaderbarTest_SOURCES} - ../src/upnp/upnpcontrolcontentdirectory.cpp - ../src/upnp/upnpcontentdirectorymodel.cpp - ../src/upnp/upnpcontrolconnectionmanager.cpp - ../src/upnp/upnpcontrolmediaserver.cpp - ../src/upnp/didlparser.cpp - ../src/upnp/upnplistener.cpp - ../src/upnp/upnpdiscoverallmusic.cpp - ) -endif() - -kconfig_add_kcfg_files(manageheaderbarTest_SOURCES ../src/elisa_settings.kcfgc ) -set(manageheaderbarTest_SOURCES - ${manageheaderbarTest_SOURCES} - ../src/elisa_core.kcfg -) - ecm_add_test(${manageheaderbarTest_SOURCES} TEST_NAME "manageheaderbarTest" LINK_LIBRARIES - Qt5::Test Qt5::Core Qt5::Sql Qt5::Gui Qt5::Widgets KF5::I18n Qt5::Quick Qt5::Multimedia - Qt5::Concurrent KF5::ConfigCore KF5::ConfigGui KF5::FileMetaData + Qt5::Test elisaLib ) -if (KF5Baloo_FOUND) - target_link_libraries(manageheaderbarTest KF5::Baloo Qt5::DBus) -endif() -if (KF5KCMUtils_FOUND) - target_link_libraries(manageheaderbarTest KF5::KCMUtils) -endif() -if (UPNPQT_FOUND) - target_link_libraries(manageheaderbarTest Qt5::Xml UPNP::upnpQt Qt5::Network) -endif() -if (KF5XmlGui_FOUND) - target_link_libraries(manageheaderbarTest KF5::XmlGui) -endif() - target_include_directories(manageheaderbarTest PRIVATE ${CMAKE_SOURCE_DIR}/src) set(manageaudioplayerTest_SOURCES - ../src/manageaudioplayer.cpp manageaudioplayertest.cpp ) ecm_add_test(${manageaudioplayerTest_SOURCES} TEST_NAME "manageaudioplayerTest" - LINK_LIBRARIES Qt5::Test Qt5::Core Qt5::Gui Qt5::Multimedia KF5::FileMetaData) + LINK_LIBRARIES Qt5::Test elisaLib +) target_include_directories(manageaudioplayerTest PRIVATE ${CMAKE_SOURCE_DIR}/src) set(mediaplaylistTest_SOURCES - ../src/mediaplaylist.cpp - ../src/databaseinterface.cpp - ../src/trackslistener.cpp - ../src/musiclistenersmanager.cpp - ../src/models/allalbumsmodel.cpp - ../src/models/allartistsmodel.cpp - ../src/models/alltracksmodel.cpp - ../src/models/albummodel.cpp - ../src/models/abstractmediaproxymodel.cpp - ../src/models/allalbumsproxymodel.cpp - ../src/models/allartistsproxymodel.cpp - ../src/models/alltracksproxymodel.cpp - ../src/models/singleartistproxymodel.cpp - ../src/models/singlealbumproxymodel.cpp - ../src/manageaudioplayer.cpp - ../src/elisaapplication.cpp - ../src/notificationitem.cpp - ../src/musicartist.cpp - ../src/musicalbum.cpp - ../src/musicaudiotrack.cpp - ../src/elisautils.cpp - ../src/file/filelistener.cpp - ../src/file/localfilelisting.cpp - ../src/abstractfile/abstractfilelistener.cpp - ../src/abstractfile/abstractfilelisting.cpp - ../src/audiowrapper.cpp modeltest.cpp mediaplaylisttest.cpp ) -if (KF5Baloo_FOUND) - if (Qt5DBus_FOUND) - qt5_add_dbus_interface(mediaplaylistTest_SOURCES - ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.fileindexer.xml - baloo/fileindexer) - - qt5_add_dbus_interface(mediaplaylistTest_SOURCES - ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.scheduler.xml - baloo/scheduler) - - set(mediaplaylistTest_SOURCES - ${mediaplaylistTest_SOURCES} - ../src/baloo/baloolistener.cpp - ../src/baloo/localbaloofilelisting.cpp - ) - endif() -endif() - -if (UPNPQT_FOUND) - set(mediaplaylistTest_SOURCES - ${mediaplaylistTest_SOURCES} - ../src/upnp/upnpcontrolcontentdirectory.cpp - ../src/upnp/upnpcontentdirectorymodel.cpp - ../src/upnp/upnpcontrolconnectionmanager.cpp - ../src/upnp/upnpcontrolmediaserver.cpp - ../src/upnp/didlparser.cpp - ../src/upnp/upnplistener.cpp - ../src/upnp/upnpdiscoverallmusic.cpp - ) -endif() - -kconfig_add_kcfg_files(mediaplaylistTest_SOURCES ../src/elisa_settings.kcfgc ) -set(mediaplaylistTest_SOURCES - ${mediaplaylistTest_SOURCES} - ../src/elisa_core.kcfg -) - ecm_add_test(${mediaplaylistTest_SOURCES} TEST_NAME "mediaplaylistTest" LINK_LIBRARIES - Qt5::Test Qt5::Core Qt5::Sql Qt5::Gui Qt5::Widgets KF5::I18n Qt5::Quick Qt5::Multimedia - Qt5::Concurrent KF5::ConfigCore KF5::ConfigGui KF5::FileMetaData + Qt5::Test elisaLib ) -if (KF5Baloo_FOUND) - target_link_libraries(mediaplaylistTest KF5::Baloo Qt5::DBus) -endif() -if (KF5KCMUtils_FOUND) - target_link_libraries(mediaplaylistTest KF5::KCMUtils) -endif() -if (UPNPQT_FOUND) - target_link_libraries(mediaplaylistTest Qt5::Xml UPNP::upnpQt Qt5::Network) -endif() -if (KF5XmlGui_FOUND) - target_link_libraries(mediaplaylistTest KF5::XmlGui) -endif() - target_include_directories(mediaplaylistTest PRIVATE ${CMAKE_SOURCE_DIR}/src) set(trackslistenertest_SOURCES - ../src/mediaplaylist.cpp - ../src/databaseinterface.cpp - ../src/trackslistener.cpp - ../src/musiclistenersmanager.cpp - ../src/elisaapplication.cpp - ../src/manageaudioplayer.cpp - ../src/models/allalbumsmodel.cpp - ../src/models/allartistsmodel.cpp - ../src/models/alltracksmodel.cpp - ../src/models/albummodel.cpp - ../src/models/abstractmediaproxymodel.cpp - ../src/models/allalbumsproxymodel.cpp - ../src/models/allartistsproxymodel.cpp - ../src/models/alltracksproxymodel.cpp - ../src/models/singleartistproxymodel.cpp - ../src/models/singlealbumproxymodel.cpp - ../src/notificationitem.cpp - ../src/musicartist.cpp - ../src/musicalbum.cpp - ../src/musicaudiotrack.cpp - ../src/elisautils.cpp - ../src/file/filelistener.cpp - ../src/file/localfilelisting.cpp - ../src/abstractfile/abstractfilelistener.cpp - ../src/abstractfile/abstractfilelisting.cpp - ../src/audiowrapper.cpp trackslistenertest.cpp ) -if (KF5Baloo_FOUND) - if (Qt5DBus_FOUND) - qt5_add_dbus_interface(trackslistenertest_SOURCES - ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.fileindexer.xml - baloo/fileindexer) - - qt5_add_dbus_interface(trackslistenertest_SOURCES - ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.scheduler.xml - baloo/scheduler) - - set(trackslistenertest_SOURCES - ${trackslistenertest_SOURCES} - ../src/baloo/baloolistener.cpp - ../src/baloo/localbaloofilelisting.cpp - ) - endif() -endif() - -if (UPNPQT_FOUND) - set(trackslistenertest_SOURCES - ${trackslistenertest_SOURCES} - ../src/upnp/upnpcontrolcontentdirectory.cpp - ../src/upnp/upnpcontentdirectorymodel.cpp - ../src/upnp/upnpcontrolconnectionmanager.cpp - ../src/upnp/upnpcontrolmediaserver.cpp - ../src/upnp/didlparser.cpp - ../src/upnp/upnplistener.cpp - ../src/upnp/upnpdiscoverallmusic.cpp - ) -endif() - -kconfig_add_kcfg_files(trackslistenertest_SOURCES ../src/elisa_settings.kcfgc ) -set(trackslistenertest_SOURCES - ${trackslistenertest_SOURCES} - ../src/elisa_core.kcfg -) - ecm_add_test(${trackslistenertest_SOURCES} TEST_NAME "trackslistenertest" LINK_LIBRARIES - Qt5::Test Qt5::Core Qt5::Sql Qt5::Gui Qt5::Widgets KF5::I18n Qt5::Quick Qt5::Multimedia - Qt5::Concurrent KF5::ConfigCore KF5::ConfigGui KF5::FileMetaData + Qt5::Test elisaLib ) -if (KF5Baloo_FOUND) - target_link_libraries(trackslistenertest KF5::Baloo Qt5::DBus) -endif() -if (KF5KCMUtils_FOUND) - target_link_libraries(trackslistenertest KF5::KCMUtils) -endif() -if (UPNPQT_FOUND) - target_link_libraries(trackslistenertest Qt5::Xml UPNP::upnpQt Qt5::Network) -endif() -if (KF5XmlGui_FOUND) - target_link_libraries(trackslistenertest KF5::XmlGui) -endif() - target_include_directories(trackslistenertest PRIVATE ${CMAKE_SOURCE_DIR}/src) set(allalbumsmodeltest_SOURCES - ../src/databaseinterface.cpp - ../src/musicartist.cpp - ../src/musicalbum.cpp - ../src/musicaudiotrack.cpp - ../src/models/allalbumsmodel.cpp modeltest.cpp allalbumsmodeltest.cpp ) ecm_add_test(${allalbumsmodeltest_SOURCES} TEST_NAME "allalbumsmodeltest" - LINK_LIBRARIES Qt5::Test Qt5::Core Qt5::Sql Qt5::Concurrent KF5::I18n) + LINK_LIBRARIES Qt5::Test elisaLib +) target_include_directories(allalbumsmodeltest PRIVATE ${CMAKE_SOURCE_DIR}/src) set(albummodeltest_SOURCES - ../src/databaseinterface.cpp - ../src/musicartist.cpp - ../src/musicalbum.cpp - ../src/musicaudiotrack.cpp - ../src/models/albummodel.cpp modeltest.cpp albummodeltest.cpp ) ecm_add_test(${albummodeltest_SOURCES} TEST_NAME "albummodeltest" - LINK_LIBRARIES Qt5::Test Qt5::Core Qt5::Sql Qt5::Concurrent KF5::I18n) + LINK_LIBRARIES + Qt5::Test elisaLib +) target_include_directories(albummodeltest PRIVATE ${CMAKE_SOURCE_DIR}/src) set(allartistsmodeltest_SOURCES - ../src/databaseinterface.cpp - ../src/musicartist.cpp - ../src/musicalbum.cpp - ../src/musicaudiotrack.cpp - ../src/models/allartistsmodel.cpp modeltest.cpp allartistsmodeltest.cpp ) ecm_add_test(${allartistsmodeltest_SOURCES} TEST_NAME "allartistsmodeltest" - LINK_LIBRARIES Qt5::Test Qt5::Core Qt5::Sql KF5::I18n) + LINK_LIBRARIES + Qt5::Test elisaLib +) target_include_directories(allartistsmodeltest PRIVATE ${CMAKE_SOURCE_DIR}/src) set(alltracksmodeltest_SOURCES - ../src/databaseinterface.cpp - ../src/musicartist.cpp - ../src/musicalbum.cpp - ../src/musicaudiotrack.cpp - ../src/models/alltracksmodel.cpp modeltest.cpp alltracksmodeltest.cpp ) ecm_add_test(${alltracksmodeltest_SOURCES} TEST_NAME "alltracksmodeltest" - LINK_LIBRARIES Qt5::Test Qt5::Core Qt5::Sql KF5::I18n) + LINK_LIBRARIES + Qt5::Test elisaLib +) target_include_directories(alltracksmodeltest PRIVATE ${CMAKE_SOURCE_DIR}/src) set(alltracksproxymodeltest_SOURCES - ../src/databaseinterface.cpp - ../src/musicartist.cpp - ../src/musicalbum.cpp - ../src/musicaudiotrack.cpp - ../src/models/alltracksmodel.cpp - ../src/models/alltracksproxymodel.cpp - ../src/models/abstractmediaproxymodel.cpp modeltest.cpp alltracksproxymodeltest.cpp ) ecm_add_test(${alltracksproxymodeltest_SOURCES} TEST_NAME "alltracksproxymodeltest" - LINK_LIBRARIES Qt5::Test Qt5::Core Qt5::Sql Qt5::Concurrent KF5::I18n) + LINK_LIBRARIES + Qt5::Test elisaLib +) target_include_directories(alltracksproxymodeltest PRIVATE ${CMAKE_SOURCE_DIR}/src) set(localfilelistingtest_SOURCES - ../src/file/localfilelisting.cpp - ../src/abstractfile/abstractfilelisting.cpp - ../src/musicaudiotrack.cpp - ../src/notificationitem.cpp - ../src/elisautils.cpp localfilelistingtest.cpp ) -kconfig_add_kcfg_files(localfilelistingtest_SOURCES ../src/elisa_settings.kcfgc ) -set(localfilelistingtest_SOURCES - ${localfilelistingtest_SOURCES} - ../src/elisa_core.kcfg -) - ecm_add_test(${localfilelistingtest_SOURCES} TEST_NAME "localfilelistingtest" - LINK_LIBRARIES Qt5::Test Qt5::Core Qt5::Sql KF5::I18n KF5::FileMetaData KF5::ConfigCore KF5::ConfigGui) + LINK_LIBRARIES + Qt5::Test elisaLib +) target_include_directories(localfilelistingtest PRIVATE ${CMAKE_SOURCE_DIR}/src) if (KF5XmlGui_FOUND AND KF5KCMUtils_FOUND) set(elisaapplicationtest_SOURCES - ../src/elisaapplication.cpp - ../src/musiclistenersmanager.cpp - ../src/databaseinterface.cpp - ../src/notificationitem.cpp - ../src/trackslistener.cpp - ../src/mediaplaylist.cpp - ../src/audiowrapper.cpp - ../src/musicartist.cpp - ../src/musicalbum.cpp - ../src/musicaudiotrack.cpp - ../src/elisautils.cpp - ../src/manageaudioplayer.cpp - ../src/models/allalbumsmodel.cpp - ../src/models/allartistsmodel.cpp - ../src/models/alltracksmodel.cpp - ../src/models/albummodel.cpp - ../src/models/abstractmediaproxymodel.cpp - ../src/models/allalbumsproxymodel.cpp - ../src/models/allartistsproxymodel.cpp - ../src/models/alltracksproxymodel.cpp - ../src/models/singleartistproxymodel.cpp - ../src/models/singlealbumproxymodel.cpp - ../src/file/filelistener.cpp - ../src/file/localfilelisting.cpp - ../src/abstractfile/abstractfilelistener.cpp - ../src/abstractfile/abstractfilelisting.cpp elisaapplicationtest.cpp ) - if (KF5Baloo_FOUND) - if (Qt5DBus_FOUND) - qt5_add_dbus_interface(elisaapplicationtest_SOURCES - ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.fileindexer.xml - baloo/fileindexer) - - qt5_add_dbus_interface(elisaapplicationtest_SOURCES - ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.scheduler.xml - baloo/scheduler) - - set(elisaapplicationtest_SOURCES - ${elisaapplicationtest_SOURCES} - ../src/baloo/baloolistener.cpp - ../src/baloo/localbaloofilelisting.cpp - ) - endif() - endif() - - kconfig_add_kcfg_files(elisaapplicationtest_SOURCES ../src/elisa_settings.kcfgc ) - set(elisaapplicationtest_SOURCES - ${elisaapplicationtest_SOURCES} - ../src/elisa_core.kcfg - ) - ecm_add_test(${elisaapplicationtest_SOURCES} TEST_NAME "elisaapplicationtest" - LINK_LIBRARIES Qt5::Test Qt5::Core Qt5::Widgets Qt5::Multimedia Qt5::Sql Qt5::Concurrent - KF5::FileMetaData KF5::I18n KF5::ConfigCore KF5::ConfigGui KF5::ConfigWidgets KF5::XmlGui KF5::KCMUtils) - - if (KF5Baloo_FOUND) - target_link_libraries(elisaapplicationtest KF5::Baloo Qt5::DBus) - endif() + LINK_LIBRARIES + Qt5::Test elisaLib + ) target_include_directories(elisaapplicationtest PRIVATE ${CMAKE_SOURCE_DIR}/src) endif() diff --git a/autotests/elisaapplicationtest.cpp b/autotests/elisaapplicationtest.cpp --- a/autotests/elisaapplicationtest.cpp +++ b/autotests/elisaapplicationtest.cpp @@ -68,7 +68,7 @@ myApp.setArguments({relativePath}); QCOMPARE(argumentsChangedSpy.count(), 1); - QCOMPARE(enqueueSpy.count(), 0); + QCOMPARE(enqueueSpy.count(), 1); QCOMPARE(myApp.arguments().count(), 1); QCOMPARE(myApp.arguments().at(0), myTestFile.canonicalFilePath()); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,39 +1,166 @@ include_directories(${elisa_BINARY_DIR}) +set(elisaLib_SOURCES + mediaplaylist.cpp + musicalbum.cpp + musicaudiotrack.cpp + musicartist.cpp + progressindicator.cpp + databaseinterface.cpp + musiclistenersmanager.cpp + managemediaplayercontrol.cpp + manageheaderbar.cpp + manageaudioplayer.cpp + trackslistener.cpp + elisaapplication.cpp + audiowrapper.cpp + notificationitem.cpp + topnotificationmanager.cpp + elisautils.cpp + trackdatahelper.cpp + abstractfile/abstractfilelistener.cpp + abstractfile/abstractfilelisting.cpp + file/filelistener.cpp + file/localfilelisting.cpp + models/albummodel.cpp + models/allalbumsmodel.cpp + models/allartistsmodel.cpp + models/alltracksmodel.cpp + models/abstractmediaproxymodel.cpp + models/allalbumsproxymodel.cpp + models/allartistsproxymodel.cpp + models/alltracksproxymodel.cpp + models/singleartistproxymodel.cpp + models/singlealbumproxymodel.cpp +) + +if (KF5Baloo_FOUND) + if (Qt5DBus_FOUND) + set(elisaLib_SOURCES + ${elisaLib_SOURCES} + baloo/localbaloofilelisting.cpp + baloo/baloolistener.cpp + ) + + qt5_add_dbus_interface(elisaLib_SOURCES + ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.fileindexer.xml + baloo/fileindexer) + + qt5_add_dbus_interface(elisaLib_SOURCES + ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.scheduler.xml + baloo/scheduler) + endif() +endif() + +if (Qt5DBus_FOUND) + set(elisaLib_SOURCES + ${elisaLib_SOURCES} + mpris2/mpris2.cpp + mpris2/mediaplayer2.cpp + mpris2/mediaplayer2player.cpp + ) +endif() + +if (UPNPQT_FOUND) + set(elisaLib_SOURCES + ${elisaLib_SOURCES} + upnp/upnpcontrolcontentdirectory.cpp + upnp/upnpcontentdirectorymodel.cpp + upnp/upnpcontrolconnectionmanager.cpp + upnp/upnpcontrolmediaserver.cpp + upnp/didlparser.cpp + upnp/upnplistener.cpp + upnp/upnpdiscoverallmusic.cpp + ) +endif() + +if (KF5Baloo_FOUND) + if (Qt5DBus_FOUND) + qt5_add_dbus_interface(elisaLib_SOURCES + ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.fileindexer.xml + baloo/fileindexer) + + qt5_add_dbus_interface(elisaLib_SOURCES + ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.scheduler.xml + baloo/scheduler) + + set(elisaLib_SOURCES + ${elisaLib_SOURCES} + ../src/baloo/baloolistener.cpp + ../src/baloo/localbaloofilelisting.cpp + ) + endif() +endif() + +kconfig_add_kcfg_files(elisaLib_SOURCES ../src/elisa_settings.kcfgc ) +set(elisaLib_SOURCES + ${elisaLib_SOURCES} + ../src/elisa_core.kcfg +) + +add_library(elisaLib ${elisaLib_SOURCES}) +target_link_libraries(elisaLib + LINK_PUBLIC + Qt5::Multimedia KF5::DBusAddons + LINK_PRIVATE + Qt5::Core Qt5::Sql Qt5::Widgets KF5::I18n + Qt5::Concurrent Qt5::Qml KF5::ConfigCore KF5::ConfigGui KF5::FileMetaData + KF5::ConfigWidgets KF5::XmlGui KF5::KCMUtils KF5::Baloo) + +if (Qt5DBus_FOUND) + if (KF5DBusAddons_FOUND) + target_link_libraries(elisaLib + LINK_PUBLIC + KF5::DBusAddons + ) + endif() +endif() + +generate_export_header(elisaLib BASE_NAME ElisaLib EXPORT_FILE_NAME elisaLib_export.h) + +set_target_properties(elisaLib PROPERTIES + VERSION 0.1 + SOVERSION 0 + EXPORT_NAME ElisaLib +) + +install(TARGETS elisaLib ${INSTALL_TARGETS_DEFAULT_ARGS}) + +set(elisaqmlplugin_SOURCES + elisaqmlplugin.cpp + elisautils.cpp +) + +add_library(elisaqmlplugin SHARED ${elisaqmlplugin_SOURCES}) +target_link_libraries(elisaqmlplugin + LINK_PRIVATE + Qt5::Quick Qt5::Widgets + KF5::FileMetaData KF5::ConfigCore KF5::ConfigGui + elisaLib +) + +set_target_properties(elisaqmlplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/org/kde/elisa) + +install(TARGETS elisaqmlplugin ${INSTALL_TARGETS_DEFAULT_ARGS}) + +add_custom_target(copy) +add_custom_target(copy2) + +file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin/org/kde/elisa) + +add_custom_command(TARGET copy PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E + copy ${CMAKE_CURRENT_SOURCE_DIR}/qmldir ${CMAKE_BINARY_DIR}/bin/org/kde/elisa/) + +add_custom_command(TARGET copy2 PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E + copy ${CMAKE_CURRENT_SOURCE_DIR}/plugins.qmltypes ${CMAKE_BINARY_DIR}/bin/org/kde/elisa/) + +add_dependencies(elisaqmlplugin copy copy2) + if (Qt5Quick_FOUND AND Qt5Widgets_FOUND) set(elisa_SOURCES main.cpp - mediaplaylist.cpp - musicalbum.cpp - musicaudiotrack.cpp - musicartist.cpp - progressindicator.cpp - databaseinterface.cpp - musiclistenersmanager.cpp - managemediaplayercontrol.cpp - manageheaderbar.cpp - manageaudioplayer.cpp - trackslistener.cpp - elisaapplication.cpp - audiowrapper.cpp - notificationitem.cpp - topnotificationmanager.cpp - elisautils.cpp - trackdatahelper.cpp - abstractfile/abstractfilelistener.cpp - abstractfile/abstractfilelisting.cpp - file/filelistener.cpp - file/localfilelisting.cpp - models/albummodel.cpp - models/allalbumsmodel.cpp - models/allartistsmodel.cpp - models/alltracksmodel.cpp - models/abstractmediaproxymodel.cpp - models/allalbumsproxymodel.cpp - models/allartistsproxymodel.cpp - models/alltracksproxymodel.cpp - models/singleartistproxymodel.cpp - models/singlealbumproxymodel.cpp windows/WindowsTheme.qml windows/PlatformIntegration.qml @@ -71,52 +198,6 @@ qml/GridBrowserView.qml qml/GridBrowserDelegate.qml qml/ListBrowserView.qml - ) - - if (KF5Baloo_FOUND) - if (Qt5DBus_FOUND) - set(elisa_SOURCES - ${elisa_SOURCES} - baloo/localbaloofilelisting.cpp - baloo/baloolistener.cpp - ) - - qt5_add_dbus_interface(elisa_SOURCES - ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.fileindexer.xml - baloo/fileindexer) - - qt5_add_dbus_interface(elisa_SOURCES - ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.scheduler.xml - baloo/scheduler) - endif() - endif() - - if (Qt5DBus_FOUND) - set(elisa_SOURCES - ${elisa_SOURCES} - mpris2/mpris2.cpp - mpris2/mediaplayer2.cpp - mpris2/mediaplayer2player.cpp - ) - endif() - - if (UPNPQT_FOUND) - set(elisa_SOURCES - ${elisa_SOURCES} - upnp/upnpcontrolcontentdirectory.cpp - upnp/upnpcontentdirectorymodel.cpp - upnp/upnpcontrolconnectionmanager.cpp - upnp/upnpcontrolmediaserver.cpp - upnp/didlparser.cpp - upnp/upnplistener.cpp - upnp/upnpdiscoverallmusic.cpp - ) - endif() - - kconfig_add_kcfg_files(elisa_SOURCES elisa_settings.kcfgc) - set(elisa_SOURCES - ${elisa_SOURCES} - elisa_core.kcfg ) qt5_add_resources(elisa_SOURCES resources.qrc) @@ -140,84 +221,10 @@ target_link_libraries(elisa LINK_PRIVATE - Qt5::Core - Qt5::Quick - Qt5::Gui + elisaLib Qt5::Widgets - Qt5::Multimedia - Qt5::Svg - Qt5::Sql - Qt5::Concurrent - KF5::I18n - KF5::ConfigCore - KF5::ConfigGui - KF5::FileMetaData - KF5::CoreAddons + KF5::Declarative KF5::I18n KF5::Crash KF5::ConfigCore KF5::ConfigGui ) - - if (Qt5DBus_FOUND) - target_link_libraries(elisa - LINK_PRIVATE - Qt5::DBus - ) - endif() - - if (KF5KCMUtils_FOUND) - target_link_libraries(elisa - LINK_PRIVATE - KF5::KCMUtils - ) - endif() - - if (Qt5AndroidExtras_FOUND) - target_link_libraries(elisa - LINK_PRIVATE - Qt5::AndroidExtras - ) - endif() - - if (KF5Baloo_FOUND) - target_link_libraries(elisa - LINK_PRIVATE - KF5::Baloo - ) - endif() - - if (KF5Declarative_FOUND) - target_link_libraries(elisa - LINK_PRIVATE - KF5::Declarative - ) - endif() - - if (KF5XmlGui_FOUND) - target_link_libraries(elisa - LINK_PRIVATE - KF5::XmlGui - ) - endif() - - if (KF5Crash_FOUND) - target_link_libraries(elisa - LINK_PRIVATE - KF5::Crash - ) - endif() - - if (UPNPQT_FOUND) - target_link_libraries(elisa - LINK_PRIVATE - UPNP::upnpQt - Qt5::Network - ) - endif() - - if (KF5DBusAddons_FOUND) - target_link_libraries(elisa - LINK_PRIVATE - KF5::DBusAddons - ) - endif() endif() install(TARGETS elisa ${INSTALL_TARGETS_DEFAULT_ARGS}) @@ -229,92 +236,20 @@ set(elisaImport_SOURCES elisaimport.cpp elisaimportapplication.cpp - elisaapplication.cpp - mediaplaylist.cpp - musicalbum.cpp - musicaudiotrack.cpp - musicartist.cpp - manageaudioplayer.cpp - progressindicator.cpp - models/albummodel.cpp - models/allalbumsmodel.cpp - models/allartistsmodel.cpp - models/alltracksmodel.cpp - models/abstractmediaproxymodel.cpp - models/allalbumsproxymodel.cpp - models/allartistsproxymodel.cpp - models/alltracksproxymodel.cpp - models/singleartistproxymodel.cpp - models/singlealbumproxymodel.cpp - databaseinterface.cpp - musiclistenersmanager.cpp - trackslistener.cpp - notificationitem.cpp - topnotificationmanager.cpp - elisautils.cpp - abstractfile/abstractfilelistener.cpp - abstractfile/abstractfilelisting.cpp - file/filelistener.cpp - file/localfilelisting.cpp - audiowrapper.cpp ) -if (KF5Baloo_FOUND) - if (Qt5DBus_FOUND) - set(elisaImport_SOURCES - ${elisaImport_SOURCES} - baloo/localbaloofilelisting.cpp - baloo/baloolistener.cpp - ) - - qt5_add_dbus_interface(elisaImport_SOURCES - ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.fileindexer.xml - baloo/fileindexer) - - qt5_add_dbus_interface(elisaImport_SOURCES - ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.scheduler.xml - baloo/scheduler) - endif() -endif() - -kconfig_add_kcfg_files(elisaImport_SOURCES elisa_settings.kcfgc) +kconfig_add_kcfg_files(elisaImport_SOURCES ../src/elisa_settings.kcfgc ) set(elisaImport_SOURCES ${elisaImport_SOURCES} - elisa_core.kcfg + ../src/elisa_core.kcfg ) add_executable(elisaImport ${elisaImport_SOURCES}) target_link_libraries(elisaImport LINK_PRIVATE - Qt5::Core - Qt5::Sql - Qt5::Multimedia - Qt5::Widgets - Qt5::Concurrent - KF5::I18n - KF5::ConfigCore - KF5::ConfigGui - KF5::FileMetaData + KF5::ConfigCore KF5::ConfigGui KF5::FileMetaData + elisaLib ) -if (KF5XmlGui_FOUND) - target_link_libraries(elisaImport - LINK_PRIVATE - KF5::XmlGui - ) -endif() - -if (KF5KCMUtils_FOUND) - target_link_libraries(elisaImport - LINK_PRIVATE - KF5::KCMUtils - ) -endif() - -if (KF5Baloo_FOUND) - target_link_libraries(elisaImport - LINK_PRIVATE - KF5::Baloo - ) -endif() +set(QML_IMPORT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL "qml import path" FORCE) diff --git a/src/abstractfile/abstractfilelisting.h b/src/abstractfile/abstractfilelisting.h --- a/src/abstractfile/abstractfilelisting.h +++ b/src/abstractfile/abstractfilelisting.h @@ -20,6 +20,8 @@ #ifndef ABSTRACTFILELISTING_H #define ABSTRACTFILELISTING_H +#include "elisaLib_export.h" + #include "notificationitem.h" #include @@ -34,7 +36,7 @@ class MusicAudioTrack; class NotificationItem; -class AbstractFileListing : public QObject +class ELISALIB_EXPORT AbstractFileListing : public QObject { Q_OBJECT diff --git a/src/audiowrapper.h b/src/audiowrapper.h --- a/src/audiowrapper.h +++ b/src/audiowrapper.h @@ -20,6 +20,8 @@ #ifndef AUDIOWRAPPER_H #define AUDIOWRAPPER_H +#include "elisaLib_export.h" + #include #include #include @@ -29,7 +31,7 @@ class AudioWrapperPrivate; -class AudioWrapper : public QObject +class ELISALIB_EXPORT AudioWrapper : public QObject { Q_OBJECT diff --git a/src/databaseinterface.h b/src/databaseinterface.h --- a/src/databaseinterface.h +++ b/src/databaseinterface.h @@ -20,6 +20,8 @@ #ifndef DATABASEINTERFACE_H #define DATABASEINTERFACE_H +#include "elisaLib_export.h" + #include "musicalbum.h" #include "musicaudiotrack.h" #include "musicartist.h" @@ -37,7 +39,7 @@ class QMutex; class QSqlRecord; -class DatabaseInterface : public QObject +class ELISALIB_EXPORT DatabaseInterface : public QObject { Q_OBJECT diff --git a/src/elisaapplication.h b/src/elisaapplication.h --- a/src/elisaapplication.h +++ b/src/elisaapplication.h @@ -20,6 +20,8 @@ #ifndef ELISAAPPLICATION_H #define ELISAAPPLICATION_H +#include "elisaLib_export.h" + #include "config-upnp-qt.h" #include @@ -39,7 +41,7 @@ class AudioWrapper; class ElisaApplicationPrivate; -class ElisaApplication : public QObject +class ELISALIB_EXPORT ElisaApplication : public QObject { Q_OBJECT diff --git a/src/elisaapplication.cpp b/src/elisaapplication.cpp --- a/src/elisaapplication.cpp +++ b/src/elisaapplication.cpp @@ -73,6 +73,12 @@ #endif { Q_UNUSED(parent) + + auto configurationFileName = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation); + configurationFileName += QStringLiteral("/elisarc"); + Elisa::ElisaConfiguration::instance(configurationFileName); + Elisa::ElisaConfiguration::self()->load(); + Elisa::ElisaConfiguration::self()->save(); } #if defined KF5XmlGui_FOUND && KF5XmlGui_FOUND @@ -161,6 +167,10 @@ d->mArguments = checkFileListAndMakeAbsolute(newArguments, QDir::currentPath()); Q_EMIT argumentsChanged(); + + if (!d->mArguments.isEmpty()) { + Q_EMIT enqueue(d->mArguments); + } } void ElisaApplication::activateActionRequested(const QString &actionName, const QVariant ¶meter) @@ -308,6 +318,10 @@ d->mMediaPlayList.get(), static_cast &, ElisaUtils::PlayListEnqueueMode, ElisaUtils::PlayListEnqueueTriggerPlay)>(&MediaPlayList::enqueue)); + + if (!d->mArguments.isEmpty()) { + Q_EMIT enqueue(d->mArguments); + } } QAction * ElisaApplication::action(const QString& name) diff --git a/src/models/allartistsproxymodel.h b/src/elisaqmlplugin.h copy from src/models/allartistsproxymodel.h copy to src/elisaqmlplugin.h --- a/src/models/allartistsproxymodel.h +++ b/src/elisaqmlplugin.h @@ -1,5 +1,4 @@ /* - * Copyright 2017 Alexander Stippich * Copyright 2018 Matthieu Gallien * * This library is free software; you can redistribute it and/or @@ -18,39 +17,21 @@ * Boston, MA 02110-1301, USA. */ -#ifndef ALLARTISTSPROXYMODEL_H -#define ALLARTISTSPROXYMODEL_H +#ifndef ELISAQMLTESTPLUGIN_H +#define ELISAQMLTESTPLUGIN_H -#include "abstractmediaproxymodel.h" -#include "elisautils.h" +#include -class AllArtistsProxyModel : public AbstractMediaProxyModel +class QQmlEngine; + +class ElisaQmlTestPlugin : public QQmlExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: - - explicit AllArtistsProxyModel(QObject *parent = nullptr); - - ~AllArtistsProxyModel() override; - -Q_SIGNALS: - - void artistToEnqueue(QList artistNames, - ElisaUtils::PlayListEnqueueMode enqueueMode, - ElisaUtils::PlayListEnqueueTriggerPlay triggerPlay); - -public Q_SLOTS: - - void enqueueToPlayList(); - - void replaceAndPlayOfPlayList(); - -protected: - - bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override; - + void initializeEngine(QQmlEngine *engine, const char *uri) override; + void registerTypes(const char *uri) override; }; - -#endif // ALLARTISTSPROXYMODEL_H +#endif // ELISAQMLTESTPLUGIN_H diff --git a/src/elisaqmlplugin.cpp b/src/elisaqmlplugin.cpp new file mode 100644 --- /dev/null +++ b/src/elisaqmlplugin.cpp @@ -0,0 +1,142 @@ +/* + * Copyright 2018 Matthieu Gallien + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "elisaqmlplugin.h" + +#if defined UPNPQT_FOUND && UPNPQT_FOUND +#include "upnp/upnpcontrolconnectionmanager.h" +#include "upnp/upnpcontrolmediaserver.h" +#include "upnp/upnpcontrolcontentdirectory.h" +#include "upnp/upnpcontentdirectorymodel.h" +#include "upnpdevicedescription.h" +#include "upnp/didlparser.h" +#include "upnp/upnpdiscoverallmusic.h" + +#include "upnpssdpengine.h" +#include "upnpabstractservice.h" +#include "upnpcontrolabstractdevice.h" +#include "upnpcontrolabstractservice.h" +#include "upnpbasictypes.h" +#endif + +#include "elisaapplication.h" +#include "progressindicator.h" +#include "mediaplaylist.h" +#include "managemediaplayercontrol.h" +#include "manageheaderbar.h" +#include "manageaudioplayer.h" +#include "musicaudiotrack.h" +#include "musiclistenersmanager.h" +#include "models/allalbumsmodel.h" +#include "models/albummodel.h" +#include "models/allartistsmodel.h" +#include "models/alltracksmodel.h" +#include "models/allalbumsproxymodel.h" +#include "models/alltracksproxymodel.h" +#include "models/allartistsproxymodel.h" +#include "models/singleartistproxymodel.h" +#include "models/singlealbumproxymodel.h" +#include "audiowrapper.h" +#include "notificationitem.h" +#include "topnotificationmanager.h" +#include "trackdatahelper.h" +#include "elisautils.h" + +#if defined Qt5DBus_FOUND && Qt5DBus_FOUND +#include "mpris2/mpris2.h" +#include "mpris2/mediaplayer2player.h" +#endif + +#include +#include + +#include +#include +#include + +void ElisaQmlTestPlugin::initializeEngine(QQmlEngine *engine, const char *uri) +{ + QQmlExtensionPlugin::initializeEngine(engine, uri); +} + +void ElisaQmlTestPlugin::registerTypes(const char *uri) +{ +#if defined UPNPQT_FOUND && UPNPQT_FOUND + qmlRegisterType(uri, 1, 0, "UpnpSsdpEngine"); + qmlRegisterType(uri, 1, 0, "UpnpDiscoverAllMusic"); + + qmlRegisterType(uri, 1, 0, "UpnpAbstractDevice"); + qmlRegisterType(uri, 1, 0, "UpnpAbstractService"); + qmlRegisterType(uri, 1, 0, "UpnpControlAbstractDevice"); + qmlRegisterType(uri, 1, 0, "UpnpControlAbstractService"); + qmlRegisterType(uri, 1, 0, "UpnpControlConnectionManager"); + qmlRegisterType(uri, 1, 0, "UpnpControlMediaServer"); + qmlRegisterType(uri, 1, 0, "UpnpContentDirectoryModel"); + qmlRegisterType(uri, 1, 0, "DidlParser"); + qmlRegisterType(uri, 1, 0, "UpnpControlContentDirectory"); + qmlRegisterType(uri, 1, 0, "UpnpDeviceDescription"); + + qRegisterMetaType(); + qRegisterMetaType >(); + qRegisterMetaType(); + qRegisterMetaType(); + qRegisterMetaType(); +#endif + + qmlRegisterType(uri, 1, 0, "MediaPlayList"); + qmlRegisterType(uri, 1, 0, "ManageMediaPlayerControl"); + qmlRegisterType(uri, 1, 0, "ManageHeaderBar"); + qmlRegisterType(uri, 1, 0, "ManageAudioPlayer"); + qmlRegisterType(uri, 1, 0, "ProgressIndicator"); + qmlRegisterType(uri, 1, 0, "MusicListenersManager"); + qmlRegisterType(uri, 1, 0, "AllAlbumsProxyModel"); + qmlRegisterType(uri, 1, 0, "AllArtistsProxyModel"); + qmlRegisterType(uri, 1, 0, "AllTracksProxyModel"); + qmlRegisterType(uri, 1, 0, "SingleAlbumProxyModel"); + qmlRegisterType(uri, 1, 0, "SingleArtistProxyModel"); + qmlRegisterType(uri, 1, 0, "AudioWrapper"); + qmlRegisterType(uri, 1, 0, "TopNotificationManager"); + qmlRegisterType(uri, 1, 0, "TrackDataHelper"); + +#if defined Qt5DBus_FOUND && Qt5DBus_FOUND + qmlRegisterType(uri, 1, 0, "Mpris2"); + qRegisterMetaType(); +#endif + + qRegisterMetaType(); + qRegisterMetaType>("QHash"); + qRegisterMetaType>("QList"); + qRegisterMetaType>("QVector"); + qRegisterMetaType>("QList"); + qRegisterMetaType>("QList"); + qRegisterMetaType>("QVector"); + qRegisterMetaType>("QHash"); + qRegisterMetaType("MusicAlbum"); + qRegisterMetaType("MusicArtist"); + qRegisterMetaType>(); + qRegisterMetaType(); + qRegisterMetaType("NotificationItem"); + qRegisterMetaType>("QMap"); + qRegisterMetaType("ElisaUtils::PlayListEnqueueMode"); + qRegisterMetaType("ElisaUtils::PlayListEnqueueTriggerPlay"); + + qRegisterMetaTypeStreamOperators("PlayListControler::PlayerState"); + + qmlRegisterUncreatableType(uri, 1, 0, "ElisaApplication", QStringLiteral("only one and done in c++")); +} diff --git a/src/elisautils.h b/src/elisautils.h --- a/src/elisautils.h +++ b/src/elisautils.h @@ -20,6 +20,8 @@ #ifndef ELISAUTILS_H #define ELISAUTILS_H +#include "elisaLib_export.h" + #include "musicaudiotrack.h" #include @@ -36,8 +38,8 @@ Q_NAMESPACE -MusicAudioTrack scanOneFile(const QUrl &scanFile, const QMimeDatabase &mimeDatabase, - const KFileMetaData::ExtractorCollection &allExtractors); +ELISALIB_EXPORT MusicAudioTrack scanOneFile(const QUrl &scanFile, const QMimeDatabase &mimeDatabase, + const KFileMetaData::ExtractorCollection &allExtractors); enum PlayListEnqueueMode { AppendPlayList, diff --git a/src/file/localfilelisting.h b/src/file/localfilelisting.h --- a/src/file/localfilelisting.h +++ b/src/file/localfilelisting.h @@ -20,15 +20,17 @@ #ifndef LOCALFILELISTING_H #define LOCALFILELISTING_H +#include "elisaLib_export.h" + #include "../abstractfile/abstractfilelisting.h" #include #include class LocalFileListingPrivate; -class LocalFileListing : public AbstractFileListing +class ELISALIB_EXPORT LocalFileListing : public AbstractFileListing { Q_OBJECT diff --git a/src/main.cpp b/src/main.cpp --- a/src/main.cpp +++ b/src/main.cpp @@ -19,52 +19,10 @@ #include "config-upnp-qt.h" -//#define QT_QML_DEBUG - -#if defined UPNPQT_FOUND && UPNPQT_FOUND -#include "upnp/upnpcontrolconnectionmanager.h" -#include "upnp/upnpcontrolmediaserver.h" -#include "upnp/upnpcontrolcontentdirectory.h" -#include "upnp/upnpcontentdirectorymodel.h" -#include "upnpdevicedescription.h" -#include "upnp/didlparser.h" -#include "upnp/upnpdiscoverallmusic.h" - -#include "upnpssdpengine.h" -#include "upnpabstractservice.h" -#include "upnpcontrolabstractdevice.h" -#include "upnpcontrolabstractservice.h" -#include "upnpbasictypes.h" -#endif - -#include "progressindicator.h" -#include "mediaplaylist.h" -#include "managemediaplayercontrol.h" -#include "manageheaderbar.h" -#include "manageaudioplayer.h" -#include "musicaudiotrack.h" -#include "musiclistenersmanager.h" -#include "models/allalbumsmodel.h" -#include "models/albummodel.h" -#include "models/allartistsmodel.h" -#include "models/alltracksmodel.h" -#include "models/allalbumsproxymodel.h" -#include "models/alltracksproxymodel.h" -#include "models/allartistsproxymodel.h" -#include "models/singleartistproxymodel.h" -#include "models/singlealbumproxymodel.h" #include "elisaapplication.h" -#include "audiowrapper.h" -#include "notificationitem.h" -#include "topnotificationmanager.h" #include "elisa_settings.h" -#include "trackdatahelper.h" -#include "elisautils.h" -#if defined Qt5DBus_FOUND && Qt5DBus_FOUND -#include "mpris2/mpris2.h" -#include "mpris2/mediaplayer2player.h" -#endif +//#define QT_QML_DEBUG #if defined KF5Declarative_FOUND && KF5Declarative_FOUND #include @@ -79,10 +37,13 @@ #include #endif +#if defined KF5DBusAddons_FOUND && KF5DBusAddons_FOUND +#include +#endif + #include #include -#include #include #include @@ -96,15 +57,13 @@ #include #include +#include + #if defined Qt5AndroidExtras_FOUND && Qt5AndroidExtras_FOUND #include #include #endif -#if defined KF5DBusAddons_FOUND && KF5DBusAddons_FOUND -#include -#endif - #if defined Q_OS_ANDROID int __attribute__((visibility("default"))) main(int argc, char *argv[]) #else @@ -125,68 +84,6 @@ KLocalizedString::setApplicationDomain("elisa"); -#if defined UPNPQT_FOUND && UPNPQT_FOUND - qmlRegisterType("org.kde.elisa", 1, 0, "UpnpSsdpEngine"); - qmlRegisterType("org.kde.elisa", 1, 0, "UpnpDiscoverAllMusic"); - - qmlRegisterType("org.kde.elisa", 1, 0, "UpnpAbstractDevice"); - qmlRegisterType("org.kde.elisa", 1, 0, "UpnpAbstractService"); - qmlRegisterType("org.kde.elisa", 1, 0, "UpnpControlAbstractDevice"); - qmlRegisterType("org.kde.elisa", 1, 0, "UpnpControlAbstractService"); - qmlRegisterType("org.kde.elisa", 1, 0, "UpnpControlConnectionManager"); - qmlRegisterType("org.kde.elisa", 1, 0, "UpnpControlMediaServer"); - qmlRegisterType("org.kde.elisa", 1, 0, "UpnpContentDirectoryModel"); - qmlRegisterType("org.kde.elisa", 1, 0, "DidlParser"); - qmlRegisterType("org.kde.elisa", 1, 0, "UpnpControlContentDirectory"); - qmlRegisterType("org.kde.elisa", 1, 0, "UpnpDeviceDescription"); - - qRegisterMetaType(); - qRegisterMetaType >(); - qRegisterMetaType(); - qRegisterMetaType(); - qRegisterMetaType(); -#endif - - qmlRegisterType("org.kde.elisa", 1, 0, "MediaPlayList"); - qmlRegisterType("org.kde.elisa", 1, 0, "ManageMediaPlayerControl"); - qmlRegisterType("org.kde.elisa", 1, 0, "ManageHeaderBar"); - qmlRegisterType("org.kde.elisa", 1, 0, "ManageAudioPlayer"); - qmlRegisterType("org.kde.elisa", 1, 0, "ProgressIndicator"); - qmlRegisterType("org.kde.elisa", 1, 0, "MusicListenersManager"); - qmlRegisterType("org.kde.elisa", 1, 0, "AllAlbumsProxyModel"); - qmlRegisterType("org.kde.elisa", 1, 0, "AllArtistsProxyModel"); - qmlRegisterType("org.kde.elisa", 1, 0, "AllTracksProxyModel"); - qmlRegisterType("org.kde.elisa", 1, 0, "SingleAlbumProxyModel"); - qmlRegisterType("org.kde.elisa", 1, 0, "SingleArtistProxyModel"); - qmlRegisterType("org.kde.elisa", 1, 0, "AudioWrapper"); - qmlRegisterType("org.kde.elisa", 1, 0, "TopNotificationManager"); - qmlRegisterType("org.kde.elisa", 1, 0, "TrackDataHelper"); - -#if defined Qt5DBus_FOUND && Qt5DBus_FOUND - qmlRegisterType("org.kde.elisa", 1, 0, "Mpris2"); - qRegisterMetaType(); -#endif - - qRegisterMetaType(); - qRegisterMetaType>("QHash"); - qRegisterMetaType>("QList"); - qRegisterMetaType>("QVector"); - qRegisterMetaType>("QList"); - qRegisterMetaType>("QList"); - qRegisterMetaType>("QVector"); - qRegisterMetaType>("QHash"); - qRegisterMetaType("MusicAlbum"); - qRegisterMetaType("MusicArtist"); - qRegisterMetaType>(); - qRegisterMetaType(); - qRegisterMetaType("NotificationItem"); - qRegisterMetaType>("QMap"); - qRegisterMetaType("ElisaUtils::PlayListEnqueueMode"); - qRegisterMetaType("ElisaUtils::PlayListEnqueueTriggerPlay"); - qmlRegisterUncreatableType("org.kde.elisa", 1, 0, "ElisaApplication", QStringLiteral("only one and done in c++")); - - qRegisterMetaTypeStreamOperators("PlayListControler::PlayerState"); - KAboutData aboutData( QStringLiteral("elisa"), i18n("Elisa"), QStringLiteral("0.1.80"), @@ -204,28 +101,15 @@ KAboutData::setApplicationData(aboutData); -#if defined KF5DBusAddons_FOUND && KF5DBusAddons_FOUND - KDBusService elisaService(KDBusService::Unique); -#endif - KLocalizedString::setApplicationDomain("elisa"); - ElisaApplication myApp; - -#if defined KF5DBusAddons_FOUND && KF5DBusAddons_FOUND - QObject::connect(&elisaService, &KDBusService::activateActionRequested, &myApp, &ElisaApplication::activateActionRequested); - QObject::connect(&elisaService, &KDBusService::activateRequested, &myApp, &ElisaApplication::activateRequested); - QObject::connect(&elisaService, &KDBusService::openRequested, &myApp, &ElisaApplication::openRequested); -#endif QCommandLineParser parser; parser.addHelpOption(); parser.addVersionOption(); aboutData.setupCommandLine(&parser); parser.process(app); aboutData.processCommandLine(&parser); - myApp.setArguments(parser.positionalArguments()); - #if defined Qt5AndroidExtras_FOUND && Qt5AndroidExtras_FOUND qDebug() << QCoreApplication::arguments(); @@ -235,12 +119,6 @@ QtAndroid::androidContext().object()); #endif - auto configurationFileName = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation); - configurationFileName += QStringLiteral("/elisarc"); - Elisa::ElisaConfiguration::instance(configurationFileName); - Elisa::ElisaConfiguration::self()->load(); - Elisa::ElisaConfiguration::self()->save(); - QQmlApplicationEngine engine; engine.addImportPath(QStringLiteral("qrc:/imports")); QQmlFileSelector selector(&engine); @@ -252,9 +130,24 @@ #endif engine.rootContext()->setContextObject(new KLocalizedContext(&engine)); - engine.rootContext()->setContextProperty(QStringLiteral("elisa"), &myApp); engine.rootContext()->setContextProperty(QStringLiteral("logicalDpi"), QGuiApplication::primaryScreen()->logicalDotsPerInch()); +#if defined KF5DBusAddons_FOUND && KF5DBusAddons_FOUND + KDBusService elisaService(KDBusService::Unique); +#endif + + std::unique_ptr myApp = std::make_unique(); + +#if defined KF5DBusAddons_FOUND && KF5DBusAddons_FOUND + QObject::connect(&elisaService, &KDBusService::activateActionRequested, myApp.get(), &ElisaApplication::activateActionRequested); + QObject::connect(&elisaService, &KDBusService::activateRequested, myApp.get(), &ElisaApplication::activateRequested); + QObject::connect(&elisaService, &KDBusService::openRequested, myApp.get(), &ElisaApplication::openRequested); +#endif + + myApp->setArguments(parser.positionalArguments()); + + engine.rootContext()->setContextProperty(QStringLiteral("elisa"), myApp.release()); + engine.load(QUrl(QStringLiteral("qrc:/qml/ElisaMainWindow.qml"))); return app.exec(); diff --git a/src/manageaudioplayer.h b/src/manageaudioplayer.h --- a/src/manageaudioplayer.h +++ b/src/manageaudioplayer.h @@ -20,13 +20,15 @@ #ifndef MANAGEAUDIOPLAYER_H #define MANAGEAUDIOPLAYER_H +#include "elisaLib_export.h" + #include #include #include #include #include -class ManageAudioPlayer : public QObject +class ELISALIB_EXPORT ManageAudioPlayer : public QObject { Q_OBJECT diff --git a/src/manageheaderbar.h b/src/manageheaderbar.h --- a/src/manageheaderbar.h +++ b/src/manageheaderbar.h @@ -20,14 +20,16 @@ #ifndef MANAGEHEADERBAR_H #define MANAGEHEADERBAR_H +#include "elisaLib_export.h" + #include #include #include #include #include #include -class ManageHeaderBar : public QObject +class ELISALIB_EXPORT ManageHeaderBar : public QObject { Q_OBJECT diff --git a/src/managemediaplayercontrol.h b/src/managemediaplayercontrol.h --- a/src/managemediaplayercontrol.h +++ b/src/managemediaplayercontrol.h @@ -20,12 +20,14 @@ #ifndef MANAGEMEDIAPLAYERCONTROL_H #define MANAGEMEDIAPLAYERCONTROL_H +#include "elisaLib_export.h" + #include #include class QAbstractItemModel; -class ManageMediaPlayerControl : public QObject +class ELISALIB_EXPORT ManageMediaPlayerControl : public QObject { Q_OBJECT @@ -154,7 +156,7 @@ }; -QDataStream &operator<<(QDataStream &out, const ManageMediaPlayerControl::PlayerState &state); -QDataStream &operator>>(QDataStream &in, ManageMediaPlayerControl::PlayerState &state); +ELISALIB_EXPORT QDataStream &operator<<(QDataStream &out, const ManageMediaPlayerControl::PlayerState &state); +ELISALIB_EXPORT QDataStream &operator>>(QDataStream &in, ManageMediaPlayerControl::PlayerState &state); #endif // MANAGEMEDIAPLAYERCONTROL_H diff --git a/src/mediaplaylist.h b/src/mediaplaylist.h --- a/src/mediaplaylist.h +++ b/src/mediaplaylist.h @@ -20,6 +20,8 @@ #ifndef MEDIAPLAYLIST_H #define MEDIAPLAYLIST_H +#include "elisaLib_export.h" + #include "musicaudiotrack.h" #include "musicalbum.h" #include "musicartist.h" @@ -36,7 +38,7 @@ class MediaPlayListEntry; class QDebug; -class MediaPlayList : public QAbstractListModel +class ELISALIB_EXPORT MediaPlayList : public QAbstractListModel { Q_OBJECT diff --git a/src/models/abstractmediaproxymodel.h b/src/models/abstractmediaproxymodel.h --- a/src/models/abstractmediaproxymodel.h +++ b/src/models/abstractmediaproxymodel.h @@ -21,12 +21,14 @@ #ifndef ABSTRACTMEDIAPROXYMODEL_H #define ABSTRACTMEDIAPROXYMODEL_H +#include "elisaLib_export.h" + #include #include #include #include -class AbstractMediaProxyModel : public QSortFilterProxyModel +class ELISALIB_EXPORT AbstractMediaProxyModel : public QSortFilterProxyModel { Q_OBJECT diff --git a/src/models/albummodel.h b/src/models/albummodel.h --- a/src/models/albummodel.h +++ b/src/models/albummodel.h @@ -20,6 +20,8 @@ #ifndef ALBUMMODEL_H #define ALBUMMODEL_H +#include "elisaLib_export.h" + #include #include #include @@ -34,7 +36,7 @@ class AlbumModelPrivate; class QMutex; -class AlbumModel : public QAbstractItemModel +class ELISALIB_EXPORT AlbumModel : public QAbstractItemModel { Q_OBJECT diff --git a/src/models/allalbumsmodel.h b/src/models/allalbumsmodel.h --- a/src/models/allalbumsmodel.h +++ b/src/models/allalbumsmodel.h @@ -20,6 +20,8 @@ #ifndef ALLALBUMSMODEL_H #define ALLALBUMSMODEL_H +#include "elisaLib_export.h" + #include #include #include @@ -33,7 +35,7 @@ class AllAlbumsModelPrivate; class AllArtistsModel; -class AllAlbumsModel : public QAbstractItemModel +class ELISALIB_EXPORT AllAlbumsModel : public QAbstractItemModel { Q_OBJECT diff --git a/src/models/allalbumsproxymodel.h b/src/models/allalbumsproxymodel.h --- a/src/models/allalbumsproxymodel.h +++ b/src/models/allalbumsproxymodel.h @@ -21,12 +21,14 @@ #ifndef ALLALBUMSPROXYMODEL_H #define ALLALBUMSPROXYMODEL_H +#include "elisaLib_export.h" + #include "abstractmediaproxymodel.h" #include "elisautils.h" class MusicAlbum; -class AllAlbumsProxyModel : public AbstractMediaProxyModel +class ELISALIB_EXPORT AllAlbumsProxyModel : public AbstractMediaProxyModel { Q_OBJECT diff --git a/src/models/allartistsmodel.h b/src/models/allartistsmodel.h --- a/src/models/allartistsmodel.h +++ b/src/models/allartistsmodel.h @@ -20,6 +20,8 @@ #ifndef ALLARTISTSMODEL_H #define ALLARTISTSMODEL_H +#include "elisaLib_export.h" + #include #include #include @@ -33,7 +35,7 @@ class AllArtistsModelPrivate; class AllAlbumsModel; -class AllArtistsModel : public QAbstractItemModel +class ELISALIB_EXPORT AllArtistsModel : public QAbstractItemModel { Q_OBJECT diff --git a/src/models/allartistsproxymodel.h b/src/models/allartistsproxymodel.h --- a/src/models/allartistsproxymodel.h +++ b/src/models/allartistsproxymodel.h @@ -21,10 +21,12 @@ #ifndef ALLARTISTSPROXYMODEL_H #define ALLARTISTSPROXYMODEL_H +#include "elisaLib_export.h" + #include "abstractmediaproxymodel.h" #include "elisautils.h" -class AllArtistsProxyModel : public AbstractMediaProxyModel +class ELISALIB_EXPORT AllArtistsProxyModel : public AbstractMediaProxyModel { Q_OBJECT diff --git a/src/models/alltracksmodel.h b/src/models/alltracksmodel.h --- a/src/models/alltracksmodel.h +++ b/src/models/alltracksmodel.h @@ -20,15 +20,17 @@ #ifndef ALLTRACKSMODEL_H #define ALLTRACKSMODEL_H +#include "elisaLib_export.h" + #include #include "musicaudiotrack.h" #include class AllTracksModelPrivate; -class AllTracksModel : public QAbstractItemModel +class ELISALIB_EXPORT AllTracksModel : public QAbstractItemModel { Q_OBJECT diff --git a/src/models/alltracksproxymodel.h b/src/models/alltracksproxymodel.h --- a/src/models/alltracksproxymodel.h +++ b/src/models/alltracksproxymodel.h @@ -21,11 +21,13 @@ #ifndef ALLTRACKSPROXYMODEL_H #define ALLTRACKSPROXYMODEL_H +#include "elisaLib_export.h" + #include "abstractmediaproxymodel.h" #include "musicaudiotrack.h" #include "elisautils.h" -class AllTracksProxyModel : public AbstractMediaProxyModel +class ELISALIB_EXPORT AllTracksProxyModel : public AbstractMediaProxyModel { Q_OBJECT diff --git a/src/models/singlealbumproxymodel.h b/src/models/singlealbumproxymodel.h --- a/src/models/singlealbumproxymodel.h +++ b/src/models/singlealbumproxymodel.h @@ -21,12 +21,14 @@ #ifndef SINGLEALBUMPROXYMODEL_H #define SINGLEALBUMPROXYMODEL_H +#include "elisaLib_export.h" + #include "abstractmediaproxymodel.h" #include "musicaudiotrack.h" #include "elisautils.h" #include "albummodel.h" -class SingleAlbumProxyModel : public AbstractMediaProxyModel +class ELISALIB_EXPORT SingleAlbumProxyModel : public AbstractMediaProxyModel { Q_OBJECT diff --git a/src/models/singleartistproxymodel.h b/src/models/singleartistproxymodel.h --- a/src/models/singleartistproxymodel.h +++ b/src/models/singleartistproxymodel.h @@ -21,12 +21,14 @@ #ifndef SINGLEARTISTPROXYMODEL_H #define SINGLEARTISTPROXYMODEL_H +#include "elisaLib_export.h" + #include "abstractmediaproxymodel.h" #include "elisautils.h" class MusicAlbum; -class SingleArtistProxyModel : public AbstractMediaProxyModel +class ELISALIB_EXPORT SingleArtistProxyModel : public AbstractMediaProxyModel { Q_OBJECT diff --git a/src/mpris2/mediaplayer2.h b/src/mpris2/mediaplayer2.h --- a/src/mpris2/mediaplayer2.h +++ b/src/mpris2/mediaplayer2.h @@ -22,11 +22,13 @@ #ifndef MEDIACENTER_MEDIAPLAYER2_H #define MEDIACENTER_MEDIAPLAYER2_H +#include "elisaLib_export.h" + #include #include -class MediaPlayer2 : public QDBusAbstractAdaptor +class ELISALIB_EXPORT MediaPlayer2 : public QDBusAbstractAdaptor { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "org.mpris.MediaPlayer2") // Docs: http://specifications.freedesktop.org/mpris-spec/latest/Media_Player.html diff --git a/src/mpris2/mediaplayer2player.h b/src/mpris2/mediaplayer2player.h --- a/src/mpris2/mediaplayer2player.h +++ b/src/mpris2/mediaplayer2player.h @@ -22,6 +22,8 @@ #ifndef MEDIAPLAYER2PLAYER_H #define MEDIAPLAYER2PLAYER_H +#include "elisaLib_export.h" + #include #include #include @@ -33,7 +35,7 @@ class ManageHeaderBar; class AudioWrapper; -class MediaPlayer2Player : public QDBusAbstractAdaptor +class ELISALIB_EXPORT MediaPlayer2Player : public QDBusAbstractAdaptor { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "org.mpris.MediaPlayer2.Player") // Docs: http://specifications.freedesktop.org/mpris-spec/latest/Player_Interface.html diff --git a/src/mpris2/mpris2.h b/src/mpris2/mpris2.h --- a/src/mpris2/mpris2.h +++ b/src/mpris2/mpris2.h @@ -22,6 +22,8 @@ #ifndef MEDIACENTER_MPRIS2_H #define MEDIACENTER_MPRIS2_H +#include "elisaLib_export.h" + #include #include #include @@ -36,7 +38,7 @@ class ManageHeaderBar; class AudioWrapper; -class Mpris2 : public QObject +class ELISALIB_EXPORT Mpris2 : public QObject { Q_OBJECT diff --git a/src/musicalbum.h b/src/musicalbum.h --- a/src/musicalbum.h +++ b/src/musicalbum.h @@ -20,6 +20,8 @@ #ifndef MUSICALBUM_H #define MUSICALBUM_H +#include "elisaLib_export.h" + #include "musicaudiotrack.h" #include @@ -33,7 +35,7 @@ class MusicAlbumPrivate; class QDebug; -class MusicAlbum +class ELISALIB_EXPORT MusicAlbum { public: diff --git a/src/musicartist.h b/src/musicartist.h --- a/src/musicartist.h +++ b/src/musicartist.h @@ -20,15 +20,17 @@ #ifndef MUSICARTIST_H #define MUSICARTIST_H +#include "elisaLib_export.h" + #include #include #include class MusicArtistPrivate; class QDebug; -class MusicArtist +class ELISALIB_EXPORT MusicArtist { public: diff --git a/src/musicaudiotrack.h b/src/musicaudiotrack.h --- a/src/musicaudiotrack.h +++ b/src/musicaudiotrack.h @@ -20,6 +20,8 @@ #ifndef MUSICAUDIOTRACK_H #define MUSICAUDIOTRACK_H +#include "elisaLib_export.h" + #include #include #include @@ -30,7 +32,7 @@ class MusicAudioTrackPrivate; class QDebug; -class MusicAudioTrack +class ELISALIB_EXPORT MusicAudioTrack { public: diff --git a/src/musiclistenersmanager.h b/src/musiclistenersmanager.h --- a/src/musiclistenersmanager.h +++ b/src/musiclistenersmanager.h @@ -20,6 +20,8 @@ #ifndef MUSICLISTENERSMANAGER_H #define MUSICLISTENERSMANAGER_H +#include "elisaLib_export.h" + #include "notificationitem.h" #include @@ -40,7 +42,7 @@ class QAbstractItemModel; class AbstractMediaProxyModel; -class MusicListenersManager : public QObject +class ELISALIB_EXPORT MusicListenersManager : public QObject { Q_OBJECT diff --git a/src/notificationitem.h b/src/notificationitem.h --- a/src/notificationitem.h +++ b/src/notificationitem.h @@ -20,14 +20,16 @@ #ifndef NOTIFICATIONITEM_H #define NOTIFICATIONITEM_H +#include "elisaLib_export.h" + #include #include class NotificationItemPrivate; class QObject; -class NotificationItem +class ELISALIB_EXPORT NotificationItem { public: diff --git a/src/plugins.qmltypes b/src/plugins.qmltypes new file mode 100644 --- /dev/null +++ b/src/plugins.qmltypes @@ -0,0 +1,1021 @@ +import QtQuick.tooling 1.2 + +// This file describes the plugin-supplied types contained in the library. +// It is used for QML tooling purposes only. +// +// This file was auto-generated by: +// 'qmlplugindump -nonrelocatable org.kde.elisa 1.0 .' + +Module { + dependencies: ["QtQuick 2.8"] + Component { + name: "AbstractMediaProxyModel" + prototype: "QSortFilterProxyModel" + Property { name: "filterText"; type: "string" } + Property { name: "filterRating"; type: "int" } + Signal { + name: "filterTextChanged" + Parameter { name: "filterText"; type: "string" } + } + Signal { + name: "filterRatingChanged" + Parameter { name: "filterRating"; type: "int" } + } + Method { + name: "setFilterText" + Parameter { name: "filterText"; type: "string" } + } + Method { + name: "setFilterRating" + Parameter { name: "filterRating"; type: "int" } + } + } + Component { + name: "AllAlbumsProxyModel" + prototype: "AbstractMediaProxyModel" + exports: ["org.kde.elisa/AllAlbumsProxyModel 1.0"] + exportMetaObjectRevisions: [0] + Signal { + name: "albumToEnqueue" + Parameter { name: "newAlbums"; type: "QList" } + Parameter { name: "enqueueMode"; type: "ElisaUtils::PlayListEnqueueMode" } + Parameter { name: "triggerPlay"; type: "ElisaUtils::PlayListEnqueueTriggerPlay" } + } + Method { name: "enqueueToPlayList" } + Method { name: "replaceAndPlayOfPlayList" } + } + Component { + name: "AllArtistsProxyModel" + prototype: "AbstractMediaProxyModel" + exports: ["org.kde.elisa/AllArtistsProxyModel 1.0"] + exportMetaObjectRevisions: [0] + Signal { + name: "artistToEnqueue" + Parameter { name: "artistNames"; type: "QList" } + Parameter { name: "enqueueMode"; type: "ElisaUtils::PlayListEnqueueMode" } + Parameter { name: "triggerPlay"; type: "ElisaUtils::PlayListEnqueueTriggerPlay" } + } + Method { name: "enqueueToPlayList" } + Method { name: "replaceAndPlayOfPlayList" } + } + Component { + name: "AllTracksProxyModel" + prototype: "AbstractMediaProxyModel" + exports: ["org.kde.elisa/AllTracksProxyModel 1.0"] + exportMetaObjectRevisions: [0] + Signal { + name: "trackToEnqueue" + Parameter { name: "newTracks"; type: "QList" } + Parameter { name: "enqueueMode"; type: "ElisaUtils::PlayListEnqueueMode" } + Parameter { name: "triggerPlay"; type: "ElisaUtils::PlayListEnqueueTriggerPlay" } + } + Method { name: "enqueueToPlayList" } + Method { name: "replaceAndPlayOfPlayList" } + } + Component { + name: "AudioWrapper" + prototype: "QObject" + exports: ["org.kde.elisa/AudioWrapper 1.0"] + exportMetaObjectRevisions: [0] + Property { name: "muted"; type: "bool" } + Property { name: "volume"; type: "double" } + Property { name: "source"; type: "QUrl" } + Property { name: "status"; type: "QMediaPlayer::MediaStatus"; isReadonly: true } + Property { name: "playbackState"; type: "QMediaPlayer::State"; isReadonly: true } + Property { name: "error"; type: "QMediaPlayer::Error"; isReadonly: true } + Property { name: "duration"; type: "qlonglong"; isReadonly: true } + Property { name: "position"; type: "qlonglong" } + Property { name: "seekable"; type: "bool"; isReadonly: true } + Property { name: "audioRole"; type: "QAudio::Role" } + Signal { name: "playing" } + Signal { name: "paused" } + Signal { name: "stopped" } + Method { + name: "setMuted" + Parameter { name: "muted"; type: "bool" } + } + Method { + name: "setVolume" + Parameter { name: "volume"; type: "double" } + } + Method { + name: "setSource" + Parameter { name: "source"; type: "QUrl" } + } + Method { + name: "setPosition" + Parameter { name: "position"; type: "qlonglong" } + } + Method { name: "play" } + Method { name: "pause" } + Method { name: "stop" } + Method { + name: "seek" + Parameter { name: "position"; type: "int" } + } + Method { + name: "setAudioRole" + Parameter { name: "audioRole"; type: "QAudio::Role" } + } + } + Component { + name: "ElisaApplication" + prototype: "QObject" + exports: ["org.kde.elisa/ElisaApplication 1.0"] + isCreatable: false + exportMetaObjectRevisions: [0] + Property { name: "arguments"; type: "QStringList" } + Property { + name: "musicManager" + type: "MusicListenersManager" + isReadonly: true + isPointer: true + } + Property { + name: "allAlbumsProxyModel" + type: "AllAlbumsProxyModel" + isReadonly: true + isPointer: true + } + Property { + name: "allArtistsProxyModel" + type: "AllArtistsProxyModel" + isReadonly: true + isPointer: true + } + Property { + name: "allTracksProxyModel" + type: "AllTracksProxyModel" + isReadonly: true + isPointer: true + } + Property { + name: "singleArtistProxyModel" + type: "SingleArtistProxyModel" + isReadonly: true + isPointer: true + } + Property { + name: "singleAlbumProxyModel" + type: "SingleAlbumProxyModel" + isReadonly: true + isPointer: true + } + Property { name: "mediaPlayList"; type: "MediaPlayList"; isReadonly: true; isPointer: true } + Property { name: "audioPlayer"; type: "AudioWrapper"; isReadonly: true; isPointer: true } + Signal { + name: "enqueue" + Parameter { name: "files"; type: "QStringList" } + } + Method { name: "appHelpActivated" } + Method { name: "aboutApplication" } + Method { name: "reportBug" } + Method { name: "configureShortcuts" } + Method { name: "configureElisa" } + Method { + name: "setArguments" + Parameter { name: "newArguments"; type: "QStringList" } + } + Method { + name: "activateActionRequested" + Parameter { name: "actionName"; type: "string" } + Parameter { name: "parameter"; type: "QVariant" } + } + Method { + name: "activateRequested" + Parameter { name: "arguments"; type: "QStringList" } + Parameter { name: "workingDirectory"; type: "string" } + } + Method { + name: "openRequested" + Parameter { name: "uris"; type: "QList" } + } + Method { name: "initialize" } + Method { + name: "action" + type: "QAction*" + Parameter { name: "name"; type: "string" } + } + Method { + name: "iconName" + type: "string" + Parameter { name: "icon"; type: "QIcon" } + } + } + Component { + name: "ManageAudioPlayer" + prototype: "QObject" + exports: ["org.kde.elisa/ManageAudioPlayer 1.0"] + exportMetaObjectRevisions: [0] + Enum { + name: "PlayerPlaybackState" + values: { + "PlayingState": 1, + "PausedState": 2, + "StoppedState": 0 + } + } + Property { name: "currentTrack"; type: "QPersistentModelIndex" } + Property { name: "playListModel"; type: "QAbstractItemModel"; isPointer: true } + Property { name: "playerSource"; type: "QUrl"; isReadonly: true } + Property { name: "titleRole"; type: "int" } + Property { name: "artistNameRole"; type: "int" } + Property { name: "albumNameRole"; type: "int" } + Property { name: "urlRole"; type: "int" } + Property { name: "isPlayingRole"; type: "int" } + Property { name: "playerStatus"; type: "QMediaPlayer::MediaStatus" } + Property { name: "playerPlaybackState"; type: "int" } + Property { name: "playerError"; type: "QMediaPlayer::Error" } + Property { name: "audioDuration"; type: "int" } + Property { name: "playerIsSeekable"; type: "bool" } + Property { name: "playerPosition"; type: "int" } + Property { name: "playControlPosition"; type: "int" } + Property { name: "persistentState"; type: "QVariantMap" } + Signal { name: "playerPlay" } + Signal { name: "playerPause" } + Signal { name: "playerStop" } + Signal { name: "skipNextTrack" } + Signal { + name: "seek" + Parameter { name: "position"; type: "int" } + } + Signal { + name: "sourceInError" + Parameter { name: "source"; type: "QUrl" } + Parameter { name: "playerError"; type: "QMediaPlayer::Error" } + } + Signal { + name: "displayTrackError" + Parameter { name: "fileName"; type: "string" } + } + Method { + name: "setCurrentTrack" + Parameter { name: "currentTrack"; type: "QPersistentModelIndex" } + } + Method { + name: "setPlayListModel" + Parameter { name: "aPlayListModel"; type: "QAbstractItemModel"; isPointer: true } + } + Method { + name: "setUrlRole" + Parameter { name: "value"; type: "int" } + } + Method { + name: "setIsPlayingRole" + Parameter { name: "value"; type: "int" } + } + Method { + name: "setPlayerStatus" + Parameter { name: "playerStatus"; type: "QMediaPlayer::MediaStatus" } + } + Method { + name: "setPlayerPlaybackState" + Parameter { name: "playerPlaybackState"; type: "int" } + } + Method { + name: "setPlayerError" + Parameter { name: "playerError"; type: "QMediaPlayer::Error" } + } + Method { name: "ensurePause" } + Method { name: "ensurePlay" } + Method { name: "playPause" } + Method { + name: "setAudioDuration" + Parameter { name: "audioDuration"; type: "int" } + } + Method { + name: "setPlayerIsSeekable" + Parameter { name: "playerIsSeekable"; type: "bool" } + } + Method { + name: "setPlayerPosition" + Parameter { name: "playerPosition"; type: "int" } + } + Method { + name: "setPlayControlPosition" + Parameter { name: "playerPosition"; type: "int" } + } + Method { + name: "setPersistentState" + Parameter { name: "persistentStateValue"; type: "QVariantMap" } + } + Method { + name: "playerSeek" + Parameter { name: "position"; type: "int" } + } + Method { name: "playListFinished" } + Method { + name: "tracksDataChanged" + Parameter { name: "topLeft"; type: "QModelIndex" } + Parameter { name: "bottomRight"; type: "QModelIndex" } + Parameter { name: "roles"; type: "QVector" } + } + Method { + name: "setTitleRole" + Parameter { name: "titleRole"; type: "int" } + } + Method { + name: "setArtistNameRole" + Parameter { name: "artistNameRole"; type: "int" } + } + Method { + name: "setAlbumNameRole" + Parameter { name: "albumNameRole"; type: "int" } + } + } + Component { + name: "ManageHeaderBar" + prototype: "QObject" + exports: ["org.kde.elisa/ManageHeaderBar 1.0"] + exportMetaObjectRevisions: [0] + Property { name: "currentTrack"; type: "QPersistentModelIndex" } + Property { name: "playListModel"; type: "QAbstractItemModel"; isPointer: true } + Property { name: "artistRole"; type: "int" } + Property { name: "titleRole"; type: "int" } + Property { name: "albumRole"; type: "int" } + Property { name: "imageRole"; type: "int" } + Property { name: "isValidRole"; type: "int" } + Property { name: "artist"; type: "QVariant"; isReadonly: true } + Property { name: "title"; type: "QVariant"; isReadonly: true } + Property { name: "album"; type: "QVariant"; isReadonly: true } + Property { name: "image"; type: "QUrl"; isReadonly: true } + Property { name: "isValid"; type: "bool"; isReadonly: true } + Property { name: "remainingTracks"; type: "int"; isReadonly: true } + Method { + name: "setCurrentTrack" + Parameter { name: "currentTrack"; type: "QPersistentModelIndex" } + } + Method { + name: "setPlayListModel" + Parameter { name: "aPlayListModel"; type: "QAbstractItemModel"; isPointer: true } + } + Method { + name: "setArtistRole" + Parameter { name: "value"; type: "int" } + } + Method { + name: "setTitleRole" + Parameter { name: "value"; type: "int" } + } + Method { + name: "setAlbumRole" + Parameter { name: "value"; type: "int" } + } + Method { + name: "setImageRole" + Parameter { name: "value"; type: "int" } + } + Method { + name: "setIsValidRole" + Parameter { name: "isValidRole"; type: "int" } + } + Method { + name: "playListLayoutChanged" + Parameter { name: "parents"; type: "QList" } + Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" } + } + Method { + name: "tracksInserted" + Parameter { name: "parent"; type: "QModelIndex" } + Parameter { name: "first"; type: "int" } + Parameter { name: "last"; type: "int" } + } + Method { + name: "tracksDataChanged" + Parameter { name: "topLeft"; type: "QModelIndex" } + Parameter { name: "bottomRight"; type: "QModelIndex" } + Parameter { name: "roles"; type: "QVector" } + } + Method { + name: "tracksAboutToBeMoved" + Parameter { name: "parent"; type: "QModelIndex" } + Parameter { name: "start"; type: "int" } + Parameter { name: "end"; type: "int" } + Parameter { name: "destination"; type: "QModelIndex" } + Parameter { name: "row"; type: "int" } + } + Method { + name: "tracksMoved" + Parameter { name: "parent"; type: "QModelIndex" } + Parameter { name: "start"; type: "int" } + Parameter { name: "end"; type: "int" } + Parameter { name: "destination"; type: "QModelIndex" } + Parameter { name: "row"; type: "int" } + } + Method { + name: "tracksRemoved" + Parameter { name: "parent"; type: "QModelIndex" } + Parameter { name: "first"; type: "int" } + Parameter { name: "last"; type: "int" } + } + } + Component { + name: "ManageMediaPlayerControl" + prototype: "QObject" + exports: ["org.kde.elisa/ManageMediaPlayerControl 1.0"] + exportMetaObjectRevisions: [0] + Enum { + name: "PlayerState" + values: { + "Playing": 0, + "Paused": 1, + "Stopped": 2 + } + } + Property { name: "playControlEnabled"; type: "bool"; isReadonly: true } + Property { name: "skipBackwardControlEnabled"; type: "bool"; isReadonly: true } + Property { name: "skipForwardControlEnabled"; type: "bool"; isReadonly: true } + Property { name: "musicPlaying"; type: "bool"; isReadonly: true } + Property { name: "playListModel"; type: "QAbstractItemModel"; isPointer: true } + Property { name: "currentTrack"; type: "QPersistentModelIndex" } + Property { name: "randomOrContinuePlay"; type: "bool" } + Method { + name: "setPlayListModel" + Parameter { name: "aPlayListModel"; type: "QAbstractItemModel"; isPointer: true } + } + Method { name: "playerPaused" } + Method { name: "playerPlaying" } + Method { name: "playerStopped" } + Method { + name: "setCurrentTrack" + Parameter { name: "currentTrack"; type: "QPersistentModelIndex" } + } + Method { + name: "setRandomOrContinuePlay" + Parameter { name: "randomOrContinuePlay"; type: "bool" } + } + } + Component { + name: "MediaPlayList" + prototype: "QAbstractListModel" + exports: ["org.kde.elisa/MediaPlayList 1.0"] + exportMetaObjectRevisions: [0] + Enum { + name: "ColumnsRoles" + values: { + "IsValidRole": 257, + "TitleRole": 258, + "DurationRole": 259, + "MilliSecondsDurationRole": 260, + "TrackDataRole": 261, + "ArtistRole": 262, + "AlbumArtistRole": 263, + "AlbumRole": 264, + "TrackNumberRole": 265, + "DiscNumberRole": 266, + "RatingRole": 267, + "GenreRole": 268, + "LyricistRole": 269, + "ComposerRole": 270, + "CommentRole": 271, + "YearRole": 272, + "ChannelsRole": 273, + "BitRateRole": 274, + "SampleRateRole": 275, + "ImageRole": 276, + "ResourceRole": 277, + "CountRole": 278, + "IsPlayingRole": 279, + "HasAlbumHeader": 280, + "IsSingleDiscAlbumHeader": 281, + "SecondaryTextRole": 282, + "ImageUrlRole": 283, + "ShadowForImageRole": 284 + } + } + Enum { + name: "PlayState" + values: { + "NotPlaying": 0, + "IsPlaying": 1, + "IsPaused": 2 + } + } + Property { name: "persistentState"; type: "QVariantMap" } + Property { name: "musicListenersManager"; type: "MusicListenersManager"; isPointer: true } + Property { name: "tracksCount"; type: "int"; isReadonly: true } + Property { name: "currentTrack"; type: "QPersistentModelIndex"; isReadonly: true } + Property { name: "currentTrackRow"; type: "int"; isReadonly: true } + Property { name: "randomPlay"; type: "bool" } + Property { name: "repeatPlay"; type: "bool" } + Signal { + name: "newTrackByNameInList" + Parameter { name: "title"; type: "string" } + Parameter { name: "artist"; type: "string" } + Parameter { name: "album"; type: "string" } + Parameter { name: "trackNumber"; type: "int" } + Parameter { name: "discNumber"; type: "int" } + } + Signal { + name: "newTrackByFileNameInList" + Parameter { name: "fileName"; type: "QUrl" } + } + Signal { + name: "newTrackByIdInList" + Parameter { name: "newTrackId"; type: "qulonglong" } + } + Signal { + name: "newArtistInList" + Parameter { name: "artist"; type: "string" } + } + Signal { + name: "trackHasBeenAdded" + Parameter { name: "title"; type: "string" } + Parameter { name: "image"; type: "QUrl" } + } + Signal { name: "playListFinished" } + Signal { name: "playListLoaded" } + Signal { name: "playListLoadFailed" } + Signal { name: "ensurePlay" } + Method { + name: "setPersistentState" + Parameter { name: "persistentState"; type: "QVariantMap" } + } + Method { + name: "removeSelection" + Parameter { name: "selection"; type: "QList" } + } + Method { + name: "albumAdded" + Parameter { name: "tracks"; type: "QList" } + } + Method { + name: "trackChanged" + Parameter { name: "track"; type: "MusicAudioTrack" } + } + Method { + name: "trackRemoved" + Parameter { name: "trackId"; type: "qulonglong" } + } + Method { + name: "setMusicListenersManager" + Parameter { name: "musicListenersManager"; type: "MusicListenersManager"; isPointer: true } + } + Method { + name: "setRandomPlay" + Parameter { name: "value"; type: "bool" } + } + Method { + name: "setRepeatPlay" + Parameter { name: "value"; type: "bool" } + } + Method { name: "skipNextTrack" } + Method { name: "skipPreviousTrack" } + Method { + name: "seedRandomGenerator" + Parameter { name: "seed"; type: "uint" } + } + Method { + name: "switchTo" + Parameter { name: "row"; type: "int" } + } + Method { + name: "loadPlaylist" + Parameter { name: "fileName"; type: "QUrl" } + } + Method { + name: "enqueue" + Parameter { name: "newTrackId"; type: "qulonglong" } + } + Method { + name: "enqueue" + Parameter { name: "newTrack"; type: "MusicAudioTrack" } + } + Method { + name: "enqueue" + Parameter { name: "newEntry"; type: "MediaPlayListEntry" } + Parameter { name: "audioTrack"; type: "MusicAudioTrack" } + } + Method { + name: "enqueue" + Parameter { name: "newEntry"; type: "MediaPlayListEntry" } + } + Method { + name: "enqueue" + Parameter { name: "album"; type: "MusicAlbum" } + } + Method { + name: "enqueue" + Parameter { name: "artist"; type: "MusicArtist" } + } + Method { + name: "enqueue" + Parameter { name: "artistName"; type: "string" } + } + Method { + name: "enqueue" + Parameter { name: "fileName"; type: "QUrl" } + } + Method { + name: "enqueue" + Parameter { name: "files"; type: "QStringList" } + } + Method { + name: "enqueue" + Parameter { name: "newTrackId"; type: "QList" } + } + Method { + name: "enqueue" + Parameter { name: "albums"; type: "QList" } + Parameter { name: "enqueueMode"; type: "ElisaUtils::PlayListEnqueueMode" } + Parameter { name: "triggerPlay"; type: "ElisaUtils::PlayListEnqueueTriggerPlay" } + } + Method { + name: "enqueue" + Parameter { name: "tracks"; type: "QList" } + Parameter { name: "enqueueMode"; type: "ElisaUtils::PlayListEnqueueMode" } + Parameter { name: "triggerPlay"; type: "ElisaUtils::PlayListEnqueueTriggerPlay" } + } + Method { + name: "enqueueArtists" + Parameter { name: "artistName"; type: "QList" } + Parameter { name: "enqueueMode"; type: "ElisaUtils::PlayListEnqueueMode" } + Parameter { name: "triggerPlay"; type: "ElisaUtils::PlayListEnqueueTriggerPlay" } + } + Method { + name: "enqueueAndPlay" + Parameter { name: "files"; type: "QStringList" } + } + Method { + name: "replaceAndPlay" + Parameter { name: "newTrackId"; type: "qulonglong" } + } + Method { + name: "replaceAndPlay" + Parameter { name: "newTrack"; type: "MusicAudioTrack" } + } + Method { + name: "replaceAndPlay" + Parameter { name: "album"; type: "MusicAlbum" } + } + Method { + name: "replaceAndPlay" + Parameter { name: "artist"; type: "MusicArtist" } + } + Method { + name: "replaceAndPlay" + Parameter { name: "artistName"; type: "string" } + } + Method { + name: "replaceAndPlay" + Parameter { name: "fileName"; type: "QUrl" } + } + Method { + name: "trackInError" + Parameter { name: "sourceInError"; type: "QUrl" } + Parameter { name: "playerError"; type: "QMediaPlayer::Error" } + } + Method { + name: "removeRows" + type: "bool" + Parameter { name: "row"; type: "int" } + Parameter { name: "count"; type: "int" } + Parameter { name: "parent"; type: "QModelIndex" } + } + Method { + name: "removeRows" + type: "bool" + Parameter { name: "row"; type: "int" } + Parameter { name: "count"; type: "int" } + } + Method { + name: "moveRows" + type: "bool" + Parameter { name: "sourceParent"; type: "QModelIndex" } + Parameter { name: "sourceRow"; type: "int" } + Parameter { name: "count"; type: "int" } + Parameter { name: "destinationParent"; type: "QModelIndex" } + Parameter { name: "destinationChild"; type: "int" } + } + Method { + name: "move" + Parameter { name: "from"; type: "int" } + Parameter { name: "to"; type: "int" } + Parameter { name: "n"; type: "int" } + } + Method { name: "clearPlayList" } + Method { + name: "savePlaylist" + type: "bool" + Parameter { name: "fileName"; type: "QUrl" } + } + } + Component { + name: "Mpris2" + prototype: "QObject" + exports: ["org.kde.elisa/Mpris2 1.0"] + exportMetaObjectRevisions: [0] + Property { name: "playerName"; type: "string" } + Property { name: "playListModel"; type: "QAbstractItemModel"; isPointer: true } + Property { name: "playListControler"; type: "MediaPlayList"; isPointer: true } + Property { name: "audioPlayerManager"; type: "ManageAudioPlayer"; isPointer: true } + Property { name: "manageMediaPlayerControl"; type: "ManageMediaPlayerControl"; isPointer: true } + Property { name: "headerBarManager"; type: "ManageHeaderBar"; isPointer: true } + Property { name: "audioPlayer"; type: "AudioWrapper"; isPointer: true } + Signal { name: "raisePlayer" } + Method { + name: "setPlayerName" + Parameter { name: "playerName"; type: "string" } + } + Method { + name: "setPlayListModel" + Parameter { name: "playListModel"; type: "QAbstractItemModel"; isPointer: true } + } + Method { + name: "setPlayListControler" + Parameter { name: "playListControler"; type: "MediaPlayList"; isPointer: true } + } + Method { + name: "setAudioPlayerManager" + Parameter { name: "audioPlayerManager"; type: "ManageAudioPlayer"; isPointer: true } + } + Method { + name: "setManageMediaPlayerControl" + Parameter { name: "manageMediaPlayerControl"; type: "ManageMediaPlayerControl"; isPointer: true } + } + Method { + name: "setHeaderBarManager" + Parameter { name: "headerBarManager"; type: "ManageHeaderBar"; isPointer: true } + } + Method { + name: "setAudioPlayer" + Parameter { name: "audioPlayer"; type: "AudioWrapper"; isPointer: true } + } + } + Component { + name: "MusicListenersManager" + prototype: "QObject" + exports: ["org.kde.elisa/MusicListenersManager 1.0"] + exportMetaObjectRevisions: [0] + Property { name: "viewDatabase"; type: "DatabaseInterface"; isReadonly: true; isPointer: true } + Property { name: "importedTracksCount"; type: "int"; isReadonly: true } + Property { name: "indexingRunning"; type: "bool"; isReadonly: true } + Property { name: "elisaApplication"; type: "ElisaApplication"; isPointer: true } + Property { name: "allAlbumsModel"; type: "QAbstractItemModel"; isReadonly: true; isPointer: true } + Property { + name: "allArtistsModel" + type: "QAbstractItemModel" + isReadonly: true + isPointer: true + } + Property { name: "allTracksModel"; type: "QAbstractItemModel"; isReadonly: true; isPointer: true } + Property { name: "albumModel"; type: "QAbstractItemModel"; isReadonly: true; isPointer: true } + Property { name: "indexerBusy"; type: "bool"; isReadonly: true } + Signal { + name: "artistAdded" + Parameter { name: "newArtist"; type: "MusicArtist" } + } + Signal { + name: "trackAdded" + Parameter { name: "id"; type: "qulonglong" } + } + Signal { + name: "tracksAdded" + Parameter { name: "allTracks"; type: "QList" } + } + Signal { + name: "artistRemoved" + Parameter { name: "removedArtist"; type: "MusicArtist" } + } + Signal { + name: "albumRemoved" + Parameter { name: "removedAlbum"; type: "MusicAlbum" } + Parameter { name: "removedAlbumId"; type: "qulonglong" } + } + Signal { + name: "trackRemoved" + Parameter { name: "id"; type: "qulonglong" } + } + Signal { + name: "artistModified" + Parameter { name: "modifiedArtist"; type: "MusicArtist" } + } + Signal { + name: "albumModified" + Parameter { name: "modifiedAlbum"; type: "MusicAlbum" } + Parameter { name: "modifiedAlbumId"; type: "qulonglong" } + } + Signal { + name: "trackModified" + Parameter { name: "modifiedTrack"; type: "MusicAudioTrack" } + } + Signal { name: "applicationIsTerminating" } + Signal { + name: "newNotification" + Parameter { name: "notification"; type: "NotificationItem" } + } + Signal { + name: "closeNotification" + Parameter { name: "notificationId"; type: "string" } + } + Signal { + name: "removeTracksInError" + Parameter { name: "tracks"; type: "QList" } + } + Signal { + name: "displayTrackError" + Parameter { name: "fileName"; type: "string" } + } + Method { name: "databaseReady" } + Method { name: "applicationAboutToQuit" } + Method { name: "showConfiguration" } + Method { name: "resetImportedTracksCounter" } + Method { + name: "setElisaApplication" + Parameter { name: "elisaApplication"; type: "ElisaApplication"; isPointer: true } + } + Method { + name: "playBackError" + Parameter { name: "sourceInError"; type: "QUrl" } + Parameter { name: "playerError"; type: "QMediaPlayer::Error" } + } + } + Component { + name: "ProgressIndicator" + prototype: "QObject" + exports: ["org.kde.elisa/ProgressIndicator 1.0"] + exportMetaObjectRevisions: [0] + Property { name: "position"; type: "int" } + Property { name: "progressDuration"; type: "string"; isReadonly: true } + Method { + name: "setPosition" + Parameter { name: "position"; type: "int" } + } + } + Component { + name: "QAbstractProxyModel" + prototype: "QAbstractItemModel" + Property { name: "sourceModel"; type: "QAbstractItemModel"; isPointer: true } + Method { + name: "mapToSource" + type: "QModelIndex" + Parameter { name: "proxyIndex"; type: "QModelIndex" } + } + Method { + name: "mapFromSource" + type: "QModelIndex" + Parameter { name: "sourceIndex"; type: "QModelIndex" } + } + Method { + name: "mapSelectionToSource" + type: "QItemSelection" + Parameter { name: "selection"; type: "QItemSelection" } + } + Method { + name: "mapSelectionFromSource" + type: "QItemSelection" + Parameter { name: "selection"; type: "QItemSelection" } + } + } + Component { + name: "QSortFilterProxyModel" + prototype: "QAbstractProxyModel" + Property { name: "filterRegExp"; type: "QRegExp" } + Property { name: "filterKeyColumn"; type: "int" } + Property { name: "dynamicSortFilter"; type: "bool" } + Property { name: "filterCaseSensitivity"; type: "Qt::CaseSensitivity" } + Property { name: "sortCaseSensitivity"; type: "Qt::CaseSensitivity" } + Property { name: "isSortLocaleAware"; type: "bool" } + Property { name: "sortRole"; type: "int" } + Property { name: "filterRole"; type: "int" } + Method { + name: "setFilterRegExp" + Parameter { name: "pattern"; type: "string" } + } + Method { + name: "setFilterWildcard" + Parameter { name: "pattern"; type: "string" } + } + Method { + name: "setFilterFixedString" + Parameter { name: "pattern"; type: "string" } + } + Method { name: "clear" } + Method { name: "invalidate" } + } + Component { + name: "SingleAlbumProxyModel" + prototype: "AbstractMediaProxyModel" + exports: ["org.kde.elisa/SingleAlbumProxyModel 1.0"] + exportMetaObjectRevisions: [0] + Signal { + name: "trackToEnqueue" + Parameter { name: "newTracks"; type: "QList" } + Parameter { name: "enqueueMode"; type: "ElisaUtils::PlayListEnqueueMode" } + Parameter { name: "triggerPlay"; type: "ElisaUtils::PlayListEnqueueTriggerPlay" } + } + Method { name: "enqueueToPlayList" } + Method { name: "replaceAndPlayOfPlayList" } + Method { + name: "loadAlbumData" + Parameter { name: "databaseId"; type: "qulonglong" } + } + } + Component { + name: "SingleArtistProxyModel" + prototype: "AbstractMediaProxyModel" + exports: ["org.kde.elisa/SingleArtistProxyModel 1.0"] + exportMetaObjectRevisions: [0] + Property { name: "artistFilter"; type: "string" } + Signal { + name: "albumToEnqueue" + Parameter { name: "newAlbums"; type: "QList" } + Parameter { name: "enqueueMode"; type: "ElisaUtils::PlayListEnqueueMode" } + Parameter { name: "triggerPlay"; type: "ElisaUtils::PlayListEnqueueTriggerPlay" } + } + Signal { + name: "artistFilterTextChanged" + Parameter { name: "filterText"; type: "string" } + } + Method { name: "enqueueToPlayList" } + Method { name: "replaceAndPlayOfPlayList" } + Method { + name: "setArtistFilterText" + Parameter { name: "filterText"; type: "string" } + } + } + Component { + name: "TopNotificationManager" + prototype: "QAbstractListModel" + exports: ["org.kde.elisa/TopNotificationManager 1.0"] + exportMetaObjectRevisions: [0] + Enum { + name: "ColumnsRoles" + values: { + "MessageRole": 257, + "MainButtonTextRole": 258, + "MainButtonIconNameRole": 259, + "SecondaryButtonTextRole": 260, + "SecondaryButtonIconNameRole": 261 + } + } + Property { name: "countNotifications"; type: "int"; isReadonly: true } + Property { name: "notificationMessage"; type: "string"; isReadonly: true } + Property { name: "notificationMainButtonText"; type: "string"; isReadonly: true } + Property { name: "notificationMainButtonIconName"; type: "string"; isReadonly: true } + Property { name: "notificationSecondaryButtonText"; type: "string"; isReadonly: true } + Property { name: "notificationSecondaryButtonIconName"; type: "string"; isReadonly: true } + Method { + name: "addNotification" + Parameter { name: "notification"; type: "NotificationItem" } + } + Method { + name: "closeNotification" + Parameter { name: "index"; type: "int" } + } + Method { + name: "closeNotificationById" + Parameter { name: "notificationId"; type: "string" } + } + Method { + name: "triggerMainButton" + Parameter { name: "index"; type: "int" } + } + Method { + name: "triggerSecondaryButton" + Parameter { name: "index"; type: "int" } + } + } + Component { + name: "TrackDataHelper" + prototype: "QObject" + exports: ["org.kde.elisa/TrackDataHelper 1.0"] + exportMetaObjectRevisions: [0] + Property { name: "trackData"; type: "MusicAudioTrack" } + Property { name: "title"; type: "string"; isReadonly: true } + Property { name: "artist"; type: "string"; isReadonly: true } + Property { name: "albumName"; type: "string"; isReadonly: true } + Property { name: "albumArtist"; type: "string"; isReadonly: true } + Property { name: "genre"; type: "string"; isReadonly: true } + Property { name: "composer"; type: "string"; isReadonly: true } + Property { name: "lyricist"; type: "string"; isReadonly: true } + Property { name: "comment"; type: "string"; isReadonly: true } + Property { name: "year"; type: "string"; isReadonly: true } + Property { name: "trackNumber"; type: "string"; isReadonly: true } + Property { name: "discNumber"; type: "string"; isReadonly: true } + Property { name: "channels"; type: "string"; isReadonly: true } + Property { name: "bitRate"; type: "string"; isReadonly: true } + Property { name: "sampleRate"; type: "string"; isReadonly: true } + Property { name: "resourceURI"; type: "string"; isReadonly: true } + Property { name: "duration"; type: "string"; isReadonly: true } + Property { name: "rating"; type: "int"; isReadonly: true } + Property { name: "albumCover"; type: "QUrl"; isReadonly: true } + Property { name: "databaseId"; type: "qulonglong"; isReadonly: true } + Method { name: "hasValidTitle"; type: "bool" } + Method { name: "hasValidArtist"; type: "bool" } + Method { name: "hasValidAlbumName"; type: "bool" } + Method { name: "hasValidAlbumArtist"; type: "bool" } + Method { name: "hasValidGenre"; type: "bool" } + Method { name: "hasValidComposer"; type: "bool" } + Method { name: "hasValidLyricist"; type: "bool" } + Method { name: "hasValidComment"; type: "bool" } + Method { name: "hasValidTrackNumber"; type: "bool" } + Method { name: "hasValidDiscNumber"; type: "bool" } + Method { name: "hasValidChannels"; type: "bool" } + Method { name: "hasValidRating"; type: "bool" } + Method { name: "hasValidBitRate"; type: "bool" } + Method { name: "hasValidSampleRate"; type: "bool" } + Method { name: "hasValidYear"; type: "bool" } + Method { name: "hasValidAlbumCover"; type: "bool" } + } +} diff --git a/src/progressindicator.h b/src/progressindicator.h --- a/src/progressindicator.h +++ b/src/progressindicator.h @@ -20,9 +20,11 @@ #ifndef PROGRESSINDICATOR_H #define PROGRESSINDICATOR_H +#include "elisaLib_export.h" + #include -class ProgressIndicator : public QObject +class ELISALIB_EXPORT ProgressIndicator : public QObject { Q_OBJECT diff --git a/src/qml/ElisaMainWindow.qml b/src/qml/ElisaMainWindow.qml --- a/src/qml/ElisaMainWindow.qml +++ b/src/qml/ElisaMainWindow.qml @@ -367,7 +367,6 @@ elisa.audioPlayer.volume = Qt.binding(function() { return headerBar.playerControl.volume }) elisa.audioPlayer.source = Qt.binding(function() { return manageAudioPlayer.playerSource }) - elisa.mediaPlayList.enqueue(elisa.arguments) volume: headerBar.playerControl.volume } } diff --git a/src/qmldir b/src/qmldir new file mode 100644 --- /dev/null +++ b/src/qmldir @@ -0,0 +1,4 @@ +module org.kde.elisa +plugin elisaqmlplugin +typeinfo plugins.qmltypes + diff --git a/src/topnotificationmanager.h b/src/topnotificationmanager.h --- a/src/topnotificationmanager.h +++ b/src/topnotificationmanager.h @@ -20,6 +20,8 @@ #ifndef TOPNOTIFICATIONMANAGER_H #define TOPNOTIFICATIONMANAGER_H +#include "elisaLib_export.h" + #include "notificationitem.h" #include @@ -29,7 +31,7 @@ class TopNotificationManagerPrivate; -class TopNotificationManager : public QAbstractListModel +class ELISALIB_EXPORT TopNotificationManager : public QAbstractListModel { Q_OBJECT diff --git a/src/trackdatahelper.h b/src/trackdatahelper.h --- a/src/trackdatahelper.h +++ b/src/trackdatahelper.h @@ -21,10 +21,12 @@ #ifndef TRACKDATAHELPER_H #define TRACKDATAHELPER_H +#include "elisaLib_export.h" + #include #include "musicaudiotrack.h" -class TrackDataHelper : public QObject, public MusicAudioTrack +class ELISALIB_EXPORT TrackDataHelper : public QObject, public MusicAudioTrack { Q_OBJECT diff --git a/src/trackslistener.h b/src/trackslistener.h --- a/src/trackslistener.h +++ b/src/trackslistener.h @@ -20,6 +20,8 @@ #ifndef TRACKSLISTENER_H #define TRACKSLISTENER_H +#include "elisaLib_export.h" + #include #include "musicaudiotrack.h" @@ -29,7 +31,7 @@ class TracksListenerPrivate; class DatabaseInterface; -class TracksListener : public QObject +class ELISALIB_EXPORT TracksListener : public QObject { Q_OBJECT