mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
22 lines
498 B
C++
22 lines
498 B
C++
|
// SPDX-License-Identifier: GPL-2.0
|
||
|
#include "qmlinterface.h"
|
||
|
|
||
|
#include <QQmlEngine>
|
||
|
|
||
|
QMLInterface *QMLInterface::instance()
|
||
|
{
|
||
|
static QMLInterface *self = new QMLInterface;
|
||
|
return self;
|
||
|
}
|
||
|
|
||
|
void QMLInterface::setup(QQmlContext *ct)
|
||
|
{
|
||
|
// Register interface class
|
||
|
ct->setContextProperty("Backend", QMLInterface::instance());
|
||
|
|
||
|
// Make enums available as types
|
||
|
qmlRegisterUncreatableType<QMLInterface>("org.subsurfacedivelog.mobile",1,0,"Enums","Enum is not a type");
|
||
|
|
||
|
// relink signals to QML
|
||
|
}
|