MPRIS integration
This commit is contained in:
1 parent
df9b79fc8d
commit
b36154bcff
36 files changed
+5657
-1
No files matched your search
@@ -0,0 +1,33 @@
|
||||
//SPDX-FileCopyrightText: 2015 Jolla Ltd. <[email protected]>
|
||||
//SPDX-FileContributor: Andres Gomez
|
||||
//
|
||||
//SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
|
||||
#include <Mpris>
|
||||
#include <MprisManager>
|
||||
|
||||
#include <QtQuick>
|
||||
|
||||
#include <QGuiApplication>
|
||||
|
||||
static QObject * api_factory(QQmlEngine *, QJSEngine *)
|
||||
{
|
||||
return new Mpris;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QGuiApplication *app = new QGuiApplication(argc, argv);
|
||||
QQuickView *view = new QQuickView;
|
||||
|
||||
qmlRegisterSingletonType<Mpris>("org.nemomobile.qtmpris", 1, 0, "Mpris", api_factory);
|
||||
qmlRegisterType<MprisManager>("org.nemomobile.qtmpris", 1, 0, "MprisManager");
|
||||
|
||||
view->setSource(app->applicationDirPath().append("/../qml/controller.qml"));
|
||||
view->show();
|
||||
|
||||
int retVal = app->exec();
|
||||
|
||||
return retVal;
|
||||
}
|
||||
Reference in new issue
Block a user